test_multiple_tool_calls() — langchain Function Reference
Architecture documentation for the test_multiple_tool_calls() function in test_function_calling.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1ccaf121_a0cf_d832_2d03_de2bd568caa3["test_multiple_tool_calls()"] 6f1e8e6f_d3f9_e590_b17e_1dc8afafdbe0["test_function_calling.py"] 1ccaf121_a0cf_d832_2d03_de2bd568caa3 -->|defined in| 6f1e8e6f_d3f9_e590_b17e_1dc8afafdbe0 style 1ccaf121_a0cf_d832_2d03_de2bd568caa3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/utils/test_function_calling.py lines 718–749
def test_multiple_tool_calls() -> None:
messages = tool_example_to_messages(
input="This is an example",
tool_calls=[
FakeCall(data="ToolCall1"),
FakeCall(data="ToolCall2"),
FakeCall(data="ToolCall3"),
],
)
assert len(messages) == 5
assert isinstance(messages[0], HumanMessage)
assert isinstance(messages[1], AIMessage)
assert isinstance(messages[2], ToolMessage)
assert isinstance(messages[3], ToolMessage)
assert isinstance(messages[4], ToolMessage)
assert messages[1].additional_kwargs["tool_calls"] == [
{
"id": messages[2].tool_call_id,
"type": "function",
"function": {"name": "FakeCall", "arguments": '{"data":"ToolCall1"}'},
},
{
"id": messages[3].tool_call_id,
"type": "function",
"function": {"name": "FakeCall", "arguments": '{"data":"ToolCall2"}'},
},
{
"id": messages[4].tool_call_id,
"type": "function",
"function": {"name": "FakeCall", "arguments": '{"data":"ToolCall3"}'},
},
]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_multiple_tool_calls() do?
test_multiple_tool_calls() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_function_calling.py.
Where is test_multiple_tool_calls() defined?
test_multiple_tool_calls() is defined in libs/core/tests/unit_tests/utils/test_function_calling.py at line 718.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free