Skip to content
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

Azure OpenAI: use "deploymentName" instead of "deploymentId" #1137

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/resources/embedding-providers-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ stargate:
# see https://learn.microsoft.com/en-us/azure/ai-services/openai/reference
display-name: Azure OpenAI
enabled: true
url: https://{resourceName}.openai.azure.com/openai/deployments/{deploymentId}/embeddings?api-version=2024-02-01
url: https://{resourceName}.openai.azure.com/openai/deployments/{deploymentName}/embeddings?api-version=2024-02-01
supported-authentications:
NONE:
enabled: false
Expand All @@ -67,7 +67,7 @@ stargate:
type: string
required: true
help: "The name of your Azure OpenAI Resource."
- name: "deploymentId"
- name: "deploymentName"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure call it deployment Id, why are changing this?

type: string
required: true
help: "The name of your model deployment. You're required to first deploy a model before you can make calls."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ public void happyEmbeddingService() {
},
"parameters": {
"resourceName" : "vectorize",
"deploymentId" : "vectorize"
"deploymentName" : "vectorize"
}
}
}
Expand Down Expand Up @@ -730,7 +730,7 @@ public void failUnsupportedModel() {
},
"parameters": {
"resourceName" : "vectorize",
"deploymentId" : "vectorize"
"deploymentName" : "vectorize"
}
}
}
Expand Down Expand Up @@ -1498,7 +1498,7 @@ public void failWithWrongProviderParameterType() {
"modelName": "text-embedding-3-small",
"parameters": {
"resourceName": 123,
"deploymentId": "vectorize"
"deploymentName": "vectorize"
}
}
}
Expand Down Expand Up @@ -1580,7 +1580,7 @@ public void failWithUnexpectedModelParameters() {
"modelName": "text-embedding-3-small",
"parameters": {
"resourceName": "vectorize",
"deploymentId": "vectorize",
"deploymentName": "vectorize",
"vectorDimension": 512
}
}
Expand Down Expand Up @@ -1623,7 +1623,7 @@ public void failWithWrongModelParameterType() {
"modelName": "text-embedding-3-small",
"parameters": {
"resourceName": "vectorize",
"deploymentId": 123
"deploymentName": 123
}
}
}
Expand All @@ -1642,7 +1642,7 @@ public void failWithWrongModelParameterType() {
.body(
"errors[0].message",
startsWith(
"The provided options are invalid: The provided parameter 'deploymentId' type is incorrect. Expected: 'string'"));
"The provided options are invalid: The provided parameter 'deploymentName' type is incorrect. Expected: 'string'"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void happyPathVectorizeSearch() throws Exception {
},
"parameters": {
"resourceName": "test",
"deploymentId": "test"
"deploymentName": "test"
}
}
}
Expand All @@ -130,7 +130,7 @@ public void happyPathVectorizeSearch() throws Exception {
assertThat(op.vectorFunction()).isEqualTo("cosine");
assertThat(op.comment())
.isEqualTo(
"{\"collection\":{\"name\":\"my_collection\",\"schema_version\":1,\"options\":{\"vector\":{\"dimension\":768,\"metric\":\"cosine\",\"service\":{\"provider\":\"azureOpenAI\",\"modelName\":\"text-embedding-3-small\",\"authentication\":{\"x-embedding-api-key\":\"user_key\"},\"parameters\":{\"resourceName\":\"test\",\"deploymentId\":\"test\"}}},\"defaultId\":{\"type\":\"\"}}}}",
"{\"collection\":{\"name\":\"my_collection\",\"schema_version\":1,\"options\":{\"vector\":{\"dimension\":768,\"metric\":\"cosine\",\"service\":{\"provider\":\"azureOpenAI\",\"modelName\":\"text-embedding-3-small\",\"authentication\":{\"x-embedding-api-key\":\"user_key\"},\"parameters\":{\"resourceName\":\"test\",\"deploymentName\":\"test\"}}},\"defaultId\":{\"type\":\"\"}}}}",
TableCommentConstants.SCHEMA_VERSION_VALUE);
});
}
Expand Down