mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-19 10:14:46 +00:00
add comment and align time from gen and stream to 30mins
This commit is contained in:
1 parent
8ce1fd561d
commit
f5661b3b1e
3 files changed
+4
-9862
No files matched your search
@@ -70,7 +70,10 @@ def gen_cache(func):
|
|||||||
return cached_response.decode('utf-8')
|
return cached_response.decode('utf-8')
|
||||||
|
|
||||||
result = func(self, model, messages, *args, **kwargs)
|
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
|
return result
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
|||||||
Generated
-9849
File diff suppressed because it is too large.
Load diff
-12
@@ -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
|
|
||||||
Reference in new issue
Block a user