Spaces:
Sleeping
Sleeping
Martin Bär
commited on
Commit
·
2640254
1
Parent(s):
7735763
Add reminder of final answer format
Browse files- basic_agent.py +7 -2
basic_agent.py
CHANGED
@@ -38,7 +38,7 @@ class BasicAgent:
|
|
38 |
|
39 |
main_agent = FunctionAgent(
|
40 |
name="MainAgent",
|
41 |
-
description="Can organize and delegate work to different agents and can compile a final answer to a question from other agents' outputs.",
|
42 |
system_prompt=(
|
43 |
"You are a general AI assistant. I will ask you a question. "
|
44 |
"Report your thoughts, delegate work to other agents if necessary, and"
|
@@ -149,7 +149,12 @@ class BasicAgent:
|
|
149 |
if file_exists(task_id):
|
150 |
file_str = f'\nIf you need to load a file, do so by providing the id "{task_id}".'
|
151 |
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
# Stream events
|
155 |
handler = self.agent.run(user_msg=msg)
|
|
|
38 |
|
39 |
main_agent = FunctionAgent(
|
40 |
name="MainAgent",
|
41 |
+
description= ("Can organize and delegate work to different agents and can compile a final answer to a question from other agents' outputs."),
|
42 |
system_prompt=(
|
43 |
"You are a general AI assistant. I will ask you a question. "
|
44 |
"Report your thoughts, delegate work to other agents if necessary, and"
|
|
|
149 |
if file_exists(task_id):
|
150 |
file_str = f'\nIf you need to load a file, do so by providing the id "{task_id}".'
|
151 |
|
152 |
+
final_answer = (
|
153 |
+
"Remember to always use the template 'FINAL ANSWER: [YOUR FINAL ANSWER]' for your final output. "
|
154 |
+
"Always use as few words as possible for your final answer."
|
155 |
+
)
|
156 |
+
|
157 |
+
msg = f"{question}{file_str}\n{final_answer}"
|
158 |
|
159 |
# Stream events
|
160 |
handler = self.agent.run(user_msg=msg)
|