test_func_call_oldstyle() — langchain Function Reference
Architecture documentation for the test_func_call_oldstyle() function in test_openai_functions_multi.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4535f167_64ff_3f42_c538_6b1be3971d44["test_func_call_oldstyle()"] 744eb6ed_e970_902c_3b2f_989585354200["TestParseAIMessage"] 4535f167_64ff_3f42_c538_6b1be3971d44 -->|defined in| 744eb6ed_e970_902c_3b2f_989585354200 style 4535f167_64ff_3f42_c538_6b1be3971d44 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/test_openai_functions_multi.py lines 56–77
def test_func_call_oldstyle(self) -> None:
act = json.dumps([{"action_name": "foo", "action": {"__arg1": "42"}}])
msg = AIMessage(
content="LLM thoughts.",
additional_kwargs={
"function_call": {"name": "foo", "arguments": f'{{"actions": {act}}}'},
},
)
result = _parse_ai_message(msg)
assert isinstance(result, list)
assert len(result) == 1
action = result[0]
assert isinstance(action, _FunctionsAgentAction)
assert action.tool == "foo"
assert action.tool_input == "42"
assert action.log == (
"\nInvoking: `foo` with `42`\nresponded: LLM thoughts.\n\n"
)
assert action.message_log == [msg]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_func_call_oldstyle() do?
test_func_call_oldstyle() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_openai_functions_multi.py.
Where is test_func_call_oldstyle() defined?
test_func_call_oldstyle() is defined in libs/langchain/tests/unit_tests/agents/test_openai_functions_multi.py at line 56.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free