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.
refactor(agent): Reduce log spam in Agent Protocol mode
Reinier van der Leer9e9142aa8e82
diff --git a/autogpts/autogpt/autogpt/agent_factory/configurators.py b/autogpts/autogpt/autogpt/agent_factory/configurators.pyindex 0e81ff7b0b..a8e9cbab6b 100644--- a/autogpts/autogpt/autogpt/agent_factory/configurators.py+++ b/autogpts/autogpt/autogpt/agent_factory/configurators.py@@ -6,7 +6,6 @@ from autogpt.commands import COMMAND_CATEGORIESfrom autogpt.config import AIDirectives, AIProfile, Configfrom autogpt.core.resource.model_providers import ChatModelProviderfrom autogpt.logs.config import configure_chat_plugins-from autogpt.logs.helpers import print_attributefrom autogpt.models.command_registry import CommandRegistryfrom autogpt.plugins import scan_plugins@@ -79,8 +78,6 @@ def _configure_agent(# TODO: configure memory- print_attribute("Configured Browser", app_config.selenium_web_browser)-return Agent(settings=agent_state,llm_provider=llm_provider,diff --git a/autogpts/autogpt/autogpt/app/configurator.py b/autogpts/autogpt/autogpt/app/configurator.pyindex fe4b88783f..292bf9753f 100644--- a/autogpts/autogpt/autogpt/app/configurator.py+++ b/autogpts/autogpt/autogpt/app/configurator.py@@ -13,7 +13,7 @@ from autogpt.config import Configfrom autogpt.config.config import GPT_3_MODEL, GPT_4_MODELfrom autogpt.llm.api_manager import ApiManagerfrom autogpt.logs.config import LogFormatName-from autogpt.logs.helpers import print_attribute, request_user_double_check+from autogpt.logs.helpers import request_user_double_checkfrom autogpt.memory.vector import get_supported_memory_backendsif TYPE_CHECKING:@@ -78,7 +78,6 @@ def apply_overrides_to_config(config.logging.log_file_format = LogFormatName(log_file_format)if continuous:- print_attribute("Continuous Mode", "ENABLED", title_color=Fore.YELLOW)logger.warning("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"@@ -87,7 +86,6 @@ def apply_overrides_to_config(config.continuous_mode = Trueif continuous_limit:- print_attribute("Continuous Limit", continuous_limit)config.continuous_limit = continuous_limit# Check if continuous limit is used without continuous mode@@ -95,12 +93,10 @@ def apply_overrides_to_config(raise click.UsageError("--continuous-limit can only be used with --continuous")if speak:- print_attribute("Speak Mode", "ENABLED")config.tts_config.speak_mode = True# Set the default LLM modelsif gpt3only:- print_attribute("GPT3.5 Only Mode", "ENABLED")# --gpt3only should always use gpt-3.5-turbo, despite user's FAST_LLM configconfig.fast_llm = GPT_3_MODELconfig.smart_llm = GPT_3_MODEL@@ -113,7 +109,6 @@ def apply_overrides_to_config()== GPT_4_MODEL):- print_attribute("GPT4 Only Mode", "ENABLED")# --gpt4only should always use gpt-4, despite user's SMART_LLM configconfig.fast_llm = GPT_4_MODELconfig.smart_llm = GPT_4_MODEL@@ -136,14 +131,10 @@ def apply_overrides_to_config(},msg=f"{supported_memory}",)- print_attribute(- "Defaulting to", config.memory_backend, title_color=Fore.YELLOW- )else:config.memory_backend = chosenif skip_reprompt:- print_attribute("Skip Re-prompt", "ENABLED")config.skip_reprompt = Trueif ai_settings_file:@@ -156,7 +147,6 @@ def apply_overrides_to_config(request_user_double_check()exit(1)- print_attribute("Using AI Settings File", file)config.ai_settings_file = config.project_root / fileconfig.skip_reprompt = True@@ -170,14 +160,12 @@ def apply_overrides_to_config(request_user_double_check()exit(1)- print_attribute("Using Prompt Settings File", file)config.prompt_settings_file = config.project_root / fileif browser_name:config.selenium_web_browser = browser_nameif allow_downloads:- print_attribute("Native Downloading", "ENABLED")logger.warning(msg=f"{Back.LIGHTYELLOW_EX}""AutoGPT will now be able to download and save files to your machine."diff --git a/autogpts/autogpt/autogpt/app/main.py b/autogpts/autogpt/autogpt/app/main.pyindex 43a911a019..290886c436 100644--- a/autogpts/autogpt/autogpt/app/main.py+++ b/autogpts/autogpt/autogpt/app/main.py@@ -125,6 +125,21 @@ async def run_auto_gpt(print_motd(config, logger)print_git_branch_info(logger)print_python_version_info(logger)+ print_attribute("Smart LLM", config.smart_llm)+ print_attribute("Fast LLM", config.fast_llm)+ print_attribute("Browser", config.selenium_web_browser)+ if config.continuous_mode:+ print_attribute("Continuous Mode", "ENABLED", title_color=Fore.YELLOW)+ if continuous_limit:+ print_attribute("Continuous Limit", config.continuous_limit)+ if config.tts_config.speak_mode:+ print_attribute("Speak Mode", "ENABLED")+ if ai_settings:+ print_attribute("Using AI Settings File", ai_settings)+ if prompt_settings:+ print_attribute("Using Prompt Settings File", prompt_settings)+ if config.allow_downloads:+ print_attribute("Native Downloading", "ENABLED")if install_plugin_deps:install_plugin_dependencies()