mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-17 07:26:16 +00:00
openai, anthropic, ...: with_structured_output to pass in explicit tool choice (#23645)
...community, mistralai, groq, fireworks part of #23644
This commit is contained in:
@@ -794,6 +794,8 @@ class ChatMistralAI(BaseChatModel):
|
||||
"schema must be specified when method is 'function_calling'. "
|
||||
"Received None."
|
||||
)
|
||||
# TODO: Update to pass in tool name as tool_choice if/when Mistral supports
|
||||
# specifying a tool.
|
||||
llm = self.bind_tools([schema], tool_choice="any")
|
||||
if is_pydantic_schema:
|
||||
output_parser: OutputParserLike = PydanticToolsParser(
|
||||
|
Reference in New Issue
Block a user