Home / Function/ _extract_tool_calls_from_message() — langchain Function Reference

_extract_tool_calls_from_message() — langchain Function Reference

Architecture documentation for the _extract_tool_calls_from_message() function in output_parsers.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  470cac50_e74a_5b1d_dcca_af4864b0170e["_extract_tool_calls_from_message()"]
  3702dbed_edb1_9f35_9019_2f747b6a4112["output_parsers.py"]
  470cac50_e74a_5b1d_dcca_af4864b0170e -->|defined in| 3702dbed_edb1_9f35_9019_2f747b6a4112
  de78512b_344e_3561_9fd0_66bcf46d91d3["parse_result()"]
  de78512b_344e_3561_9fd0_66bcf46d91d3 -->|calls| 470cac50_e74a_5b1d_dcca_af4864b0170e
  8979d571_9d49_809d_ec8f_862c616b5d6f["extract_tool_calls()"]
  470cac50_e74a_5b1d_dcca_af4864b0170e -->|calls| 8979d571_9d49_809d_ec8f_862c616b5d6f
  style 470cac50_e74a_5b1d_dcca_af4864b0170e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/langchain_anthropic/output_parsers.py lines 73–77

def _extract_tool_calls_from_message(message: AIMessage) -> list[ToolCall]:
    """Extract tool calls from a list of content blocks."""
    if message.tool_calls:
        return message.tool_calls
    return extract_tool_calls(message.content)

Domain

Subdomains

Called By

Frequently Asked Questions

What does _extract_tool_calls_from_message() do?
_extract_tool_calls_from_message() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/output_parsers.py.
Where is _extract_tool_calls_from_message() defined?
_extract_tool_calls_from_message() is defined in libs/partners/anthropic/langchain_anthropic/output_parsers.py at line 73.
What does _extract_tool_calls_from_message() call?
_extract_tool_calls_from_message() calls 1 function(s): extract_tool_calls.
What calls _extract_tool_calls_from_message()?
_extract_tool_calls_from_message() is called by 1 function(s): parse_result.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free