mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-12 11:21:37 +00:00
Groq models that emit the legacy <function=NAME{...args...}></function>
text format were being forwarded with the entire NAME{...args...} blob as
the tool name, causing tool_use_failed errors from Groq's API.
Add _parse_legacy_function_tool_calls() that splits the bare tool name
off at the first '{' or whitespace, JSON-decodes the trailing args, and
raises OutputParserException for unknown tool names. Wire it into
_convert_dict_to_message() as a fallback when no structured tool_calls
are present, and cover both the parser and the end-to-end conversion
path with unit tests.
FAQ
Looking for an integration not listed here? Check out the integrations documentation and the note in the libs/ README about third-party maintained packages.
Integration docs
For full documentation, see the primary and API reference docs for integrations.