Hi I am getting some errors with the v3 Typescript client. If I follow the getting started guide with v2 TS, everything works. If I follow it using the v3, I get
You are using legacy vectorization. The vectorizer and vectorIndexConfig fields will be removed from the API in the future. Please use the vectorizers field instead to created specifically named vectorizers for your collection.
during collection creation and
WeaviateQueryError: Query call with protocol gRPC failed with message: /weaviate.v1.Weaviate/Search UNKNOWN: panic occurred: ValidateParam was called without any known params present
during nearText.
I am simply following: Quickstart Tutorial | Weaviate - Vector Database and have confirmed every step and all api keys are present.Again, if I swap out the code to v2 - everything works. Even, if I just do the collection creation and inserts with v2 and then swap over to v3 query, that works. Something is failing to vectorize in the v3 collection creation is my guess, but again, Iām just following the getting started guide.
Any help would be awesome
hi @Chase_Norton !
I have seen this error before when the collection doesnāt have a vectorizer configured.
Can you check if thatās the case?
here is how you can check the vectorizer of your collection:
console.log(((await client.collections.get("JeopardyQuestions").config.get()).vectorizer))
I have the same problem and itās indeed missing the vectorizer. The problem is Iām not able to add a vectorizer at all during collection creation. There are bunch of typescript errors. I tried both of these and none of them works:
const schema = {
name: collectionName,
vectorizer: weaviate.configure.vectorizer.text2VecOpenAI(),
}
const newCollection = await dbClient.collections.create(schema)
const schema = {
...
vectorizer: [
weaviate.configure.vectorizer('openai_te3_sm', {
properties: ['openai_te3_sm'],
vectorizerConfig: weaviate.configure.vectorizer.text2VecOpenAI({
model: 'text-embedding-3-small',
dimensions: 1536,
}),
}),
],
}
const newCollection = await dbClient.collections.create(schema)
The first one is from quickstart tutorial and the second one is from openai integrations docs.
Iām using ts v3 as well.
1 Like
Hi @Seungchan_Lee ! Really sorry for that.
We will fix the quick start soon.
here is the correct way to create a collection:
const schema = {
name: collectionName,
vectorizers: weaviate.configure.vectorizer.text2VecOpenAI("default"),
}
const newCollection = await dbClient.collections.create(schema)
Let me know if this works.
Thanks
Thank you @DudaNogueira .
This does work, but any attempt at using text-embedding-3-large as the model instead of ada does not. Do you know how I can set text-embedding-3-large with the 3072 dimensions?
Hi Chase! Sure!
But please, when having a new question, open a new topic so we donāt mix them here.
Here is the code:
from weaviate import classes as wvc
col = client.collections.create(
name="ChaseNorton",
vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(
dimensions=3072,
model="text-embedding-3-large"
)
)
Inserting an object
uuid = col.data.insert({"text": "this is an object"})
Checking if it worked:
object = col.query.fetch_objects(limit=1, include_vector=True).objects[0]
len(object.vector.get("default"))
3072
Let me know if this helps 