mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
(fix) semantic cache
This commit is contained in:
parent
2ad8b70f50
commit
553b993473
1 changed files with 4 additions and 1 deletions
|
|
@ -270,7 +270,10 @@ class RedisSemanticCache(BaseCache):
|
||||||
redis_url = "redis://:" + password + "@" + host + ":" + port
|
redis_url = "redis://:" + password + "@" + host + ":" + port
|
||||||
print_verbose(f"redis semantic-cache redis_url: {redis_url}")
|
print_verbose(f"redis semantic-cache redis_url: {redis_url}")
|
||||||
self.index.connect(redis_url=redis_url)
|
self.index.connect(redis_url=redis_url)
|
||||||
|
try:
|
||||||
self.index.create(overwrite=False) # don't overwrite existing index
|
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):
|
def _get_cache_logic(self, cached_response: Any):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue