Skip to content

Commit

Permalink
fix(client): handle case where the client is instantiated with a unde…
Browse files Browse the repository at this point in the history
…fined baseURL (#285)
  • Loading branch information
stainless-bot committed Sep 6, 2023
1 parent 8dc59bc commit 5095cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export class OpenAI extends Core.APIClient {
const options: ClientOptions = {
apiKey,
organization,
baseURL: `https://api.openai.com/v1`,
...opts,
baseURL: opts.baseURL ?? `https://api.openai.com/v1`,
};

if (!options.dangerouslyAllowBrowser && Core.isRunningInBrowser()) {
Expand Down

0 comments on commit 5095cf3

Please sign in to comment.