From 8f62bfec1a7a3e3111ef49558917e2f52e77d3be Mon Sep 17 00:00:00 2001 From: 43EVER <31557639+43EVER@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:40:52 +0000 Subject: [PATCH] fix: Add base_url to ChatOpenAI to respect OPENAI_API_BASE_URL setting --- pipelines/chat-with-youtube-openai-pipeline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pipelines/chat-with-youtube-openai-pipeline.py b/pipelines/chat-with-youtube-openai-pipeline.py index 6deeb15..285a355 100644 --- a/pipelines/chat-with-youtube-openai-pipeline.py +++ b/pipelines/chat-with-youtube-openai-pipeline.py @@ -88,6 +88,7 @@ def get_openai_models(self): def pipe(self, user_message: str, model_id: str, messages: List[dict], body: dict): try: model = ChatOpenAI( + base_url=self.valves.OPENAI_API_BASE_URL, api_key=self.valves.OPENAI_API_KEY, model=self.valves.OPENAI_API_MODEL, temperature=self.valves.OPENAI_API_TEMPERATURE