test_llm_representation_for_serializable() — langchain Function Reference
Architecture documentation for the test_llm_representation_for_serializable() function in test_cache.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD cd2dfa1c_5772_544a_114c_53df55e238f2["test_llm_representation_for_serializable()"] 51f634bf_713d_3f19_d694_5c6ef3e59c57["test_cache.py"] cd2dfa1c_5772_544a_114c_53df55e238f2 -->|defined in| 51f634bf_713d_3f19_d694_5c6ef3e59c57 873a0144_ec7d_5873_8bb8_65ef4d23a42b["_get_llm_string()"] cd2dfa1c_5772_544a_114c_53df55e238f2 -->|calls| 873a0144_ec7d_5873_8bb8_65ef4d23a42b style cd2dfa1c_5772_544a_114c_53df55e238f2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/language_models/chat_models/test_cache.py lines 298–307
def test_llm_representation_for_serializable() -> None:
"""Test that the llm representation of a serializable chat model is correct."""
cache = InMemoryCache()
chat = CustomChat(cache=cache, messages=iter([]))
assert chat._get_llm_string() == (
'{"id": ["tests", "unit_tests", "language_models", "chat_models", '
'"test_cache", "CustomChat"], "kwargs": {"messages": {"id": '
'["builtins", "list_iterator"], "lc": 1, "type": "not_implemented"}}, "lc": '
'1, "name": "CustomChat", "type": "constructor"}---[(\'stop\', None)]'
)
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_llm_representation_for_serializable() do?
test_llm_representation_for_serializable() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/chat_models/test_cache.py.
Where is test_llm_representation_for_serializable() defined?
test_llm_representation_for_serializable() is defined in libs/core/tests/unit_tests/language_models/chat_models/test_cache.py at line 298.
What does test_llm_representation_for_serializable() call?
test_llm_representation_for_serializable() calls 1 function(s): _get_llm_string.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free