Home / Function/ _validate_tool_call_message_no_args() — langchain Function Reference

_validate_tool_call_message_no_args() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  54f514b4_9301_1102_df9e_06f10a786ff1["_validate_tool_call_message_no_args()"]
  c97ed773_97f8_2190_c0e8_546293fe345b["chat_models.py"]
  54f514b4_9301_1102_df9e_06f10a786ff1 -->|defined in| c97ed773_97f8_2190_c0e8_546293fe345b
  776f8723_e2e5_9360_49c9_b663d4402396["test_tool_calling_with_no_arguments()"]
  776f8723_e2e5_9360_49c9_b663d4402396 -->|calls| 54f514b4_9301_1102_df9e_06f10a786ff1
  style 54f514b4_9301_1102_df9e_06f10a786ff1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/standard-tests/langchain_tests/integration_tests/chat_models.py lines 132–140

def _validate_tool_call_message_no_args(message: BaseMessage) -> None:
    assert isinstance(message, AIMessage)
    assert len(message.tool_calls) == 1

    tool_call = message.tool_calls[0]
    assert tool_call["name"] == "magic_function_no_args"
    assert tool_call["args"] == {}
    assert tool_call["id"] is not None
    assert tool_call.get("type") == "tool_call"

Domain

Subdomains

Frequently Asked Questions

What does _validate_tool_call_message_no_args() do?
_validate_tool_call_message_no_args() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/integration_tests/chat_models.py.
Where is _validate_tool_call_message_no_args() defined?
_validate_tool_call_message_no_args() is defined in libs/standard-tests/langchain_tests/integration_tests/chat_models.py at line 132.
What calls _validate_tool_call_message_no_args()?
_validate_tool_call_message_no_args() is called by 1 function(s): test_tool_calling_with_no_arguments.

Analyze Your Own Codebase

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

Try Supermodel Free