mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
Merge ef4f1bdba1 into 090a4c3f24
This commit is contained in:
commit
393cb065fa
1 changed files with 5 additions and 4 deletions
|
|
@ -1045,9 +1045,12 @@ class Router:
|
|||
self.deployment_names: list = [] # names of models under litellm_params. ex. azure/chatgpt-v-2
|
||||
self.deployment_latency_map = {}
|
||||
### CACHING ###
|
||||
cache_type: Literal["local", "redis", "redis-semantic", "s3", "disk"] = "local" # default to an in-memory cache
|
||||
cache_type: Literal["local", "redis", "redis-semantic", "s3", "disk"] = "local"
|
||||
redis_cache = None
|
||||
cache_config: Final[dict[str, Any]] = {}
|
||||
cache_config: dict[str, Any] = {}
|
||||
|
||||
cache_config.update(cache_kwargs)
|
||||
cache_type = cache_config.pop("type", cache_type)
|
||||
|
||||
self.client_ttl = client_ttl
|
||||
if redis_url is not None or (redis_host is not None and redis_port is not None):
|
||||
|
|
@ -1071,8 +1074,6 @@ class Router:
|
|||
)
|
||||
cache_config["db"] = str(redis_db)
|
||||
|
||||
# Add additional key-value pairs from cache_kwargs
|
||||
cache_config.update(cache_kwargs)
|
||||
redis_cache = self._create_redis_cache(cache_config)
|
||||
|
||||
if cache_responses:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue