Expand description
LangChain dialect: AIMessage.tool_calls in, error ToolMessages out.
The same shapes serve LangGraph nodes, which pass LangChain messages.
Constants§
- DIALECT
- Dialect name used in error messages and the Python bindings.
Functions§
- denial
- Render a denied/undecided call as an error
ToolMessagedict (status: "error"), so graphs/chains feed the refusal back to the model. ReturnsNonefor allowed calls. - filter_
tools - Filter a list of serialized tool definitions (dicts with a
name) down to the definitionskeepaccepts. - parse_
tool_ calls - Parse tool calls from an
AIMessage({"tool_calls": [...]}) or a bare array of LangChainToolCalldicts ({"name", "args", "id"}).