fix(openaicaller.py): improve error message when APIError occurs to clarify that it is OpenAI's fault and apologize for the inconvenience

This commit is contained in:
Paillat
2023-07-19 17:00:55 +02:00
parent 6672bd2582
commit 407cc40dbe

View File

@@ -123,7 +123,7 @@ class openai_caller:
f"\n\n{bcolors.BOLD}{bcolors.WARNING}APIError. This is not your fault. Retrying...{bcolors.ENDC}" f"\n\n{bcolors.BOLD}{bcolors.WARNING}APIError. This is not your fault. Retrying...{bcolors.ENDC}"
) )
await recall_func( await recall_func(
"`An APIError occurred. This is not your fault. Retrying...`" "`An APIError occurred. This is not your fault, it is OpenAI's fault. We apologize for the inconvenience. Retrying...`"
) )
await asyncio.sleep(10) await asyncio.sleep(10)
await recall_func() await recall_func()