From 051b5372cec13b6f9031e0f678fc8fd5eaf60ac2 Mon Sep 17 00:00:00 2001 From: hyaxia Date: Sat, 15 Apr 2023 22:06:27 +0300 Subject: [PATCH 1/3] in debug mode add a log about rate limit error --- autogpt/llm_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autogpt/llm_utils.py b/autogpt/llm_utils.py index f2418b65..aafa84b3 100644 --- a/autogpt/llm_utils.py +++ b/autogpt/llm_utils.py @@ -95,6 +95,11 @@ def create_chat_completion( ) break except RateLimitError: + if CFG.debug_mode: + print( + Fore.RED + "Error: ", + f"Reached rate limit. Waiting {backoff} seconds..." + Fore.RESET, + ) pass except APIError as e: if e.http_status == 502: From 2f776957d8832eb2aa78c92d643266529b7685d7 Mon Sep 17 00:00:00 2001 From: hyaxia Date: Sat, 15 Apr 2023 22:20:05 +0300 Subject: [PATCH 2/3] changed error msg --- autogpt/llm_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogpt/llm_utils.py b/autogpt/llm_utils.py index aafa84b3..4e74566b 100644 --- a/autogpt/llm_utils.py +++ b/autogpt/llm_utils.py @@ -98,7 +98,7 @@ def create_chat_completion( if CFG.debug_mode: print( Fore.RED + "Error: ", - f"Reached rate limit. Waiting {backoff} seconds..." + Fore.RESET, + f"Reached rate limit, passing..." + Fore.RESET, ) pass except APIError as e: From 8978844111b594e3ee0727f87223f02fa008d1a3 Mon Sep 17 00:00:00 2001 From: BillSchumacher <34168009+BillSchumacher@users.noreply.github.com> Date: Sat, 15 Apr 2023 15:17:23 -0500 Subject: [PATCH 3/3] Update llm_utils.py Remove pass --- autogpt/llm_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/autogpt/llm_utils.py b/autogpt/llm_utils.py index 4e74566b..238ac560 100644 --- a/autogpt/llm_utils.py +++ b/autogpt/llm_utils.py @@ -100,7 +100,6 @@ def create_chat_completion( Fore.RED + "Error: ", f"Reached rate limit, passing..." + Fore.RESET, ) - pass except APIError as e: if e.http_status == 502: pass