Home / Function/ tool_call_chunk() — langchain Function Reference

tool_call_chunk() — langchain Function Reference

Architecture documentation for the tool_call_chunk() function in tool.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  324c57b2_251d_2acd_a774_42bda6d93a27["tool_call_chunk()"]
  677a6c57_8e95_8da3_2ffb_b8d42a33d6cc["tool.py"]
  324c57b2_251d_2acd_a774_42bda6d93a27 -->|defined in| 677a6c57_8e95_8da3_2ffb_b8d42a33d6cc
  64d91638_f454_5ccd_e3b1_0a8f5b8ba3fb["default_tool_chunk_parser()"]
  64d91638_f454_5ccd_e3b1_0a8f5b8ba3fb -->|calls| 324c57b2_251d_2acd_a774_42bda6d93a27
  style 324c57b2_251d_2acd_a774_42bda6d93a27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/messages/tool.py lines 303–323

def tool_call_chunk(
    *,
    name: str | None = None,
    args: str | None = None,
    id: str | None = None,
    index: int | None = None,
) -> ToolCallChunk:
    """Create a tool call chunk.

    Args:
        name: The name of the tool to be called.
        args: The arguments to the tool call as a JSON string.
        id: An identifier associated with the tool call.
        index: The index of the tool call in a sequence.

    Returns:
        The created tool call chunk.
    """
    return ToolCallChunk(
        name=name, args=args, id=id, index=index, type="tool_call_chunk"
    )

Domain

Subdomains

Frequently Asked Questions

What does tool_call_chunk() do?
tool_call_chunk() is a function in the langchain codebase, defined in libs/core/langchain_core/messages/tool.py.
Where is tool_call_chunk() defined?
tool_call_chunk() is defined in libs/core/langchain_core/messages/tool.py at line 303.
What calls tool_call_chunk()?
tool_call_chunk() is called by 1 function(s): default_tool_chunk_parser.

Analyze Your Own Codebase

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

Try Supermodel Free