MCPcopy
hub / github.com/langchain-ai/langchain / llm_cache

Function llm_cache

libs/partners/mongodb/tests/unit_tests/test_cache.py:70–81  ·  view source on GitHub ↗
(cls: Any)

Source from the content-addressed store, hash-verified

68
69
70def llm_cache(cls: Any) -> BaseCache:
71 set_llm_cache(
72 cls(
73 embedding=ConsistentFakeEmbeddings(dimensionality=1536),
74 connection_string=CONN_STRING,
75 collection_name=COLLECTION,
76 database_name=DATABASE,
77 wait_until_ready=True,
78 )
79 )
80 assert get_llm_cache()
81 return get_llm_cache()
82
83
84def _execute_test(

Callers 2

test_mongodb_cacheFunction · 0.70

Calls 3

set_llm_cacheFunction · 0.90
get_llm_cacheFunction · 0.90

Tested by

no test coverage detected