From ade1e6e5c00b5c4b4e353f9dce984dccd00626c7 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 2 Oct 2023 12:14:27 -0700 Subject: [PATCH] Update README.md --- README.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index da8328edc..d1f480079 100644 --- a/README.md +++ b/README.md @@ -78,21 +78,14 @@ LiteLLM supports caching `completion()` and `embedding()` calls for all LLMs ```python import litellm from litellm.caching import Cache -litellm.cache = Cache(type="hosted") # init cache to use api.litellm.ai +litellm.cache = Cache() # init cache to use api.litellm.ai -# Make completion calls +# stores this response in cache response1 = litellm.completion( model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Tell me a joke."}] caching=True ) - -response2 = litellm.completion( - model="gpt-3.5-turbo", - messages=[{"role": "user", "content": "Tell me a joke."}], - caching=True -) -# response1 == response2, response 1 is cached ``` ## OpenAI Proxy Server ([Docs](https://docs.litellm.ai/docs/proxy_server))