diff options
Diffstat (limited to 'autogpts/autogpt/autogpt/core/agent/simple.py')
-rw-r--r-- | autogpts/autogpt/autogpt/core/agent/simple.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/autogpts/autogpt/autogpt/core/agent/simple.py b/autogpts/autogpt/autogpt/core/agent/simple.py index a66ca5cc4..ea113dafc 100644 --- a/autogpts/autogpt/autogpt/core/agent/simple.py +++ b/autogpts/autogpt/autogpt/core/agent/simple.py @@ -92,7 +92,9 @@ class SimpleAgent(Agent, Configurable): ), openai_provider=PluginLocation( storage_format=PluginStorageFormat.INSTALLED_PACKAGE, - storage_route="autogpt.core.resource.model_providers.OpenAIProvider", + storage_route=( + "autogpt.core.resource.model_providers.OpenAIProvider" + ), ), planning=PluginLocation( storage_format=PluginStorageFormat.INSTALLED_PACKAGE, @@ -184,7 +186,7 @@ class SimpleAgent(Agent, Configurable): ) tasks = [Task.parse_obj(task) for task in plan.parsed_result["task_list"]] - # TODO: Should probably do a step to evaluate the quality of the generated tasks, + # TODO: Should probably do a step to evaluate the quality of the generated tasks # and ensure that they have actionable ready and acceptance criteria self._task_queue.extend(tasks) @@ -235,7 +237,7 @@ class SimpleAgent(Agent, Configurable): else: self._logger.debug(f"Evaluating task {task} and adding relevant context.") # TODO: Look up relevant memories (need working memory system) - # TODO: Evaluate whether there is enough information to start the task (language model call). + # TODO: Eval whether there is enough information to start the task (w/ LLM). task.context.enough_info = True task.context.status = TaskStatus.IN_PROGRESS return task @@ -248,10 +250,12 @@ class SimpleAgent(Agent, Configurable): """Choose the next ability to use for the task.""" self._logger.debug(f"Choosing next ability for task {task}.") if task.context.cycle_count > self._configuration.max_task_cycle_count: - # Don't hit the LLM, just set the next action as "breakdown_task" with an appropriate reason + # Don't hit the LLM, just set the next action as "breakdown_task" + # with an appropriate reason raise NotImplementedError elif not task.context.enough_info: - # Don't ask the LLM, just set the next action as "breakdown_task" with an appropriate reason + # Don't ask the LLM, just set the next action as "breakdown_task" + # with an appropriate reason raise NotImplementedError else: next_ability = await self._planning.determine_next_ability( @@ -378,7 +382,8 @@ class SimpleAgent(Agent, Configurable): def _prune_empty_dicts(d: dict) -> dict: """ - Prune branches from a nested dictionary if the branch only contains empty dictionaries at the leaves. + Prune branches from a nested dictionary if the branch only contains empty + dictionaries at the leaves. Args: d: The dictionary to prune. |