I am using the Weaviate JS/TS beta client with my Weaviate Cloud Services cluster. Here is my schema for my collection:
const schema = {
name: useCollectionName,
properties: [
{
// This field contains the text we want to be able to
// search on, using a vector similarity search.
name: 'chunkText',
dataType: 'text',
description: 'The searchable text',
tokenization: 'lowercase',
// If TRUE, then the property name ("chunkText")
// is made part of the vectorized text. If FALSE,
// then only the value of the "chunkText" field
// is vectorized.
vectorizePropertyName: false,
},
{
// This field contains the URL to the document
// the text chunk was taken from.
name: 'attributionUrl',
// We use the "object" data type to keep this
// field OUT of the vectorized text.
dataType: 'text',
description: 'The URL of the source article',
tokenization: 'whitespace',
// We declare a moduleConfig field that tells
// Weaviate to skip this field when creating
// the vectorized text field when we are using
// OpenAI for word embeddings (vectorization).
//
// We also don't want the property name in the
// vectorized text either.
moduleConfig: {
text2vec_openai: {
skip: true,
vectorizePropertyName: false
}
},
}
],
}
Which I added successfully via the client.
Then I added 8705 objects via insertMany
taking about 8 seconds to complete. However, when I try to do a nearText
search, I get the following error:
“panic occurred: ValidateParam was called without any known params present”
I found this thread, where apparently the poster had the same error because he wasn’t using a vectorizer:
Also, I checked my OpenAI stats where there should have been a flurry of recent requests due to the insertion, but I don’t see any activity at all, not even a call for the vectorizing of the input query.
I believe I am initializing the client
object properly with my OpenAI key:
const client = await weaviate.connectToWCS(
WEAVIATE_CLUSTER_ENDPOINT_URL_1,
{
authCredentials: new weaviate.ApiKey(WEAVIATE_API_KEY_ADMIN_READ_WRITE),
headers: {
'X-OpenAI-Api-Key': OPEN_AI_API_KEY_WEAVIATE_1,
}
}
)
Note, I know the environment variables have valid values because I traced through the code to inspect them.
So why am I getting this error and why does it seem that no embeddings/vectorizing operations are taking place?