mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
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 time, logging
|
||||
import json, traceback, ast
|
||||
from typing import Optional
|
||||
|
||||
def get_prompt(*args, **kwargs):
|
||||
# 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.
|
||||
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__()
|
||||
# If in_memory_cache is not provided, use the default InMemoryCache
|
||||
self.in_memory_cache = in_memory_cache or InMemoryCache()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue