Text2vec-ollama examples

Hi Team,

we are performing a POC for text2vec-ollama and generative-ollama with weaviate

Installed ollama on a VM with CPU’s for poc : http://ollama-poc-vm:3350

enabled text2vec-ollama and generative-ollama modules in weaviate. cluster came up without any issues.

class_obj = {
… “class”: “docs”,
… “vectorizer”: “text2vec-ollama”,
… “moduleConfig”: {
… “text2vec-ollama”: {
… “apiEndpoint”: "http://ollama-poc-vm:3350 ",
… “model”: “all-minilm”,
… }
… },
… “properties”: [
… {
… “name”: “text”,
… “dataType”: [“text”],
… },
… ],
… }
client.schema.create_class(class_obj)

class created.

how to embed the text docs as vectors into weaviate using ollama models ? Can you share some documents on how to use weaviate module to embed and run generative search / RAG use case ?

Regards,
Adithya

hi @adithya.ch !!

I have crafted a recipe just like that :heart_eyes:

It uses Weaviate Embedded, so the endpoint for ollama will change if you are running Weaviate in Docker. There is a note on that.

the recipe file is in: local_rag_using_ollama_integration_using_embedded.ipynb

Let me know what you think about this recipe, and if there is room for improvements :slight_smile:

Thanks!