Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Fixes incorrect handling of openai RateLimitExceeded errors.

Toran Bruce Richards99a33023c45d
diff --git a/scripts/chat.py b/scripts/chat.py
index 99d99fb073..a406812d7a 100644
--- a/scripts/chat.py
+++ b/scripts/chat.py
@@ -77,6 +77,6 @@ def chat_with_ai(
"assistant", assistant_reply))
return assistant_reply
- except openai.RateLimitError:
- print("Error: ", "API Rate Limit Reached. Waiting 60 seconds...")
- time.sleep(60)
+ except openai.error.RateLimitError:
+ print("Error: ", "API Rate Limit Reached. Waiting 10 seconds...")
+ time.sleep(10)