MCPcopy
hub / github.com/langroid/langroid / _store_client

Function _store_client

langroid/language_models/client_cache.py:65–71  ·  view source on GitHub ↗

Store a client in the cache with the current timestamp. Must be called while holding ``_client_cache_lock``.

(cache_key: str, client: Any)

Source from the content-addressed store, hash-verified

63
64
65def _store_client(cache_key: str, client: Any) -> None:
66 """Store a client in the cache with the current timestamp.
67
68 Must be called while holding ``_client_cache_lock``.
69 """
70 _client_cache[cache_key] = (client, time.monotonic())
71 _all_clients.add(client)
72
73
74def get_openai_client(

Callers 6

get_openai_clientFunction · 0.85
get_async_openai_clientFunction · 0.85
get_groq_clientFunction · 0.85
get_async_groq_clientFunction · 0.85
get_cerebras_clientFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…