forked from phoenix/litellm-mirror
fix(caching.py): fix linting issues
This commit is contained in:
parent
b10102c285
commit
87aa36a2ec
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
import litellm
|
import litellm
|
||||||
import time, logging
|
import time, logging
|
||||||
import json, traceback, ast
|
import json, traceback, ast
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
def get_prompt(*args, **kwargs):
|
def get_prompt(*args, **kwargs):
|
||||||
# make this safe checks, it should not throw any exceptions
|
# make this safe checks, it should not throw any exceptions
|
||||||
|
@ -102,7 +103,7 @@ class DualCache(BaseCache):
|
||||||
When data is updated or inserted, it is written to both the in-memory cache + Redis.
|
When data is updated or inserted, it is written to both the in-memory cache + Redis.
|
||||||
This ensures that even if Redis hasn't been updated yet, the in-memory cache reflects the most recent data.
|
This ensures that even if Redis hasn't been updated yet, the in-memory cache reflects the most recent data.
|
||||||
"""
|
"""
|
||||||
def __init__(self, in_memory_cache: InMemoryCache =None, redis_cache: RedisCache =None) -> None:
|
def __init__(self, in_memory_cache: Optional[InMemoryCache] =None, redis_cache: Optional[RedisCache] =None) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
# If in_memory_cache is not provided, use the default InMemoryCache
|
# If in_memory_cache is not provided, use the default InMemoryCache
|
||||||
self.in_memory_cache = in_memory_cache or InMemoryCache()
|
self.in_memory_cache = in_memory_cache or InMemoryCache()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue