From 7f96fc8c97b6f4ebaa888df44dd7cff3a28e6c4a Mon Sep 17 00:00:00 2001 From: ayaviri Date: Wed, 8 May 2024 13:31:01 -0400 Subject: [PATCH] Var name fix --- public-packages/llm-client/src/providers/azure/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public-packages/llm-client/src/providers/azure/index.ts b/public-packages/llm-client/src/providers/azure/index.ts index 0fc0c0e..391e33e 100644 --- a/public-packages/llm-client/src/providers/azure/index.ts +++ b/public-packages/llm-client/src/providers/azure/index.ts @@ -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))