From 45a22a1786a54b28c068b41b0f14f8a9142beaf0 Mon Sep 17 00:00:00 2001 From: wanoo21 Date: Wed, 4 Sep 2024 11:42:16 +0300 Subject: [PATCH] feat: baseUrl for DallEAPIWrapper --- libs/langchain-openai/src/tools/dalle.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/langchain-openai/src/tools/dalle.ts b/libs/langchain-openai/src/tools/dalle.ts index 35d405807cc2..d3d45c6dba90 100644 --- a/libs/langchain-openai/src/tools/dalle.ts +++ b/libs/langchain-openai/src/tools/dalle.ts @@ -80,6 +80,10 @@ export interface DallEAPIWrapperParams extends ToolParams { * The organization to use */ organization?: string; + /** + * The base URL of the OpenAI API. + */ + baseUrl?: string; } /** @@ -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;