From 758c59fc31bc2b139d6664c986b38b337ec0939d Mon Sep 17 00:00:00 2001 From: Ahmed Tammaa Date: Sun, 13 Jul 2025 02:13:41 +0300 Subject: [PATCH] formatting --- libs/partners/openai/langchain_openai/chat_models/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/partners/openai/langchain_openai/chat_models/base.py b/libs/partners/openai/langchain_openai/chat_models/base.py index cfb479906f1..a262a53b76e 100644 --- a/libs/partners/openai/langchain_openai/chat_models/base.py +++ b/libs/partners/openai/langchain_openai/chat_models/base.py @@ -1870,11 +1870,12 @@ class BaseChatOpenAI(BaseChatModel): "schema must be specified when method is not 'json_mode'. " "Received None." ) - + tool_name = convert_to_openai_tool(schema)["function"]["name"] base_url = ( getattr(self, "openai_api_base", "") - or getattr(self, "api_base", "") or "" + or getattr(self, "api_base", "") + or "" ).lower() # The Azure-Hosted Models routes to this function # so we need to set the tool_choice to required