-
Notifications
You must be signed in to change notification settings - Fork 28
💅 Update text2vec-azure-openai
to utilize isAzure: true
flag and mark resourceName
+ deploymentId
as optional
#196
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
Comment on lines
+187
to
+188
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is always There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahhh, okay I see now. I think this makes sense if the user makes use of the generative: {
name: 'generative-openai',
config: {
deploymentId: config.deploymentId,
resourceName: config.resourceName,
baseURL: config.baseURL,
}
} then the type system would allow it since I like the idea of introducing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My thinking is that There we'd have some boolean clauses to determine whether the module is an azure one, based on the name, and then inject We already do something similar here, wdyt about extending this logic as described above? If you'd rather not then that's fine, I can add it to my backlog 😁 Also, sorry for the spaghetti of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it - this definitely makes more sense 👍 I didn't look into this part. I'm drowning a bit in other work right now, but I should be able to look into this in more detail hopefully next week or so 🙏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I get round to it this week, I'll ping you on here to let you know. Thanks for your help so far! |
||
/** Whether to vectorize the collection name. */ | ||
vectorizeCollectionName?: boolean; | ||
}; | ||
|
Uh oh!
There was an error while loading. Please reload this page.