clean up of prompts

Former-commit-id: fbea09f013
group-chat
Kye 2 years ago
parent a11e02e60a
commit ac6bcd8b42

@ -76,8 +76,7 @@ class Agent:
def run(self, goals: List[str]) -> str: def run(self, goals: List[str]) -> str:
user_input = ( user_input = (
"Determine which next command to use, " "Determine which next command to use, and respond using the format specified above:"
"and respond using the format specified above:"
) )
# Interaction Loop # Interaction Loop
loop_count = 0 loop_count = 0
@ -120,11 +119,10 @@ class Agent:
result = f"Error: {action.args}. " result = f"Error: {action.args}. "
else: else:
result = ( result = (
f"Unknown command '{action.name}'. " f"""Unknown command '{action.name}'.
f"Please refer to the 'COMMANDS' list for available " Please refer to the 'COMMANDS' list for available
f"commands and only respond in the specified JSON format." commands and only respond in the specified JSON format."""
) )
memory_to_add = ( memory_to_add = (
f"Assistant Reply: {assistant_reply} " f"\nResult: {result} " f"Assistant Reply: {assistant_reply} " f"\nResult: {result} "
) )

@ -16,12 +16,12 @@ class PromptConstructor:
def construct_full_prompt(self, goals: List[str]) -> str: def construct_full_prompt(self, goals: List[str]) -> str:
prompt_start = ( prompt_start = (
"Your decisions must always be made independently " """Your decisions must always be made independently
"without seeking user assistance.\n" without seeking user assistance.\n
"Play to your strengths as an LLM and pursue simple " Play to your strengths as an LLM and pursue simple
"strategies with no legal complications.\n" strategies with no legal complications.\n
"If you have completed all your tasks, make sure to " If you have completed all your tasks, make sure to
'use the "finish" command.' use the "finish" command."""
) )
# Construct full prompt # Construct full prompt
full_prompt = ( full_prompt = (

Loading…
Cancel
Save