diff --git a/autogpt/commands/file_context.py b/autogpt/commands/file_context.py index c5e00b8f..107bc6d6 100644 --- a/autogpt/commands/file_context.py +++ b/autogpt/commands/file_context.py @@ -29,7 +29,8 @@ def agent_implements_context(agent: BaseAgent) -> bool: @command( "open_file", - "Open a file for editing, creating it if it does not exist yet", + "Open a file for editing, creating it if it does not exist yet." + " Note: if you only need to read or write a file once, use `write_to_file` instead.", { "file_path": { "type": "string", diff --git a/autogpt/models/command.py b/autogpt/models/command.py index a3369bb9..48f913cf 100644 --- a/autogpt/models/command.py +++ b/autogpt/models/command.py @@ -58,4 +58,4 @@ class Command: f"{param.name}: {param.type if param.required else f'Optional[{param.type}]'}" for param in self.parameters ] - return f"{self.name}: {self.description}. Params: ({', '.join(params)})" + return f"{self.name}: {self.description.rstrip('.')}. Params: ({', '.join(params)})" diff --git a/autogpt/prompts/generator.py b/autogpt/prompts/generator.py index 755a3689..c5e1c524 100644 --- a/autogpt/prompts/generator.py +++ b/autogpt/prompts/generator.py @@ -53,7 +53,7 @@ class PromptGenerator: params_string = ", ".join( f'"{key}": "{value}"' for key, value in self.params.items() ) - return f'{self.label}: "{self.name}". Params: ({params_string})' + return f'{self.label}: "{self.name.rstrip(".")}". Params: ({params_string})' def add_constraint(self, constraint: str) -> None: """ diff --git a/prompt_settings.yaml b/prompt_settings.yaml index 4cdc0312..43818380 100644 --- a/prompt_settings.yaml +++ b/prompt_settings.yaml @@ -6,10 +6,12 @@ constraints: [ resources: [ 'Internet access for searches and information gathering.', 'The ability to read and write files.', + 'You are a Large Language Model, trained on millions of pages of text, including a lot of factual knowledge. Make use of this factual knowledge to avoid unnecessary gathering of information.' ] best_practices: [ 'Continuously review and analyze your actions to ensure you are performing to the best of your abilities.', 'Constructively self-criticize your big-picture behavior constantly.', 'Reflect on past decisions and strategies to refine your approach.', - 'Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.' + 'Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.', + 'Only make use of your information gathering abilities to find information that you don''t yet have knowledge of.' ]