Skip to content

Commit 69978a2

Browse files
author
Michal Wysocki
committed
OpenAICUAClient.ts reads baseUrl from clientOptions
1 parent 9037430 commit 69978a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/agent/OpenAICUAClient.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class OpenAICUAClient extends AgentClient {
4343
(clientOptions?.apiKey as string) || process.env.OPENAI_API_KEY || "";
4444
this.organization =
4545
(clientOptions?.organization as string) || process.env.OPENAI_ORG;
46+
this.baseURL = (clientOptions?.baseURL as string) || undefined;
4647

4748
// Get environment if specified
4849
if (
@@ -57,6 +58,10 @@ export class OpenAICUAClient extends AgentClient {
5758
apiKey: this.apiKey,
5859
};
5960

61+
if (this.baseURL) {
62+
this.clientOptions.baseURL = this.baseURL;
63+
}
64+
6065
// Initialize the OpenAI client
6166
this.client = new OpenAI(this.clientOptions);
6267
}

0 commit comments

Comments
 (0)