We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
baseUrl
clientOptions
1 parent 9037430 commit 69978a2Copy full SHA for 69978a2
lib/agent/OpenAICUAClient.ts
@@ -43,6 +43,7 @@ export class OpenAICUAClient extends AgentClient {
43
(clientOptions?.apiKey as string) || process.env.OPENAI_API_KEY || "";
44
this.organization =
45
(clientOptions?.organization as string) || process.env.OPENAI_ORG;
46
+ this.baseURL = (clientOptions?.baseURL as string) || undefined;
47
48
// Get environment if specified
49
if (
@@ -57,6 +58,10 @@ export class OpenAICUAClient extends AgentClient {
57
58
apiKey: this.apiKey,
59
};
60
61
+ if (this.baseURL) {
62
+ this.clientOptions.baseURL = this.baseURL;
63
+ }
64
+
65
// Initialize the OpenAI client
66
this.client = new OpenAI(this.clientOptions);
67
}
0 commit comments