From aa4d049a48fa2791bbd2fdadde8e37b07319dd3d Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 25 Oct 2023 14:17:20 -0700 Subject: [PATCH] (docs) proxy server add caching flip per completion request --- docs/my-website/docs/simple_proxy.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index f51b6f2371..e7f4364397 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -2,7 +2,7 @@ import Image from '@theme/IdealImage'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# 💥 OpenAI Proxy Server - Deploy LiteLLM +# 💥 LiteLLM Server - Deploy LiteLLM A simple, fast, and lightweight **OpenAI-compatible server** to call 100+ LLM APIs in the OpenAI Input/Output format @@ -201,6 +201,30 @@ curl http://0.0.0.0:8000/v1/chat/completions \ ``` #### Control caching per completion request +Caching can be switched on/off per /chat/completions request +- Caching on for completion - pass `caching=True`: + ```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, + "caching": true + }' + ``` +- Caching off for completion - pass `caching=False`: + ```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, + "caching": false + }' + ``` +