-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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[patch]: feat: add azureOpenAIApiDeploymentName for AzureChatOpenAI constructor #4668
azure-openai[patch]: feat: add azureOpenAIApiDeploymentName for AzureChatOpenAI constructor #4668
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -256,7 +256,8 @@ export class AzureChatOpenAI | |||
getEnvironmentVariable("AZURE_OPENAI_API_ENDPOINT"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey team, I've flagged this PR for your review as it includes changes that explicitly access environment variables using the getEnvironmentVariable
function. Please take a look and ensure everything is in order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Nice catch.
@@ -256,7 +256,8 @@ export class AzureChatOpenAI | |||
getEnvironmentVariable("AZURE_OPENAI_API_ENDPOINT"); | |||
|
|||
this.azureOpenAIApiCompletionsDeploymentName = | |||
fields?.azureOpenAIEmbeddingsApiDeploymentName ?? | |||
(fields?.azureOpenAIEmbeddingsApiDeploymentName || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this even take into account azureOpenAIEmbeddingsApiDeploymentName
? I guess we have to leave it there for backwards compatibility...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While backward compatibility is important, I'm thinking it might be okay to remove azureOpenAIEmbeddingsApiDeploymentName
in chat_models
since it seems to confuse users.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a PR for deprecating azureOpenAIEmbeddingsApiDeploymentName
.
#4714
Thank you! Sorry for the delay. |
Fixes # (issue)
AzureOpenAIEmbeddings and AzureOpenAI can use
azureOpenAIApiDeploymentName
in constructer however AzureChatOpenAI not.So, add
azureOpenAIApiDeploymentName
to AzureChatOpenAI.