Skip to content

Commit 1952e48

Browse files
committed
Update text2vec-azure-openai to utilize isAzure: true flag and mark resourceName + deploymentId as optional
This relates to the changes in weaviate/weaviate#5776
1 parent e333dab commit 1952e48

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/collections/config/types/vectorizer.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,12 @@ export type Text2VecAWSConfig = {
180180
export type Text2VecAzureOpenAIConfig = {
181181
/** The base URL to use where API requests should go. */
182182
baseURL?: string;
183-
/** The deployment ID to use */
184-
deploymentId: string;
185-
/** The resource name to use. */
186-
resourceName: string;
183+
/** The deployment ID to use. If left empty, must be provided via X-Azure-Deployment-Id header */
184+
deploymentId?: string;
185+
/** The resource name to use. If left empty, must be provided via X-Azure-Resource-Name header */
186+
resourceName?: string;
187+
/** Will automatically be set to true. You don't need to set this manually. */
188+
isAzure?: true;
187189
/** Whether to vectorize the collection name. */
188190
vectorizeCollectionName?: boolean;
189191
};

src/collections/configure/vectorizer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ export const vectorizer = {
253253
vectorIndexConfig,
254254
vectorizerConfig: {
255255
name: 'text2vec-azure-openai',
256-
config,
256+
config: {
257+
...config,
258+
isAzure: true,
259+
}
257260
},
258261
});
259262
},

0 commit comments

Comments
 (0)