Home / Function/ test_model_response() — langchain Function Reference

test_model_response() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py lines 22–29

def test_model_response() -> None:
    parser = OpenAIFunctionsAgentOutputParser()
    msg = AIMessage(content="Model response.")
    result = parser.invoke(msg)

    assert isinstance(result, AgentFinish)
    assert result.return_values == {"output": "Model response."}
    assert result.log == "Model response."

Domain

Subdomains

Frequently Asked Questions

What does test_model_response() do?
test_model_response() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py.
Where is test_model_response() defined?
test_model_response() is defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_openai_functions.py at line 22.

Analyze Your Own Codebase

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

Try Supermodel Free