fix(caching.py): support ttl, s-max-age, and no-cache cache controls

https://github.com/BerriAI/litellm/issues/1306
This commit is contained in:
Krrish Dholakia 2024-01-03 12:42:30 +05:30
parent 8772d87947
commit 8cee267a5b
5 changed files with 182 additions and 76 deletions

View file

@ -468,6 +468,7 @@ def completion(
"preset_cache_key",
"caching_groups",
"ttl",
"cache",
]
default_params = openai_params + litellm_params
non_default_params = {
@ -2209,6 +2210,7 @@ def embedding(
"preset_cache_key",
"caching_groups",
"ttl",
"cache",
]
default_params = openai_params + litellm_params
non_default_params = {
@ -2904,6 +2906,7 @@ def image_generation(
"preset_cache_key",
"caching_groups",
"ttl",
"cache",
]
default_params = openai_params + litellm_params
non_default_params = {