mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-15 02:19:37 +00:00
(fix) semantic cache
This commit is contained in:
committed by
Krrish Dholakia
parent
2ad8b70f50
commit
553b993473
+4
-1
@@ -270,7 +270,10 @@ class RedisSemanticCache(BaseCache):
|
||||
redis_url = "redis://:" + password + "@" + host + ":" + port
|
||||
print_verbose(f"redis semantic-cache redis_url: {redis_url}")
|
||||
self.index.connect(redis_url=redis_url)
|
||||
self.index.create(overwrite=False) # don't overwrite existing index
|
||||
try:
|
||||
self.index.create(overwrite=False) # don't overwrite existing index
|
||||
except Exception as e:
|
||||
print_verbose(f"Got exception creating semantic cache index: {str(e)}")
|
||||
|
||||
def _get_cache_logic(self, cached_response: Any):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user