-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vector dimension erroneously being sent to ada-002 model when using Azure OpenAI #6334
Comments
Here's my theory - sorry if it's a little long-winded. As a starting point, the AzureOpenAI vectorizer config interface is different from the OpenAI vectorizer config interface. The Azure class has no class _Text2VecAzureOpenAIConfig(_VectorizerConfigCreate):
vectorizer: Union[Vectorizers, _EnumLikeStr] = Field(
default=Vectorizers.TEXT2VEC_OPENAI, frozen=True, exclude=True
)
baseURL: Optional[AnyHttpUrl]
resourceName: str
deploymentId: str
vectorizeClassName: bool
class _Text2VecOpenAIConfig(_VectorizerConfigCreate):
vectorizer: Union[Vectorizers, _EnumLikeStr] = Field(
default=Vectorizers.TEXT2VEC_OPENAI, frozen=True, exclude=True
)
baseURL: Optional[AnyHttpUrl]
dimensions: Optional[int]
model: Optional[str]
modelVersion: Optional[str]
type_: Optional[OpenAIType]
vectorizeClassName: bool In the vectorizer module, a default weaviate/modules/text2vec-openai/ent/class_settings.go Lines 25 to 34 in a42e05e
weaviate/modules/text2vec-openai/ent/class_settings.go Lines 89 to 91 in a42e05e
The weaviate/modules/text2vec-openai/ent/class_settings.go Lines 267 to 275 in a42e05e
weaviate/modules/text2vec-openai/ent/class_settings.go Lines 158 to 161 in a42e05e
And this dimension ultimately winds up getting passed unconditionally in the request body: weaviate/modules/text2vec-openai/clients/openai.go Lines 241 to 246 in a42e05e
|
I set up a dev weaviate/weaviate-python-client environment and I'm able to work around the issue client-side by expanding vectorizer_config=wvc.Configure.Vectorizer.text2vec_azure_openai(
resource_name="myCompanyResource",
deployment_id="myCompany-text-embedding-ada-002",
model="ada",
model_version="002",
type_="text"
) I can submit a PR in the client repos for this change, but from a UX perspective I think the validations on the db should be updated as well, like:
|
How to reproduce this bug?
What is the expected behavior?
Data is uploaded correctly
What is the actual behavior?
Supporting information
I'm seeing this on 1.27.3 and the issue goes away when I downgrade to 1.26.6. I suspect there's an issue with the change in #5987 - will comment here with my findings
Server Version
1.27.3
Weaviate Setup
Single Node
Nodes count
1
Code of Conduct
The text was updated successfully, but these errors were encountered: