diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index d09140e16..f51b6f237 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -172,9 +172,7 @@ On a successfull deploy https://dashboard.render.com/ should display the followi ## Advanced ### Caching - Completion() and Embedding() Responses -#### Caching on Redis -In order to enable Redis caching: -- Add the following credentials to your server environment - litellm will begin caching your responses +Enable caching by adding the following credentials to your server environment ``` REDIS_HOST = "" # REDIS_HOST='redis-18841.c274.us-east-1-3.ec2.cloud.redislabs.com' @@ -182,6 +180,28 @@ In order to enable Redis caching: REDIS_PASSWORD = "" # REDIS_PASSWORD='liteLlmIsAmazing' ``` +#### Test Caching +Send the same request twice: +```shell +curl http://0.0.0.0:8000/v1/chat/completions \ + -H "Content-Type: application/json" \ + -d '{ + "model": "gpt-3.5-turbo", + "messages": [{"role": "user", "content": "write a poem about litellm!"}], + "temperature": 0.7 + }' + +curl http://0.0.0.0:8000/v1/chat/completions \ + -H "Content-Type: application/json" \ + -d '{ + "model": "gpt-3.5-turbo", + "messages": [{"role": "user", "content": "write a poem about litellm!"}], + "temperature": 0.7 + }' +``` + +#### Control caching per completion request +