Skip to content

Commit c7c0949

Browse files
committed
Support apiHost config key in Azure provider
1 parent cd9533f commit c7c0949

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/azureopenai.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
} from '../types.js';
1111

1212
interface AzureOpenAiCompletionOptions {
13+
apiHost?: string;
1314
apiKey?: string;
1415
temperature?: number;
1516
top_p?: number;
@@ -41,7 +42,7 @@ class AzureOpenAiGenericProvider implements ApiProvider {
4142
this.deploymentName = deploymentName;
4243

4344
this.apiKey = config?.apiKey || env?.AZURE_OPENAI_API_KEY || process.env.AZURE_OPENAI_API_KEY;
44-
this.apiHost = env?.AZURE_OPENAI_API_HOST || process.env.AZURE_OPENAI_API_HOST;
45+
this.apiHost = config?.apiHost || env?.AZURE_OPENAI_API_HOST || process.env.AZURE_OPENAI_API_HOST;
4546

4647
this.config = config || {};
4748
this.id = id ? () => id : this.id;

0 commit comments

Comments
 (0)