test_func_call() — langchain Function Reference
Architecture documentation for the test_func_call() function in test_openai_functions.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1a73634d_063e_ca04_9aee_04eb61b6ff1a["test_func_call()"] 1fe72b94_a8cc_d072_fc0a_71824fccb3c3["test_openai_functions.py"] 1a73634d_063e_ca04_9aee_04eb61b6ff1a -->|defined in| 1fe72b94_a8cc_d072_fc0a_71824fccb3c3 style 1a73634d_063e_ca04_9aee_04eb61b6ff1a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py lines 33–49
def test_func_call() -> None:
parser = OpenAIFunctionsAgentOutputParser()
msg = AIMessage(
content="LLM thoughts.",
additional_kwargs={
"function_call": {"name": "foo", "arguments": '{"param": 42}'},
},
)
result = parser.invoke(msg)
assert isinstance(result, AgentActionMessageLog)
assert result.tool == "foo"
assert result.tool_input == {"param": 42}
assert result.log == (
"\nInvoking: `foo` with `{'param': 42}`\nresponded: LLM thoughts.\n\n"
)
assert result.message_log == [msg]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_func_call() do?
test_func_call() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py.
Where is test_func_call() defined?
test_func_call() is defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py at line 33.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free