diff --git a/autogpts/autogpt/autogpt/agent_factory/generators.py b/autogpts/autogpt/autogpt/agent_factory/generators.py index 4d9702b8..2713d5cb 100644 --- a/autogpts/autogpt/autogpt/agent_factory/generators.py +++ b/autogpts/autogpt/autogpt/agent_factory/generators.py @@ -16,7 +16,7 @@ async def generate_agent_for_task( app_config: "Config", llm_provider: "ChatModelProvider", ) -> "Agent": - base_directives = AIDirectives.from_file(app_config.ai_settings_file) + base_directives = AIDirectives.from_file(app_config.prompt_settings_file) ai_profile, task_directives = await generate_agent_profile_for_task( task=task, app_config=app_config, diff --git a/autogpts/autogpt/autogpt/config/ai_directives.py b/autogpts/autogpt/autogpt/config/ai_directives.py index 48fa7ceb..6b5aa437 100644 --- a/autogpts/autogpt/autogpt/config/ai_directives.py +++ b/autogpts/autogpt/autogpt/config/ai_directives.py @@ -29,7 +29,7 @@ class AIDirectives(BaseModel): if not validated: logger.error(message, extra={"title": "FAILED FILE VALIDATION"}) request_user_double_check() - exit(1) + raise RuntimeError(f"File validation failed: {message}") with open(prompt_settings_file, encoding="utf-8") as file: config_params = yaml.load(file, Loader=yaml.FullLoader) diff --git a/autogpts/autogpt/run b/autogpts/autogpt/run index 343cd780..b37c053f 100755 --- a/autogpts/autogpt/run +++ b/autogpts/autogpt/run @@ -7,4 +7,4 @@ if [ ! -f .env ]; then echo "Please add your api keys to the .env file." >&2 # exit 1 fi -poetry run serve +poetry run serve --debug