Merge cluster to master #3

Merged
cyberes merged 163 commits from cluster into master 2023-10-27 19:19:22 -06:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit b76e77a66a - Show all commits

View File

@ -78,8 +78,9 @@ class OpenAIRequestHandler(RequestHandler):
def handle_ratelimited(self, do_log: bool = True):
print('OAI ratelimited:', self.client_ip, self.request.headers)
_, default_model = get_model_choices()
w = int(default_model['estimated_wait']) if default_model['estimated_wait'] > 0 else 2
model_choices, default_model = get_model_choices()
default_model_info = model_choices[default_model]
w = int(default_model_info['estimated_wait']) if default_model_info['estimated_wait'] > 0 else 2
response = jsonify({
"error": {
"message": "Rate limit reached on tokens per min. Limit: 10000 / min. Please try again in 6s. Contact us through our help center at help.openai.com if you continue to have issues.",