forked from phoenix/litellm-mirror
Merge pull request #2542 from BerriAI/litellm_redis_perf_improvements
89% Caching improvement - Async Redis completion calls + batch redis GET requests for a given key + call type
This commit is contained in:
commit
4969ae0e9d
7 changed files with 287 additions and 116 deletions
|
@ -1798,6 +1798,16 @@ class ProxyConfig:
|
|||
_ENTERPRISE_PromptInjectionDetection()
|
||||
)
|
||||
imported_list.append(prompt_injection_detection_obj)
|
||||
elif (
|
||||
isinstance(callback, str)
|
||||
and callback == "batch_redis_requests"
|
||||
):
|
||||
from litellm.proxy.hooks.batch_redis_get import (
|
||||
_PROXY_BatchRedisRequests,
|
||||
)
|
||||
|
||||
batch_redis_obj = _PROXY_BatchRedisRequests()
|
||||
imported_list.append(batch_redis_obj)
|
||||
else:
|
||||
imported_list.append(
|
||||
get_instance_fn(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue