Description
I use aws weaviate api to create class with vectorizer: text2vec-aws,but it said no module with name “text2vec-aws” present’. I mask my url and keys, the client is ready to connect.
Server Setup Information
i am using python 3.12 , have below code to setup weaviate client, and create class:
import weaviate
client = weaviate.Client(
url = “https:// *****”,
auth_client_secret=weaviate.auth.AuthApiKey(api_key=" ****“),
additional_headers= {
“X-AWS-Access-Key”: " ******”,
“X-AWS-Secret-Key”: " *******",
}
)
class_obj = {
“class”: “Document”,
“description”: “A class called document”,
“vectorizer”: “text2vec-aws”,
“vectorIndexConfig”: {
“distance”: “cosine”
},
“moduleConfig”: {
“text2vec-aws”: {
“model”: “amazon.titan-embed-text-v1”,
“region”: “us-west-2”,
“vectorizeClassName”: False,
}
},
“properties”: [
{
“name”: “content”,
“dataType”: [“text”],
“description”: “Content that will be vectorized”,
“moduleConfig”: {
“text2vec-aws”: {
“skip”: False,
“vectorizePropertyName”: False,
}
}
}
]
}
exists = client.schema.exists(“Document”)
# The following created the class Document just once
if (exists == True):
client.schema.delete_class(“Document”)
client.schema.create_class(class_obj)
print(“The class is created again”)
else:
print(“Class ‘Document’ created successfully.”)
client.schema.create_class(class_obj)
- Weaviate Server Version: AWS Weaviate instance
- Deployment Method:
- Multi Node? Number of Running Nodes:
- Client Language and Version: python 3.12
Any additional Information
UnexpectedStatusCodeException(“Create class”, response) UnexpectedStatusCodeError: Create class! Unexpected status code: 422, with response body: {‘error’: [{‘message’: ‘vectorizer: no module with name “text2vec-aws” present’}]}.