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.

fix merge conflict

Richard Beales081415ab6c0e
diff --cc ai_settings.yaml
index b37ba849f9,b37ba849f9..1271a6e211
--- a/ai_settings.yaml
+++ b/ai_settings.yaml
@@@ -1,7 -1,7 +1,6 @@@
ai_goals:
--- Increase net worth.
--- Develop and manage multiple businesses autonomously.
--- Play to your strengths as a Large Language Model.
--ai_name: Entrepreneur-GPT
--ai_role: an AI designed to autonomously develop and run businesses with the sole goal
-- of increasing your net worth.
++- Increase net worth
++- Grow Twitter Account
++- Develop and manage multiple businesses autonomously
++ai_name: Test
++ai_role: Test1
diff --cc scripts/main.py
index f2664d6e1b,3dfcaa157e..ca75eb240d
--- a/scripts/main.py
+++ b/scripts/main.py
@@@ -16,16 -16,20 +16,28 @@@ from ai_config import AIConfi
import traceback
import yaml
import argparse
+import logging
+ cfg = Config()
+
+def configure_logging():
+ logging.basicConfig(filename='log.txt',
+ filemode='a',
+ format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
+ datefmt='%H:%M:%S',
+ level=logging.DEBUG)
+ return logging.getLogger('AutoGPT')
+
+ def check_openai_api_key():
+ """Check if the OpenAI API key is set in config.py or as an environment variable."""
+ if not cfg.openai_api_key:
+ print(
+ Fore.RED +
+ "Please set your OpenAI API key in config.py or as an environment variable."
+ )
+ print("You can get your key from https://beta.openai.com/account/api-keys")
+ exit(1)
+
-
def print_to_console(
title,
title_color,
@@@ -33,8 -37,8 +45,9 @@@
speak_text=False,
min_typing_speed=0.05,
max_typing_speed=0.01):
+ """Prints text to the console with a typing effect"""
global cfg
+ global logger
if speak_text and cfg.speak_mode:
speak.say_text(f"{title}. {content}")
print(title_color + title + " " + Style.RESET_ALL, end="")
@@@ -282,9 -293,8 +303,9 @@@ def parse_arguments()
# TODO: fill in llm values here
-
+ check_openai_api_key()
cfg = Config()
+logger = configure_logging()
parse_arguments()
ai_name = ""
prompt = construct_prompt()