mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) semantic cache
This commit is contained in:
parent
81f8ac00b2
commit
ccc94128d3
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue