From 72a665591dd82fb1422ebd15648303bf5952e28a Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 14 Dec 2023 22:41:25 +0530 Subject: [PATCH] (docs) cache init params --- docs/my-website/docs/caching/redis_cache.md | 34 ++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/caching/redis_cache.md b/docs/my-website/docs/caching/redis_cache.md index 521c4d00ffd..556e203af23 100644 --- a/docs/my-website/docs/caching/redis_cache.md +++ b/docs/my-website/docs/caching/redis_cache.md @@ -78,4 +78,36 @@ Example response with cache hit 'usage': {'prompt_tokens': 17, 'completion_tokens': 59, 'total_tokens': 76}, } -``` \ No newline at end of file +``` + + +## 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.