Skip to content

Commit

Permalink
Var name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaviri committed May 8, 2024
1 parent 4ae08c5 commit 7f96fc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public-packages/llm-client/src/providers/azure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export class AzureProvider extends BaseProvider<"azure"> {
authOpts: AzureAuthenticationOptions
): AzureClient {
// TODO: Is the trailing `?? null` needed
const openAiApiKey = p.opts?.apiKey ?? process.env?.OPENAI_API_KEY ?? null
const azureApiKey = p.opts?.apiKey ?? process.env?.AZURE_API_KEY ?? null
const endpoint = p.opts?.endpoint ?? process.env?.AZURE_ENDPOINT ?? null
const openAiApiKey = authOpts?.apiKey ?? process.env?.OPENAI_API_KEY ?? null
const azureApiKey = authOpts?.apiKey ?? process.env?.AZURE_API_KEY ?? null
const endpoint = authOpts?.endpoint ?? process.env?.AZURE_ENDPOINT ?? null

if (openAiApiKey) {
return new AzureClient(OpenAIKeyCredential(apiKey))
Expand Down

0 comments on commit 7f96fc8

Please sign in to comment.