Home / Function/ _lc_tool_calls_to_anthropic_tool_use_blocks() — langchain Function Reference

_lc_tool_calls_to_anthropic_tool_use_blocks() — langchain Function Reference

Architecture documentation for the _lc_tool_calls_to_anthropic_tool_use_blocks() function in chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  544f8a91_bddd_d6fd_dea8_33f43056d1a2["_lc_tool_calls_to_anthropic_tool_use_blocks()"]
  a85819c7_917d_4c71_2864_a19e68947340["chat_models.py"]
  544f8a91_bddd_d6fd_dea8_33f43056d1a2 -->|defined in| a85819c7_917d_4c71_2864_a19e68947340
  a1122c23_c68d_f096_a90e_42f0e4d39d61["_format_messages()"]
  a1122c23_c68d_f096_a90e_42f0e4d39d61 -->|calls| 544f8a91_bddd_d6fd_dea8_33f43056d1a2
  style 544f8a91_bddd_d6fd_dea8_33f43056d1a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/langchain_anthropic/chat_models.py lines 1891–1902

def _lc_tool_calls_to_anthropic_tool_use_blocks(
    tool_calls: list[ToolCall],
) -> list[_AnthropicToolUse]:
    return [
        _AnthropicToolUse(
            type="tool_use",
            name=tool_call["name"],
            input=tool_call["args"],
            id=cast("str", tool_call["id"]),
        )
        for tool_call in tool_calls
    ]

Domain

Subdomains

Called By

Frequently Asked Questions

What does _lc_tool_calls_to_anthropic_tool_use_blocks() do?
_lc_tool_calls_to_anthropic_tool_use_blocks() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/chat_models.py.
Where is _lc_tool_calls_to_anthropic_tool_use_blocks() defined?
_lc_tool_calls_to_anthropic_tool_use_blocks() is defined in libs/partners/anthropic/langchain_anthropic/chat_models.py at line 1891.
What calls _lc_tool_calls_to_anthropic_tool_use_blocks()?
_lc_tool_calls_to_anthropic_tool_use_blocks() is called by 1 function(s): _format_messages.

Analyze Your Own Codebase

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

Try Supermodel Free