From efe6fb883148387aaebd532da9e13a01b64605b4 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 23 Nov 2023 10:35:34 -0800 Subject: [PATCH] (docs) proxy server caching --- docs/my-website/docs/simple_proxy.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index 713de7ae43..1048ffd839 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -872,8 +872,22 @@ $ litellm --config /path/to/config.yaml ``` ## Caching Responses +Caching can be enabled by adding the `cache` key in the `config.yaml` +#### Step 1: Add `cache` to the config.yaml +```yaml +model_list: + - model_name: gpt-3.5-turbo + litellm_params: + model: gpt-3.5-turbo -Enable caching by adding the following credentials to your server environment +litellm_settings: + set_verbose: True + cache: # init cache + type: redis # tell litellm to use redis caching +``` + +#### Step 2: Add Redis Credentials to .env +LiteLLM requires the following REDIS credentials in your env to enable caching ```shell REDIS_HOST = "" # REDIS_HOST='redis-18841.c274.us-east-1-3.ec2.cloud.redislabs.com'