Home / Function/ test_load_openai_llm() — langchain Function Reference

test_load_openai_llm() — langchain Function Reference

Architecture documentation for the test_load_openai_llm() function in test_load.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7ea0afab_ae62_23bc_d6d8_b3a3ef4d9620["test_load_openai_llm()"]
  f594231b_8e8d_61b8_e688_99b6f31430d1["test_load.py"]
  7ea0afab_ae62_23bc_d6d8_b3a3ef4d9620 -->|defined in| f594231b_8e8d_61b8_e688_99b6f31430d1
  style 7ea0afab_ae62_23bc_d6d8_b3a3ef4d9620 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/test_load.py lines 24–35

def test_load_openai_llm() -> None:
    llm = OpenAI(model="davinci", temperature=0.5, openai_api_key="hello")  # type: ignore[call-arg]
    llm_obj = dumpd(llm)
    llm2 = load(
        llm_obj,
        secrets_map={"OPENAI_API_KEY": "hello"},
        allowed_objects=[OpenAI],
    )

    assert llm2.dict() == llm.dict()
    assert dumpd(llm2) == llm_obj
    assert isinstance(llm2, OpenAI)

Domain

Subdomains

Frequently Asked Questions

What does test_load_openai_llm() do?
test_load_openai_llm() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/test_load.py.
Where is test_load_openai_llm() defined?
test_load_openai_llm() is defined in libs/partners/openai/tests/unit_tests/test_load.py at line 24.

Analyze Your Own Codebase

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

Try Supermodel Free