|
|
@ -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} "
|
|
|
|
)
|
|
|
|
)
|
|
|
|