mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(feat) redis-semantic cache on proxy
This commit is contained in:
parent
ee80987c8f
commit
a8d190f507
2 changed files with 5 additions and 1 deletions
|
@ -1168,7 +1168,7 @@ class ProxyConfig:
|
|||
|
||||
verbose_proxy_logger.debug(f"passed cache type={cache_type}")
|
||||
|
||||
if cache_type == "redis":
|
||||
if cache_type == "redis" or cache_type == "redis-semantic":
|
||||
cache_host = litellm.get_secret("REDIS_HOST", None)
|
||||
cache_port = litellm.get_secret("REDIS_PORT", None)
|
||||
cache_password = litellm.get_secret("REDIS_PASSWORD", None)
|
||||
|
@ -1195,6 +1195,9 @@ class ProxyConfig:
|
|||
f"{blue_color_code}Cache Password:{reset_color_code} {cache_password}"
|
||||
)
|
||||
print() # noqa
|
||||
if cache_type == "redis-semantic":
|
||||
# by default this should always be async
|
||||
cache_params.update({"redis_semantic_cache_use_async": True})
|
||||
|
||||
# users can pass os.environ/ variables on the proxy - we should read them from the env
|
||||
for key, value in cache_params.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue