_make_func_invocation() — langchain Function Reference
Architecture documentation for the _make_func_invocation() function in test_agent.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 29ab623b_0297_07ba_a564_05f00fcf9b12["_make_func_invocation()"] 47a7b285_8e60_f78f_282d_429958c446fa["test_agent.py"] 29ab623b_0297_07ba_a564_05f00fcf9b12 -->|defined in| 47a7b285_8e60_f78f_282d_429958c446fa 3fe24fd2_57d5_7278_725d_f532b8fd70bc["test_openai_agent_with_streaming()"] 3fe24fd2_57d5_7278_725d_f532b8fd70bc -->|calls| 29ab623b_0297_07ba_a564_05f00fcf9b12 style 29ab623b_0297_07ba_a564_05f00fcf9b12 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/test_agent.py lines 790–808
def _make_func_invocation(name: str, **kwargs: Any) -> AIMessage:
"""Create an AIMessage that represents a function invocation.
Args:
name: Name of the function to invoke.
kwargs: Keyword arguments to pass to the function.
Returns:
AIMessage that represents a request to invoke a function.
"""
return AIMessage(
content="",
additional_kwargs={
"function_call": {
"name": name,
"arguments": json.dumps(kwargs),
},
},
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _make_func_invocation() do?
_make_func_invocation() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_agent.py.
Where is _make_func_invocation() defined?
_make_func_invocation() is defined in libs/langchain/tests/unit_tests/agents/test_agent.py at line 790.
What calls _make_func_invocation()?
_make_func_invocation() is called by 1 function(s): test_openai_agent_with_streaming.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free