Skip to content

Commit

Permalink
feat(openai): baseUrl for DallEAPIWrapper (#6685)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanoo21 authored Sep 4, 2024
1 parent 890d24c commit 8ddb89d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/langchain-openai/src/tools/dalle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export interface DallEAPIWrapperParams extends ToolParams {
* The organization to use
*/
organization?: string;
/**
* The base URL of the OpenAI API.
*/
baseUrl?: string;
}

/**
Expand Down Expand Up @@ -141,6 +145,7 @@ export class DallEAPIWrapper extends Tool {
apiKey: openAIApiKey,
organization,
dangerouslyAllowBrowser: true,
baseUrl: fields?.baseUrl,
};
this.client = new OpenAIClient(clientConfig);
this.model = fields?.model ?? fields?.modelName ?? this.model;
Expand Down

0 comments on commit 8ddb89d

Please sign in to comment.