Type object '_Generative' has no attribute 'ollama'

Hi, I am encountering an error: type object '_Generative' has no attribute 'ollama'. According to the documentation, this feature is available in version 1.25.0, and I am using version 1.25.4. I installed Weaviate using Docker and enabled the modules with the following configuration: ENABLE_MODULES: 'text2vec-ollama,generative-ollama'.

Here is my code:

 client.collections.create(
    collection_name,
    vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_ollama(
        api_endpoint="http://host.docker.internal:11434",
        model="mxbai-embed-large"
    ),
    generative_config=wvc.config.Configure.Generative.ollama(
        api_endpoint="http://host.docker.internal:11434",
        model="llama3"
    )
)

Can you please help me resolve this issue?

Hi!

For technical questions, please, use the Support category, as we have a template there that will ask to provide infos like server version, etc.

Can you paste the entire traceback of that code? Also, was this code for client.collections.create that raised this error?

I was able to create a collection with this exact same code…

Let me know those info so I can help you.

Thanks!

Hi, @DudaNogueira , yes issue was related to the client.collections.create, later I just ran same code in Jupiter Notebook collection was created maybe was issue in Pycharm.
thanks

1 Like