Home / Function/ test_func_call_oldstyle() — langchain Function Reference

test_func_call_oldstyle() — langchain Function Reference

Architecture documentation for the test_func_call_oldstyle() function in test_openai_functions.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  4abdbee3_d3c0_a5d3_1b85_0943619738c4["test_func_call_oldstyle()"]
  1fe72b94_a8cc_d072_fc0a_71824fccb3c3["test_openai_functions.py"]
  4abdbee3_d3c0_a5d3_1b85_0943619738c4 -->|defined in| 1fe72b94_a8cc_d072_fc0a_71824fccb3c3
  style 4abdbee3_d3c0_a5d3_1b85_0943619738c4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py lines 69–83

def test_func_call_oldstyle() -> None:
    parser = OpenAIFunctionsAgentOutputParser()
    msg = AIMessage(
        content="LLM thoughts.",
        additional_kwargs={
            "function_call": {"name": "foo", "arguments": '{"__arg1": "42"}'},
        },
    )
    result = parser.invoke(msg)

    assert isinstance(result, AgentActionMessageLog)
    assert result.tool == "foo"
    assert result.tool_input == "42"
    assert result.log == "\nInvoking: `foo` with `42`\nresponded: LLM thoughts.\n\n"
    assert result.message_log == [msg]

Domain

Subdomains

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/output_parsers/test_openai_functions.py.
Where is test_func_call_oldstyle() defined?
test_func_call_oldstyle() is defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py at line 69.

Analyze Your Own Codebase

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

Try Supermodel Free