From 36a039d017abc6cb834e6f2760b1518cf2f5d7ed Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Mon, 24 Apr 2023 22:15:44 -0700 Subject: [PATCH] Harrison/prompt prefix (#3496) Co-authored-by: Ian --- .../autonomous_agents/autogpt/prompt.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/langchain/experimental/autonomous_agents/autogpt/prompt.py b/langchain/experimental/autonomous_agents/autogpt/prompt.py index a9a79e3e..95647b7c 100644 --- a/langchain/experimental/autonomous_agents/autogpt/prompt.py +++ b/langchain/experimental/autonomous_agents/autogpt/prompt.py @@ -20,12 +20,14 @@ class AutoGPTPrompt(BaseChatPromptTemplate, BaseModel): send_token_limit: int = 4196 def construct_full_prompt(self, goals: List[str]) -> str: - prompt_start = """Your decisions must always be made independently - without seeking user assistance. Play to your strengths - as an LLM and pursue simple strategies with no legal complications. - If you have completed all your tasks, - make sure to use the "finish" command.""" - + prompt_start = ( + "Your decisions must always be made independently " + "without seeking user assistance.\n" + "Play to your strengths as an LLM and pursue simple " + "strategies with no legal complications.\n" + "If you have completed all your tasks, make sure to " + 'use the "finish" command.' + ) # Construct full prompt full_prompt = ( f"You are {self.ai_name}, {self.ai_role}\n{prompt_start}\n\nGOALS:\n\n"