-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
openai[patch],azure-openai[patch]: Update legacy classes to respect the apiKey field #5714
Changes from 1 commit
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 |
---|---|---|
|
@@ -267,7 +267,9 @@ export class AzureChatOpenAI | |
getEnvironmentVariable("AZURE_OPENAI_API_DEPLOYMENT_NAME"); | ||
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. Hey there! 👋 I've reviewed the code and noticed that the recent change explicitly accesses environment variables using |
||
|
||
const openAiApiKey = | ||
fields?.openAIApiKey ?? getEnvironmentVariable("OPENAI_API_KEY"); | ||
fields?.apiKey ?? | ||
fields?.openAIApiKey ?? | ||
getEnvironmentVariable("OPENAI_API_KEY"); | ||
|
||
this.azureOpenAIApiKey = | ||
fields?.apiKey ?? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,9 @@ export class AzureOpenAIEmbeddings | |
getEnvironmentVariable("AZURE_OPENAI_API_ENDPOINT"); | ||
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. Hey there! I've reviewed the code and flagged a change in the diff for you to review. It looks like the code is explicitly accessing and requiring an environment variable, so it's important to double-check this change. Let me know if you need any further assistance! |
||
|
||
const openAiApiKey = | ||
fields?.openAIApiKey ?? getEnvironmentVariable("OPENAI_API_KEY"); | ||
fields?.apiKey ?? | ||
fields?.openAIApiKey ?? | ||
getEnvironmentVariable("OPENAI_API_KEY"); | ||
|
||
this.azureOpenAIApiKey = | ||
fields?.apiKey ?? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,7 +135,9 @@ export class AzureOpenAI< | |
getEnvironmentVariable("AZURE_OPENAI_API_DEPLOYMENT_NAME"); | ||
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. Hey team, just a heads up that I've flagged a change in the PR for review. The added line |
||
|
||
const openAiApiKey = | ||
fields?.openAIApiKey ?? getEnvironmentVariable("OPENAI_API_KEY"); | ||
fields?.apiKey ?? | ||
fields?.openAIApiKey ?? | ||
getEnvironmentVariable("OPENAI_API_KEY"); | ||
|
||
this.azureOpenAIApiKey = | ||
fields?.apiKey ?? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,7 +157,9 @@ export class OpenAIChat | |
super(fields ?? {}); | ||
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. Hey team, I've flagged this change for review as it appears to add, access, and read environment variables using |
||
|
||
this.openAIApiKey = | ||
fields?.openAIApiKey ?? getEnvironmentVariable("OPENAI_API_KEY"); | ||
fields?.apiKey ?? | ||
fields?.openAIApiKey ?? | ||
getEnvironmentVariable("OPENAI_API_KEY"); | ||
|
||
this.azureOpenAIApiKey = | ||
fields?.azureOpenAIApiKey ?? | ||
|
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 there! I've flagged this PR for your review as it includes a change that explicitly accesses an environment variable using the
getEnvironmentVariable
function. Please take a look and ensure it aligns with our environment variable handling practices.