fix old code in completions

This commit is contained in:
Cyberes 2023-10-19 17:59:27 -06:00
parent b9566e9db7
commit 6e74ce7c28
1 changed files with 4 additions and 3 deletions

View File

@ -84,9 +84,10 @@ def openai_completions(model_name=None):
} }
}) })
stats = redis.get('proxy_stats', dtype=dict) # TODO:
if stats: # stats = redis.get('proxy_stats', dtype=dict)
response.headers['x-ratelimit-reset-requests'] = stats['queue']['estimated_wait_sec'] # if stats:
# response.headers['x-ratelimit-reset-requests'] = stats['queue']['estimated_wait_sec']
return response, 200 return response, 200
else: else:
if not opts.enable_streaming: if not opts.enable_streaming: