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 missing reference to ai_name

Torantulino5263ac52ac1d
diff --git a/AutonomousAI/main.py b/AutonomousAI/main.py
index 5542fbbe22..b0661f1db2 100644
--- a/AutonomousAI/main.py
+++ b/AutonomousAI/main.py
@@ -24,6 +24,7 @@ def print_to_console(title, title_color, content, min_typing_speed=0.05, max_typ
print()
def print_assistant_thoughts(assistant_reply):
+ global ai_name
try:
# Parse and print Assistant response
assistant_reply_json = json.loads(assistant_reply)
@@ -63,6 +64,7 @@ def print_assistant_thoughts(assistant_reply):
print_to_console("Error: \n", Fore.RED, str(e))
def construct_prompt():
+ global ai_name
# Construct the prompt
print_to_console("Welcome to Auto-GPT! ", Fore.GREEN, "Enter the name of your AI and its role below. Entering nothing will load defaults.")
@@ -101,8 +103,8 @@ def construct_prompt():
full_prompt += f"\n\n{prompt}"
return full_prompt
+ai_name = ""
prompt = construct_prompt()
-
# Initialize variables
full_message_history = []
token_limit = 6000 # The maximum number of tokens allowed in the API call