formatting

This commit is contained in:
Ahmed Tammaa
2025-07-13 02:13:41 +03:00
parent d75d2d43e9
commit 758c59fc31

View File

@@ -1870,11 +1870,12 @@ class BaseChatOpenAI(BaseChatModel):
"schema must be specified when method is not 'json_mode'. " "schema must be specified when method is not 'json_mode'. "
"Received None." "Received None."
) )
tool_name = convert_to_openai_tool(schema)["function"]["name"] tool_name = convert_to_openai_tool(schema)["function"]["name"]
base_url = ( base_url = (
getattr(self, "openai_api_base", "") getattr(self, "openai_api_base", "")
or getattr(self, "api_base", "") or "" or getattr(self, "api_base", "")
or ""
).lower() ).lower()
# The Azure-Hosted Models routes to this function # The Azure-Hosted Models routes to this function
# so we need to set the tool_choice to required # so we need to set the tool_choice to required