Store a client in the cache with the current timestamp. Must be called while holding ``_client_cache_lock``.
(cache_key: str, client: Any)
| 63 | |
| 64 | |
| 65 | def _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 | |
| 74 | def get_openai_client( |
no test coverage detected
searching dependent graphs…