From 43647b4a4c701830634c222330ae4b662858730f Mon Sep 17 00:00:00 2001 From: semio Date: Fri, 29 Nov 2024 01:09:37 +0800 Subject: [PATCH] add 60 days ttl to keys because the default for new litellm config is too low --- .../yival_experiments/custom_configuration/model_compare.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/automation-api/yival_experiments/custom_configuration/model_compare.py b/automation-api/yival_experiments/custom_configuration/model_compare.py index 2e6b331..bda2611 100644 --- a/automation-api/yival_experiments/custom_configuration/model_compare.py +++ b/automation-api/yival_experiments/custom_configuration/model_compare.py @@ -45,7 +45,9 @@ # enable caching in the evaluator. # litellm.cache = litellm.Cache() # to not use Redis for caching: uncomment the line above and comment the line below. -litellm.cache = litellm.Cache(type="redis", host="127.0.0.1", port=26379) +litellm.cache = litellm.Cache( + type="redis", host="127.0.0.1", port=26379, ttl=60 * 24 * 3600 +) def model_compare(