mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
(docs) cache init params
This commit is contained in:
parent
4b3ef49d60
commit
72a665591d
1 changed files with 33 additions and 1 deletions
|
|
@ -78,4 +78,36 @@ Example response with cache hit
|
|||
'usage': {'prompt_tokens': 17, 'completion_tokens': 59, 'total_tokens': 76},
|
||||
}
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
## Cache Initialization Parameters
|
||||
|
||||
#### `type` (str, optional)
|
||||
|
||||
The type of cache to initialize. It can be either "local" or "redis". Defaults to "local".
|
||||
|
||||
#### `host` (str, optional)
|
||||
|
||||
The host address for the Redis cache. This parameter is required if the `type` is set to "redis".
|
||||
|
||||
#### `port` (int, optional)
|
||||
|
||||
The port number for the Redis cache. This parameter is required if the `type` is set to "redis".
|
||||
|
||||
#### `password` (str, optional)
|
||||
|
||||
The password for the Redis cache. This parameter is required if the `type` is set to "redis".
|
||||
|
||||
#### `supported_call_types` (list, optional)
|
||||
|
||||
A list of call types to cache for. Defaults to caching for all call types. The available call types are:
|
||||
|
||||
- "completion"
|
||||
- "acompletion"
|
||||
- "embedding"
|
||||
- "aembedding"
|
||||
|
||||
#### `**kwargs` (additional keyword arguments)
|
||||
|
||||
Additional keyword arguments are accepted for the initialization of the Redis cache using the `redis.Redis()` constructor. These arguments allow you to fine-tune the Redis cache configuration based on your specific needs.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue