add comment and align time from gen and stream to 30mins

This commit is contained in:
fadingNA
2024-10-14 12:09:13 -04:00
parent 8ce1fd561d
commit f5661b3b1e
3 changed files with 4 additions and 9862 deletions

View File

@@ -70,7 +70,10 @@ def gen_cache(func):
return cached_response.decode('utf-8')
result = func(self, model, messages, *args, **kwargs)
redis_client.set(cache_key, result, ex=3600)
# expire the cache after 30 minutes
# set time in seconds
redis_client.set(cache_key, result, ex=1800)
return result
except ValueError as e:

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +0,0 @@
Base URL:http://petstore.swagger.io,https://api.example.com
Path1: /pets
description: None
parameters: []
methods:
get=A paged array of pets
post=Null response
Path2: /pets/{petId}
description: None
parameters: []
methods:
get=Expected response to a valid request