Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3588

How to configure weaviate env

$
0
0

hi @ywen !!

Welcome to our community! :hugs:

This error message will surface when you create a collection without a vectorizer.

In that case, Weaviate is not able to vectorize your query. So it doesn’t even expose the nearText option.

Here is an example on how to create a collection with a vectorizer:

from weaviate import classes as wvc

collection = client.collections.create(
    "Article",
    vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
    generative_config=wvc.config.Configure.Generative.openai(),
)
collection.data.insert({"text": "This is a test"})

Let me know if this helps!


Viewing all articles
Browse latest Browse all 3588

Trending Articles