Description
Hello friends, we’re having issues creating a collection/class with the voyageAI text embedding using the python v4 SDK. Here are our details:
client = weaviate.connect_to_wcs(
cluster_url=WEAVIATE_CLUSTER_URL,
auth_credentials=weaviate.auth.AuthApiKey(WEAVIATE_API_KEY),
headers={
"X-VoyageAI-Api-Key": VOYAGE_API_KEY
}
Error message:
weaviate.exceptions.UnexpectedStatusCodeError: Collection may not have been created properly.! Unexpected status code: 422, with response body: {'error': [{'message': 'target vector "title_vector": vectorizer: no module with name "text2vec-voyageai" present'}]}.
Server Setup Information
- Weaviate Server Version: 1.24.14
- Deployment Method: WCS
- Multi Node? Number of Running Nodes: not applicable
- Client Language and Version: Python v4 SDK, weaviate-client==4.6.3
Any additional Information
hi @Stephen_Paek !
Welcome to our community 
For all hosted server in our cloud, the best place to ask for support is sending an email to support@weaviate.io
I was able to identify your cluster in our severs, and noticed that the VoyageAI was not properly installed on your server 
I have enabled this module on your server.
Also, check your email for the support ticket.
Thanks!
1 Like
Thanks very much Duda. We’ve replied to the support ticket you created.
We can successfully create the class, but the Vectorizer
module is still showing empty, even though we saw no error message when creating the class.
Hi!
I was able to use it with the code below:
import weaviate
import os
from weaviate import classes as wvc
client = weaviate.connect_to_local(
headers={
"X-VoyageAI-Api-Key": os.environ.get("VOYAGE_API_KEY")
}
)
client.collections.delete("Test")
col = client.collections.create(
"Test",
vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_voyageai(),
properties=[
wvc.config.Property(name="text", data_type=wvc.config.DataType.TEXT)
]
)
col.data.insert({"text": "some text here"})
# assert name of the vectorizer
assert col.config.get().vectorizer.name == "TEXT2VEC_VOYAGEAI"
# assert first object has vectors
assert len(col.query.fetch_objects(include_vector=True).objects[0].vector.get("default")) > 0
Let me know if this helps or please, is possible, share the collection creation code.
Thanks!