Home / Function/ test_openai_openapi_chain() — langchain Function Reference

test_openai_openapi_chain() — langchain Function Reference

Architecture documentation for the test_openai_openapi_chain() function in test_openapi.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b412caaf_3d53_0f5e_45a9_1a80aacaa1e8["test_openai_openapi_chain()"]
  d268177d_75cb_ff27_f301_f76859c5cce5["test_openapi.py"]
  b412caaf_3d53_0f5e_45a9_1a80aacaa1e8 -->|defined in| d268177d_75cb_ff27_f301_f76859c5cce5
  style b412caaf_3d53_0f5e_45a9_1a80aacaa1e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/integration_tests/chains/openai_functions/test_openapi.py lines 33–39

def test_openai_openapi_chain() -> None:
    from langchain_openai import ChatOpenAI

    llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
    chain = get_openapi_chain(json.dumps(api_spec), llm)
    output = chain.invoke({"query": "Fetch the top two posts."})
    assert len(output["response"]) == 2

Domain

Subdomains

Frequently Asked Questions

What does test_openai_openapi_chain() do?
test_openai_openapi_chain() is a function in the langchain codebase, defined in libs/langchain/tests/integration_tests/chains/openai_functions/test_openapi.py.
Where is test_openai_openapi_chain() defined?
test_openai_openapi_chain() is defined in libs/langchain/tests/integration_tests/chains/openai_functions/test_openapi.py at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free