This commit is contained in:
Ahmed Tammaa 2025-07-13 02:03:13 +03:00
parent 41000c029a
commit d75d2d43e9

View File

@ -1873,7 +1873,8 @@ class BaseChatOpenAI(BaseChatModel):
tool_name = convert_to_openai_tool(schema)["function"]["name"]
base_url = (
getattr(self, "openai_api_base", "") or getattr(self, "api_base", "") or ""
getattr(self, "openai_api_base", "")
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