test_loads_with_missing_secrets() — langchain Function Reference
Architecture documentation for the test_loads_with_missing_secrets() function in test_load.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5ac902aa_7bfb_5d98_23d1_80e51a7eae5b["test_loads_with_missing_secrets()"] 0b08876e_5a62_23f2_8ed5_ec59f46366a7["test_load.py"] 5ac902aa_7bfb_5d98_23d1_80e51a7eae5b -->|defined in| 0b08876e_5a62_23f2_8ed5_ec59f46366a7 style 5ac902aa_7bfb_5d98_23d1_80e51a7eae5b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/load/test_load.py lines 179–196
def test_loads_with_missing_secrets() -> None:
import openai
llm_string = (
"{"
'"lc": 1, '
'"type": "constructor", '
'"id": ["langchain", "llms", "openai", "OpenAI"], '
'"kwargs": {'
'"model_name": "davinci", "temperature": 0.5, "max_tokens": 256, "top_p": 0.8, '
'"n": 1, "best_of": 1, '
'"openai_api_key": {"lc": 1, "type": "secret", "id": ["OPENAI_API_KEY"]}, '
'"batch_size": 20, "max_retries": 2, "disallowed_special": "all"}, '
'"name": "OpenAI"}'
)
# Should throw on instantiation, not deserialization
with pytest.raises(openai.OpenAIError):
loads(llm_string)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_loads_with_missing_secrets() do?
test_loads_with_missing_secrets() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/load/test_load.py.
Where is test_loads_with_missing_secrets() defined?
test_loads_with_missing_secrets() is defined in libs/langchain/tests/unit_tests/load/test_load.py at line 179.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free