From aa786e1b41841604e00a451d7304cdcfc6795e2c Mon Sep 17 00:00:00 2001 From: Chris Cheney Date: Sat, 8 Apr 2023 21:30:36 -0500 Subject: [PATCH 1/6] command_name null check before calling .lower() fixes #534 `AttributeError: 'NoneType' object has no attribute 'lower'` --- scripts/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.py b/scripts/main.py index 17385bf3..4d68b450 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -358,7 +358,7 @@ while True: f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}") # Execute command - if command_name.lower() == "error": + if command_name is not None and command_name.lower() == "error": result = f"Command {command_name} threw the following error: " + arguments elif command_name == "human_feedback": result = f"Human feedback: {user_input}" From c0d2df6acc6d6663ed4935f57b7bf63819c1a44f Mon Sep 17 00:00:00 2001 From: blankster Date: Tue, 11 Apr 2023 01:59:43 +0200 Subject: [PATCH 2/6] Update .gitignore Ignoring IntelliJ Project Settings (e.g, Pycharm) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0edd3047..854b1401 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ venv/* outputs/* ai_settings.yaml .vscode +.idea/* auto-gpt.json From d4bb3de91bab4a6bb4a2c7e8124016f31645c20e Mon Sep 17 00:00:00 2001 From: Joseph Bisaillon Date: Mon, 10 Apr 2023 21:02:13 -0400 Subject: [PATCH 3/6] Add OpenAPI Key Link to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 749c8791..70ee85e1 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Your support is greatly appreciated ## 📋 Requirements - [Python 3.8 or later](https://www.tutorialspoint.com/how-to-install-python-in-windows) -- OpenAI API key +- [OpenAI API key](https://platform.openai.com/account/api-keys) - [PINECONE API key](https://www.pinecone.io/) Optional: From 2b67ede6b36668a7b22cd9f35ce8b9e5c710bc49 Mon Sep 17 00:00:00 2001 From: honeykjoule Date: Tue, 11 Apr 2023 04:31:38 +0000 Subject: [PATCH 4/6] update gitignore venv/* to *venv/* --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2d603801..287c937f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ package-lock.json auto_gpt_workspace/* *.mpeg .env -venv/* +*venv/* outputs/* ai_settings.yaml .vscode From bc6f34d7dc70771273992e2377d890bfe91c6c71 Mon Sep 17 00:00:00 2001 From: vadi Date: Wed, 12 Apr 2023 16:32:13 +1000 Subject: [PATCH 5/6] Fixes #803 - Brings back debug mode - Replaces all calls from cfg.debug to cfg.debug_mode that was updated on 5b2d6010dc59bab1026d13bfcd75b37618e573b9 - Remove unnecessary config instance at main.py --- scripts/chat.py | 6 +++--- scripts/json_parser.py | 2 +- scripts/main.py | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/chat.py b/scripts/chat.py index 23e5b501..30f7603c 100644 --- a/scripts/chat.py +++ b/scripts/chat.py @@ -64,14 +64,14 @@ def chat_with_ai( model = cfg.fast_llm_model # TODO: Change model from hardcode to argument # Reserve 1000 tokens for the response - if cfg.debug: + if cfg.debug_mode: print(f"Token limit: {token_limit}") send_token_limit = token_limit - 1000 relevant_memory = permanent_memory.get_relevant(str(full_message_history[-5:]), 10) - if cfg.debug: + if cfg.debug_mode: print('Memory Stats: ', permanent_memory.get_stats()) next_message_to_add_index, current_tokens_used, insertion_index, current_context = generate_context( @@ -110,7 +110,7 @@ def chat_with_ai( # assert tokens_remaining >= 0, "Tokens remaining is negative. This should never happen, please submit a bug report at https://www.github.com/Torantulino/Auto-GPT" # Debug print the current context - if cfg.debug: + if cfg.debug_mode: print(f"Token limit: {token_limit}") print(f"Send Token Count: {current_tokens_used}") print(f"Tokens remaining for response: {tokens_remaining}") diff --git a/scripts/json_parser.py b/scripts/json_parser.py index 8c17dfa2..1d93b109 100644 --- a/scripts/json_parser.py +++ b/scripts/json_parser.py @@ -91,7 +91,7 @@ def fix_json(json_str: str, schema: str) -> str: result_string = call_ai_function( function_string, args, description_string, model=cfg.fast_llm_model ) - if cfg.debug: + if cfg.debug_mode: print("------------ JSON FIX ATTEMPT ---------------") print(f"Original JSON: {json_str}") print("-----------") diff --git a/scripts/main.py b/scripts/main.py index d84e1508..40cad2b8 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -266,6 +266,7 @@ def prompt_user(): def parse_arguments(): """Parses the arguments passed to the script""" global cfg + cfg.set_debug_mode(False) cfg.set_continuous_mode(False) cfg.set_speak_mode(False) @@ -292,6 +293,9 @@ def parse_arguments(): print_to_console("GPT3.5 Only Mode: ", Fore.GREEN, "ENABLED") cfg.set_smart_llm_model(cfg.fast_llm_model) + if args.debug: + print_to_console("Debug Mode: ", Fore.GREEN, "ENABLED") + cfg.set_debug_mode(True) # TODO: fill in llm values here From 94441ee63bc55390f670483b965d01bbe712a961 Mon Sep 17 00:00:00 2001 From: Manal Arora <42407286+manalarora@users.noreply.github.com> Date: Wed, 12 Apr 2023 14:37:50 +0530 Subject: [PATCH 6/6] correcting the clone command in contributing.md (#927) * correcting the clone command in contributing.md * removing extra newlines added in previous commit removing extra newlines added in previous commit --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09a604eb..0529cbd9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ To contribute to this GitHub project, you can follow these steps: 2. Clone the repository to your local machine using the following command: ``` -git clone https://github.com/Torantulino/Auto-GPT +git clone https://github.com//Auto-GPT ``` 3. Create a new branch for your changes using the following command: