mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Update caching.md
update caching.md
This commit is contained in:
parent
71501d5b7a
commit
d4ae1295dd
1 changed files with 9 additions and 0 deletions
|
|
@ -390,6 +390,11 @@ $ litellm --config /path/to/config.yaml
|
|||
|
||||
Caching can be enabled by adding the `cache` key in the `config.yaml`
|
||||
|
||||
Install redisvl client if missing in requirements.txt
|
||||
```shell
|
||||
pip install redisvl==0.12.1
|
||||
```
|
||||
|
||||
#### Step 1: Add `cache` to the config.yaml
|
||||
```yaml
|
||||
model_list:
|
||||
|
|
@ -410,6 +415,10 @@ litellm_settings:
|
|||
type: "redis-semantic"
|
||||
similarity_threshold: 0.8 # similarity threshold for semantic cache
|
||||
redis_semantic_cache_embedding_model: azure-embedding-model # set this to a model_name set in model_list
|
||||
redis_semantic_cache_index_name: litellm-redis-semantic-cache-index # OPTIONAL, default is litellm_semantic_cache_index
|
||||
embedding_cache_enabled: True # OPTIONAL, default is False
|
||||
embedding_cache_ttl: 120 # OPTIONAL, default is None
|
||||
embedding_cache_name: litellm-embeddings-cache # OPTIONAL, default is litellm_redis_semantic_embeddings_cache
|
||||
```
|
||||
|
||||
#### Step 2: Add Redis Credentials to .env
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue