test_loads_openai_llm() — langchain Function Reference
Architecture documentation for the test_loads_openai_llm() function in test_load.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c9fdf70a_af7b_e2e8_9953_d8a4e1b5ddd2["test_loads_openai_llm()"] f594231b_8e8d_61b8_e688_99b6f31430d1["test_load.py"] c9fdf70a_af7b_e2e8_9953_d8a4e1b5ddd2 -->|defined in| f594231b_8e8d_61b8_e688_99b6f31430d1 style c9fdf70a_af7b_e2e8_9953_d8a4e1b5ddd2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/unit_tests/test_load.py lines 9–21
def test_loads_openai_llm() -> None:
llm = OpenAI(model="davinci", temperature=0.5, openai_api_key="hello", top_p=0.8) # type: ignore[call-arg]
llm_string = dumps(llm)
llm2 = loads(
llm_string,
secrets_map={"OPENAI_API_KEY": "hello"},
allowed_objects=[OpenAI],
)
assert llm2.dict() == llm.dict()
llm_string_2 = dumps(llm2)
assert llm_string_2 == llm_string
assert isinstance(llm2, OpenAI)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_loads_openai_llm() do?
test_loads_openai_llm() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/test_load.py.
Where is test_loads_openai_llm() defined?
test_loads_openai_llm() is defined in libs/partners/openai/tests/unit_tests/test_load.py at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free