in debug mode add a log about rate limit error

pull/1683/head
hyaxia 2023-04-15 22:06:27 +03:00
parent 1073954fb7
commit 051b5372ce
1 changed files with 5 additions and 0 deletions

View File

@ -95,6 +95,11 @@ def create_chat_completion(
) )
break break
except RateLimitError: except RateLimitError:
if CFG.debug_mode:
print(
Fore.RED + "Error: ",
f"Reached rate limit. Waiting {backoff} seconds..." + Fore.RESET,
)
pass pass
except APIError as e: except APIError as e:
if e.http_status == 502: if e.http_status == 502: