Skip to content

Commit

Permalink
Update text2vec-azure-openai to utilize isAzure: true flag and ma…
Browse files Browse the repository at this point in the history
…rk `resourceName` + `deploymentId` as optional

This relates to the changes in weaviate/weaviate#5776
  • Loading branch information
flipace committed Sep 18, 2024
1 parent e333dab commit 1952e48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/collections/config/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ export type Text2VecAWSConfig = {
export type Text2VecAzureOpenAIConfig = {
/** The base URL to use where API requests should go. */
baseURL?: string;
/** The deployment ID to use */
deploymentId: string;
/** The resource name to use. */
resourceName: string;
/** The deployment ID to use. If left empty, must be provided via X-Azure-Deployment-Id header */
deploymentId?: string;
/** The resource name to use. If left empty, must be provided via X-Azure-Resource-Name header */
resourceName?: string;
/** Will automatically be set to true. You don't need to set this manually. */
isAzure?: true;
/** Whether to vectorize the collection name. */
vectorizeCollectionName?: boolean;
};
Expand Down
5 changes: 4 additions & 1 deletion src/collections/configure/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ export const vectorizer = {
vectorIndexConfig,
vectorizerConfig: {
name: 'text2vec-azure-openai',
config,
config: {
...config,
isAzure: true,
}

Check failure on line 259 in src/collections/configure/vectorizer.ts

View workflow job for this annotation

GitHub Actions / checks

Insert `,`
},
});
},
Expand Down

0 comments on commit 1952e48

Please sign in to comment.