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.
Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support
BillSchumacher23c650ca103b
diff --cc .env.templateindex b10e4799fa,f1b511c229..60edecd6ca--- a/.env.template+++ b/.env.template@@@ -152,33 -165,26 +165,33 @@@ OPENAI_API_KEY=your-openai-api-ke################################################################################### MAC OS- # USE_MAC_OS_TTS - Use Mac OS TTS or not (Default: False)- USE_MAC_OS_TTS=False+ ## USE_MAC_OS_TTS - Use Mac OS TTS or not (Default: False)+ # USE_MAC_OS_TTS=False### STREAMELEMENTS- # USE_BRIAN_TTS - Use Brian TTS or not (Default: False)- USE_BRIAN_TTS=False+ ## USE_BRIAN_TTS - Use Brian TTS or not (Default: False)+ # USE_BRIAN_TTS=False### ELEVENLABS- # ELEVENLABS_API_KEY - Eleven Labs API key (Example: my-elevenlabs-api-key)- # ELEVENLABS_VOICE_1_ID - Eleven Labs voice 1 ID (Example: my-voice-id-1)- # ELEVENLABS_VOICE_2_ID - Eleven Labs voice 2 ID (Example: my-voice-id-2)- ELEVENLABS_API_KEY=your-elevenlabs-api-key- ELEVENLABS_VOICE_1_ID=your-voice-id-1- ELEVENLABS_VOICE_2_ID=your-voice-id-2+ ## ELEVENLABS_API_KEY - Eleven Labs API key (Example: my-elevenlabs-api-key)+ ## ELEVENLABS_VOICE_1_ID - Eleven Labs voice 1 ID (Example: my-voice-id-1)+ ## ELEVENLABS_VOICE_2_ID - Eleven Labs voice 2 ID (Example: my-voice-id-2)+ # ELEVENLABS_API_KEY=your-elevenlabs-api-key+ # ELEVENLABS_VOICE_1_ID=your-voice-id-1+ # ELEVENLABS_VOICE_2_ID=your-voice-id-2################################################################################- ### TWITTER API+ ### TWITTER API################################################################################- TW_CONSUMER_KEY=- TW_CONSUMER_SECRET=- TW_ACCESS_TOKEN=- TW_ACCESS_TOKEN_SECRET=+ # TW_CONSUMER_KEY=+ # TW_CONSUMER_SECRET=+ # TW_ACCESS_TOKEN=+ # TW_ACCESS_TOKEN_SECRET=++################################################################################+### ALLOWLISTED PLUGINS+################################################################################++#ALLOWLISTED_PLUGINS - Sets the listed plugins that are allowed (Example: plugin1,plugin2,plugin3)- ALLOWLISTED_PLUGINS=++ALLOWLISTED_PLUGINS=diff --cc autogpt/app.pyindex 03e2320cb4,58d9f7164d..cf1ec5f9b2--- a/autogpt/app.py+++ b/autogpt/app.py@@@ -3,9 -3,8 +3,10 @@@ import jsofrom typing import Dict, List, NoReturn, Unionfrom autogpt.agent.agent_manager import AgentManager+ from autogpt.commands.analyze_code import analyze_codefrom autogpt.commands.audio_text import read_audio_from_file+from autogpt.commands.command import CommandRegistry, command+from autogpt.commands.evaluate_code import evaluate_codefrom autogpt.commands.execute_code import (execute_python_file,execute_shell,@@@ -28,10 -27,9 +29,10 @@@ from autogpt.commands.web_requests impofrom autogpt.commands.web_selenium import browse_websitefrom autogpt.commands.write_tests import write_testsfrom autogpt.config import Config- from autogpt.json_fixes.parsing import fix_and_parse_json+ from autogpt.json_utils.json_fix_llm import fix_and_parse_jsonfrom autogpt.memory import get_memoryfrom autogpt.processing.text import summarize_text+from autogpt.prompts.generator import PromptGeneratorfrom autogpt.speech import say_textCFG = Config()@@@ -141,6 -158,20 +142,8 @@@ def execute_commandreturn get_text_summary(arguments["url"], arguments["question"])elif command_name == "get_hyperlinks":return get_hyperlinks(arguments["url"])- elif command_name == "clone_repository":- return clone_repository(- arguments["repository_url"], arguments["clone_path"]- )- elif command_name == "read_file":- return read_file(arguments["file"])- elif command_name == "write_to_file":- return write_to_file(arguments["file"], arguments["text"])- elif command_name == "append_to_file":- return append_to_file(arguments["file"], arguments["text"])- elif command_name == "delete_file":- return delete_file(arguments["file"])- elif command_name == "search_files":- return search_files(arguments["directory"])++ elif command_name == "analyze_code":++ return analyze_code(arguments["code"])elif command_name == "download_file":if not CFG.allow_downloads:return "Error: You do not have user authorization to download files locally."diff --cc autogpt/cli.pyindex f6b27586ce,6fe9ecbb0e..30eb9c2385--- a/autogpt/cli.py+++ b/autogpt/cli.py@@@ -79,9 -79,8 +80,9 @@@ def mainfrom autogpt.configurator import create_configfrom autogpt.logs import loggerfrom autogpt.memory import get_memory- from autogpt.prompt import construct_prompt+ from autogpt.plugins import scan_plugins+ from autogpt.prompts.prompt import construct_main_ai_config- from autogpt.utils import get_latest_bulletin+ from autogpt.utils import get_current_git_branch, get_latest_bulletinif ctx.invoked_subcommand is None:cfg = Config()@@@ -107,25 -106,24 +108,42 @@@motd = get_latest_bulletin()if motd:logger.typewriter_log("NEWS: ", Fore.GREEN, motd)+ git_branch = get_current_git_branch()+ if git_branch and git_branch != "stable":+ logger.typewriter_log(+ "WARNING: ",+ Fore.RED,+ f"You are running on `{git_branch}` branch "+ "- this is not a supported branch.",+ )+ if sys.version_info < (3, 10):+ logger.typewriter_log(+ "WARNING: ",+ Fore.RED,+ "You are running on an older version of Python. "+ "Some people have observed problems with certain "+ "parts of Auto-GPT with this version. "+ "Please consider upgrading to Python 3.10 or higher.",+ )- system_prompt = construct_prompt()++ cfg = Config()+ cfg.set_plugins(scan_plugins(cfg, cfg.debug_mode))+ # Create a CommandRegistry instance and scan default folder+ command_registry = CommandRegistry()+ command_registry.import_commands("autogpt.commands.audio_text")+ command_registry.import_commands("autogpt.commands.evaluate_code")+ command_registry.import_commands("autogpt.commands.execute_code")+ command_registry.import_commands("autogpt.commands.file_operations")+ command_registry.import_commands("autogpt.commands.git_operations")+ command_registry.import_commands("autogpt.commands.google_search")+ command_registry.import_commands("autogpt.commands.image_gen")+ command_registry.import_commands("autogpt.commands.twitter")+ command_registry.import_commands("autogpt.commands.web_selenium")+ command_registry.import_commands("autogpt.commands.write_tests")+ command_registry.import_commands("autogpt.app")+ ai_name = ""+ ai_config = construct_main_ai_config()+ ai_config.command_registry = command_registry# print(prompt)# Initialize variablesfull_message_history = []diff --cc autogpt/commands/image_gen.pyindex f82e97aba6,0809fcdd3e..60cdaec000--- a/autogpt/commands/image_gen.py+++ b/autogpt/commands/image_gen.py@@@ -14,8 -14,7 +14,8 @@@ from autogpt.workspace import path_in_wCFG = Config()+@command("generate_image", "Generate Image", '"prompt": "<prompt>"', CFG.image_provider)- def generate_image(prompt: str) -> str:+ def generate_image(prompt: str, size: int = 256) -> str:"""Generate an image from a prompt.Args:diff --cc requirements.txtindex 77924609ba,66c90c7998..b504c68461--- a/requirements.txt+++ b/requirements.txt@@@ -27,11 -29,8 +29,10 @@@ flakenumpypre-commitblack- sourceryisortgitpython==3.1.31+abstract-singleton+auto-gpt-plugin-template# Items below this point will not be included in the Docker Image