diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 001d554706..09a604eba9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ git checkout -b "branch-name" 5. Add the changes to the staging area using the following command: ``` -git add . +git add . ``` 6. Commit the changes with a meaningful commit message using the following command: diff --git a/README.md b/README.md index d5d6379247..016fd6f802 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Auto-GPT is an experimental open-source application showcasing the capabilities https://user-images.githubusercontent.com/22963551/228855501-2f5777cf-755b-4407-a643-c7299e5b6419.mp4 -

💖 Help Fund Auto-GPT's Development 💖

+

💖 Help Fund Auto-GPT's Development 💖

If you can spare a coffee, you can help to cover the API costs of developing Auto-GPT and help push the boundaries of fully autonomous AI! A full day of development can easily cost as much as $20 in API costs, which for a free project is quite limiting. @@ -211,8 +211,8 @@ export PINECONE_ENV="Your pinecone region" # something like: us-east4-gcp ## 💀 Continuous Mode ⚠️ Run the AI **without** user authorisation, 100% automated. -Continuous mode is not recommended. -It is potentially dangerous and may cause your AI to run forever or carry out actions you would not usually authorise. +Continuous mode is not recommended. +It is potentially dangerous and may cause your AI to run forever or carry out actions you would not usually authorise. Use at your own risk. 1. Run the `main.py` Python script in your terminal: ``` @@ -257,7 +257,7 @@ As an autonomous experiment, Auto-GPT may generate content or take actions that By using Auto-GPT, you agree to indemnify, defend, and hold harmless the developers, contributors, and any affiliated parties from and against any and all claims, damages, losses, liabilities, costs, and expenses (including reasonable attorneys' fees) arising from your use of this software or your violation of these terms. -## 🐦 Connect with Us on Twitter +## 🐦 Connect with Us on Twitter Stay up-to-date with the latest news, updates, and insights about Auto-GPT by following our Twitter accounts. Engage with the developer and the AI's own account for interesting discussions, project updates, and more. diff --git a/outputs/logs/message-log-1.txt b/outputs/logs/message-log-1.txt index de2cd1a99a..8a719016ce 100644 --- a/outputs/logs/message-log-1.txt +++ b/outputs/logs/message-log-1.txt @@ -28,15 +28,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -50,7 +50,7 @@ Gmail: entrepreneurgpt@gmail.com Twitter: @En_GPT """ ----------------------------------------------------------------------- -Entrepreneur-GTP: +Entrepreneur-GTP: { "command": { @@ -69,7 +69,7 @@ Entrepreneur-GTP: } } ----------------------------------------------------------------------- -USER: +USER: RESULT: """ 29 best online business ideas @@ -117,7 +117,7 @@ https://www.visitor-analytics.io › blog › best-online-b... 26/10/2022 — 10 Best Online Business Ideas for 2023 · 1. Artificial Intelligence · 2. Digital Products · 3. Blogging · 4. Graphic Design · 5. Web Development · 6. """ ----------------------------------------------------------------------- -Entrepreneur-GTP: +Entrepreneur-GTP: { "command": { @@ -167,15 +167,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -193,7 +193,7 @@ Online business ideas: 1. Clothing line, 2. Dropshipping, 3. Sell art, 4. Freela """ """ ----------------------------------------------------------------------- -Entrepreneur-GTP: +Entrepreneur-GTP: { "command": { @@ -282,15 +282,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -334,7 +334,7 @@ Entrepreneur-GTP: ----------------------------------------------------------------------- USER: """ -Top Result: +Top Result: """ Low-Cost Business Ideas: Mobile Food Shop: Mobile Food Shop is the top small business idea as people all over the world love to eat tasty and healthy food. ... @@ -403,15 +403,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", diff --git a/outputs/logs/message-log-2.txt b/outputs/logs/message-log-2.txt index cb0e59e203..a9fe8d3386 100644 --- a/outputs/logs/message-log-2.txt +++ b/outputs/logs/message-log-2.txt @@ -31,15 +31,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -143,15 +143,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -222,15 +222,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -373,15 +373,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -458,15 +458,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -515,10 +515,10 @@ Entrepreneur-GTP: } """ ----------------------------------------------------------------------- -Developer NOTE: I have interviened here to reccomend an alternative platform, since I know substack will make the process far more painless for me. +Developer NOTE: I have interviened here to reccomend an alternative platform, since I know substack will make the process far more painless for me. USER: """ -Recommendation: +Recommendation: """ Use https://substack.com instead of WordPress for simplicity. """ """ ----------------------------------------------------------------------- @@ -670,15 +670,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -758,15 +758,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -917,15 +917,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -1080,15 +1080,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -1210,10 +1210,10 @@ Quora https://www.quora.com › How-do-you-promote-a-new-fi... 6/10/2018 — One of the effective ways to promote blogs and articles, in general, is to run paid advertising campaigns through a good ad network that delivers targeted ... 2 answers - + · - -3 votes: + +3 votes: Promoting your new blog may be difficult if you’re a newbie. But trust me, you’d ... How to start a personal finance blog when I have no ... 3 answers @@ -1331,15 +1331,15 @@ These are the commands available from you: Your response must ALWAYS be in JSON format, in the following format: { - "command": + "command": { "name": "command name", - "arguments": + "arguments": { "argument name": "argument value" } - }, - "Thoughts": + }, + "Thoughts": { "text": "thought", "reasoning": "reasoning", @@ -1486,4 +1486,4 @@ USER: Entrepreneur-GTP: """ -""" \ No newline at end of file +""" diff --git a/outputs/logs/message-log-3.txt b/outputs/logs/message-log-3.txt index b528a8cf91..6e9061617b 100644 --- a/outputs/logs/message-log-3.txt +++ b/outputs/logs/message-log-3.txt @@ -134,7 +134,7 @@ Entrepreneur-GTP: ----------------------------------------------------------------------- USER: """ -Summary: +Summary: """ The article discusses 18 profitable online business ideas, including starting an e-commerce store, providing virtual assistant services, becoming an affiliate marketer, offering online training or education, and creating mobile applications. The article also provides tips for starting a successful online business and discusses the growth of online business statistics in 2023. Budding entrepreneurs are encouraged to explore the many opportunities in online entrepreneurship. """ @@ -396,7 +396,7 @@ LONG TERM MEMORY: [0] : """18 profitable online business ideas: e-commerce store, virtual assistant services, affiliate marketing, online training or education, mobile applications""", [1] : """ Chosen business idea: Blogging with affiliate marketing -""" +""" } """ ----------------------------------------------------------------------- @@ -564,7 +564,7 @@ LONG TERM MEMORY: [0] : """18 profitable online business ideas: e-commerce store, virtual assistant services, affiliate marketing, online training or education, mobile applications""", [1] : """ Chosen business idea: Blogging with affiliate marketing -""" +""" [2] : """ Blogging with affiliate marketing strategy: 1. Choose a niche, 2. Domain and hosting, 3. Design your blog, 4. Create valuable content, 5. SEO optimization, 6. Build an email list, 7. Join affiliate programs, 8. Integrate affiliate links, 9. Promote your blog, 10. Analyze and adjust """ @@ -654,7 +654,7 @@ LONG TERM MEMORY: [0] : """18 profitable online business ideas: e-commerce store, virtual assistant services, affiliate marketing, online training or education, mobile applications""", [1] : """ Chosen business idea: Blogging with affiliate marketing -""" +""" [2] : """ Blogging with affiliate marketing strategy: 1. Choose a niche, 2. Domain and hosting, 3. Design your blog, 4. Create valuable content, 5. SEO optimization, 6. Build an email list, 7. Join affiliate programs, 8. Integrate affiliate links, 9. Promote your blog, 10. Analyze and adjust """ @@ -792,7 +792,7 @@ LONG TERM MEMORY: [0] : """18 profitable online business ideas: e-commerce store, virtual assistant services, affiliate marketing, online training or education, mobile applications""", [1] : """ Chosen business idea: Blogging with affiliate marketing -""" +""" [2] : """ Blogging with affiliate marketing strategy: 1. Choose a niche, 2. Domain and hosting, 3. Design your blog, 4. Create valuable content, 5. SEO optimization, 6. Build an email list, 7. Join affiliate programs, 8. Integrate affiliate links, 9. Promote your blog, 10. Analyze and adjust """ @@ -901,7 +901,7 @@ LONG TERM MEMORY: [0] : """18 profitable online business ideas: e-commerce store, virtual assistant services, affiliate marketing, online training or education, mobile applications""", [1] : """ Chosen business idea: Blogging with affiliate marketing -""" +""" [2] : """ Blogging with affiliate marketing strategy: 1. Choose a niche, 2. Domain and hosting, 3. Design your blog, 4. Create valuable content, 5. SEO optimization, 6. Build an email list, 7. Join affiliate programs, 8. Integrate affiliate links, 9. Promote your blog, 10. Analyze and adjust """ diff --git a/scripts/ai_functions.py b/scripts/ai_functions.py index f93d7ea693..0150335caf 100644 --- a/scripts/ai_functions.py +++ b/scripts/ai_functions.py @@ -13,7 +13,7 @@ def evaluate_code(code: str) -> List[str]: description_string = """Analyzes the given code and returns a list of suggestions for improvements.""" result_string = call_ai_function(function_string, args, description_string) - + return result_string diff --git a/scripts/commands.py b/scripts/commands.py index 5e14f6cc0a..073ecc56a9 100644 --- a/scripts/commands.py +++ b/scripts/commands.py @@ -28,15 +28,15 @@ def get_command(response): """Parse the response and return the command name and arguments""" try: response_json = fix_and_parse_json(response) - + if "command" not in response_json: return "Error:" , "Missing 'command' object in JSON" - + command = response_json["command"] if "name" not in command: return "Error:", "Missing 'name' field in 'command' object" - + command_name = command["name"] # Use an empty dictionary if 'args' field is not present in 'command' object @@ -146,20 +146,20 @@ def google_official_search(query, num_results=8): # Initialize the Custom Search API service service = build("customsearch", "v1", developerKey=api_key) - + # Send the search query and retrieve the results result = service.cse().list(q=query, cx=custom_search_engine_id, num=num_results).execute() # Extract the search result items from the response search_results = result.get("items", []) - + # Create a list of only the URLs from the search results search_results_links = [item["link"] for item in search_results] except HttpError as e: # Handle errors in the API call error_details = json.loads(e.content.decode()) - + # Check if the error is related to an invalid or missing API key if error_details.get("error", {}).get("code") == 403 and "invalid API key" in error_details.get("error", {}).get("message", ""): return "Error: The provided Google API key is invalid or missing." diff --git a/scripts/config.py b/scripts/config.py index 03f1d5df27..764625b050 100644 --- a/scripts/config.py +++ b/scripts/config.py @@ -36,12 +36,12 @@ class Config(metaclass=Singleton): self.debug = False self.continuous_mode = False self.speak_mode = False - # TODO - make these models be self-contained, using langchain, so we can configure them once and call it good - self.fast_llm_model = os.getenv("FAST_LLM_MODEL", "gpt-3.5-turbo") + # TODO - make these models be self-contained, using langchain, so we can configure them once and call it good + self.fast_llm_model = os.getenv("FAST_LLM_MODEL", "gpt-3.5-turbo") self.smart_llm_model = os.getenv("SMART_LLM_MODEL", "gpt-4") self.fast_token_limit = int(os.getenv("FAST_TOKEN_LIMIT", 4000)) self.smart_token_limit = int(os.getenv("SMART_TOKEN_LIMIT", 8000)) - + self.openai_api_key = os.getenv("OPENAI_API_KEY") self.use_azure = False self.use_azure = os.getenv("USE_AZURE") == 'True' @@ -52,9 +52,9 @@ class Config(metaclass=Singleton): openai.api_type = "azure" openai.api_base = self.openai_api_base openai.api_version = self.openai_api_version - + self.elevenlabs_api_key = os.getenv("ELEVENLABS_API_KEY") - + self.google_api_key = os.getenv("GOOGLE_API_KEY") self.custom_search_engine_id = os.getenv("CUSTOM_SEARCH_ENGINE_ID") diff --git a/scripts/data.py b/scripts/data.py index cd41f31373..f80c2875d8 100644 --- a/scripts/data.py +++ b/scripts/data.py @@ -7,7 +7,7 @@ def load_prompt(): # get directory of this file: file_dir = Path(__file__).parent prompt_file_path = file_dir / "data" / "prompt.txt" - + # Load the prompt from data/prompt.txt with open(prompt_file_path, "r") as prompt_file: prompt = prompt_file.read() diff --git a/scripts/data/prompt.txt b/scripts/data/prompt.txt index ab281e81a0..fc68f3ae0d 100644 --- a/scripts/data/prompt.txt +++ b/scripts/data/prompt.txt @@ -35,7 +35,7 @@ RESOURCES: PERFORMANCE EVALUATION: -1. Continuously review and analyze your actions to ensure you are performing to the best of your abilities. +1. Continuously review and analyze your actions to ensure you are performing to the best of your abilities. 2. Constructively self-criticize your big-picture behavior constantly. 3. Reflect on past decisions and strategies to refine your approach. 4. Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps. diff --git a/scripts/execute_code.py b/scripts/execute_code.py index f34469dda8..a8f909116e 100644 --- a/scripts/execute_code.py +++ b/scripts/execute_code.py @@ -40,7 +40,7 @@ def execute_python_file(file): container.remove() # print(f"Execution complete. Output: {output}") - # print(f"Logs: {logs}") + # print(f"Logs: {logs}") return logs diff --git a/scripts/image_gen.py b/scripts/image_gen.py index 185ed4278b..4481696ffa 100644 --- a/scripts/image_gen.py +++ b/scripts/image_gen.py @@ -14,7 +14,7 @@ working_directory = "auto_gpt_workspace" def generate_image(prompt): filename = str(uuid.uuid4()) + ".jpg" - + # DALL-E if cfg.image_provider == 'dalle': @@ -54,4 +54,4 @@ def generate_image(prompt): return "Saved to disk:" + filename else: - return "No Image Provider Set" \ No newline at end of file + return "No Image Provider Set" diff --git a/scripts/main.py b/scripts/main.py index ecb3d51fde..ef60dc71c8 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -135,7 +135,7 @@ def load_variables(config_file="config.yaml"): if ai_name == "": ai_name = "Entrepreneur-GPT" - if not ai_role: + if not ai_role: ai_role = input(f"{ai_name} is: ") if ai_role == "": ai_role = "an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth." @@ -152,7 +152,7 @@ def load_variables(config_file="config.yaml"): ai_goals.append(ai_goal) if len(ai_goals) == 0: ai_goals = ["Increase net worth", "Grow Twitter Account", "Develop and manage multiple businesses autonomously"] - + # Save variables to yaml file config = {"ai_name": ai_name, "ai_role": ai_role, "ai_goals": ai_goals} with open(config_file, "w") as file: @@ -179,22 +179,22 @@ def construct_prompt(): Fore.GREEN, f"Would you like me to return to being {config.ai_name}?", speak_text=True) - should_continue = input(f"""Continue with the last settings? + should_continue = input(f"""Continue with the last settings? Name: {config.ai_name} Role: {config.ai_role} -Goals: {config.ai_goals} +Goals: {config.ai_goals} Continue (y/n): """) if should_continue.lower() == "n": config = AIConfig() - if not config.ai_name: + if not config.ai_name: config = prompt_user() config.save() # Get rid of this global: global ai_name ai_name = config.ai_name - + full_prompt = config.construct_full_prompt() return full_prompt @@ -257,7 +257,7 @@ def parse_arguments(): global cfg cfg.set_continuous_mode(False) cfg.set_speak_mode(False) - + parser = argparse.ArgumentParser(description='Process arguments.') parser.add_argument('--continuous', action='store_true', help='Enable Continuous Mode') parser.add_argument('--speak', action='store_true', help='Enable Speak Mode') diff --git a/tests/json_tests.py b/tests/json_tests.py index 459da610b8..fdac9c2f77 100644 --- a/tests/json_tests.py +++ b/tests/json_tests.py @@ -11,12 +11,12 @@ class TestParseJson(unittest.TestCase): json_str = '{"name": "John", "age": 30, "city": "New York"}' obj = fix_and_parse_json(json_str) self.assertEqual(obj, {"name": "John", "age": 30, "city": "New York"}) - + def test_invalid_json_minor(self): # Test that an invalid JSON string can be fixed with gpt json_str = '{"name": "John", "age": 30, "city": "New York",}' self.assertEqual(fix_and_parse_json(json_str, try_to_fix_with_gpt=False), {"name": "John", "age": 30, "city": "New York"}) - + def test_invalid_json_major_with_gpt(self): # Test that an invalid JSON string raises an error when try_to_fix_with_gpt is False json_str = 'BEGIN: "name": "John" - "age": 30 - "city": "New York" :END' @@ -112,4 +112,4 @@ class TestParseJson(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main()