From a75b70fbd69e047fc07fa496131508d862aa5aea Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 29 Jul 2024 08:19:30 -0700 Subject: [PATCH] fix(caching.py): support /completion caching by default updates supported call types in redis cache to cover text_completion caching --- litellm/caching.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/litellm/caching.py b/litellm/caching.py index 557a029d31..fa10095da2 100644 --- a/litellm/caching.py +++ b/litellm/caching.py @@ -1692,6 +1692,8 @@ class Cache: "aembedding", "atranscription", "transcription", + "atext_completion", + "text_completion", ] ] ] = [ @@ -1701,6 +1703,8 @@ class Cache: "aembedding", "atranscription", "transcription", + "atext_completion", + "text_completion", ], # s3 Bucket, boto3 configuration s3_bucket_name: Optional[str] = None, @@ -2235,6 +2239,8 @@ def enable_cache( "aembedding", "atranscription", "transcription", + "atext_completion", + "text_completion", ] ] ] = [ @@ -2244,6 +2250,8 @@ def enable_cache( "aembedding", "atranscription", "transcription", + "atext_completion", + "text_completion", ], **kwargs, ): @@ -2300,6 +2308,8 @@ def update_cache( "aembedding", "atranscription", "transcription", + "atext_completion", + "text_completion", ] ] ] = [ @@ -2309,6 +2319,8 @@ def update_cache( "aembedding", "atranscription", "transcription", + "atext_completion", + "text_completion", ], **kwargs, ):