Home / Function/ make_invalid_tool_call() — langchain Function Reference

make_invalid_tool_call() — langchain Function Reference

Architecture documentation for the make_invalid_tool_call() function in openai_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ec766e47_efc7_7ba6_9882_8b6eca6b254f["make_invalid_tool_call()"]
  c3f63ac2_81c2_ae51_1450_844466073e29["openai_tools.py"]
  ec766e47_efc7_7ba6_9882_8b6eca6b254f -->|defined in| c3f63ac2_81c2_ae51_1450_844466073e29
  style ec766e47_efc7_7ba6_9882_8b6eca6b254f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/output_parsers/openai_tools.py lines 81–99

def make_invalid_tool_call(
    raw_tool_call: dict[str, Any],
    error_msg: str | None,
) -> InvalidToolCall:
    """Create an `InvalidToolCall` from a raw tool call.

    Args:
        raw_tool_call: The raw tool call.
        error_msg: The error message.

    Returns:
        An `InvalidToolCall` instance with the error message.
    """
    return invalid_tool_call(
        name=raw_tool_call["function"]["name"],
        args=raw_tool_call["function"]["arguments"],
        id=raw_tool_call.get("id"),
        error=error_msg,
    )

Domain

Subdomains

Frequently Asked Questions

What does make_invalid_tool_call() do?
make_invalid_tool_call() is a function in the langchain codebase, defined in libs/core/langchain_core/output_parsers/openai_tools.py.
Where is make_invalid_tool_call() defined?
make_invalid_tool_call() is defined in libs/core/langchain_core/output_parsers/openai_tools.py at line 81.

Analyze Your Own Codebase

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

Try Supermodel Free