♻️ Use AutoGPT template package for the plugin type

This commit is contained in:
Taylor Beeston
2023-04-17 22:10:40 -07:00
parent 9705f60dd3
commit b84de4f7f8
9 changed files with 19 additions and 265 deletions

View File

@@ -8,7 +8,7 @@ from colorama import Fore
from openai.error import APIError, RateLimitError
from autogpt.config import Config
from plugin_template import Message
from autogpt.types.openai import Message
CFG = Config()
@@ -109,7 +109,9 @@ def create_chat_completion(
break
except RateLimitError:
if CFG.debug_mode:
print(f"{Fore.RED}Error: ", f"Reached rate limit, passing...{Fore.RESET}")
print(
f"{Fore.RED}Error: ", f"Reached rate limit, passing...{Fore.RESET}"
)
except APIError as e:
if e.http_status != 502:
raise