Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -24,14 +24,14 @@ def build_agent():
|
|
| 24 |
def enhancer(state: MessagesState):
|
| 25 |
sys_msg = """
|
| 26 |
You are a helpful assistant tasked with answering questions using a set of tools.
|
| 27 |
-
Use the tool that is most appropiate on the task you are required to do.
|
| 28 |
Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
| 29 |
FINAL ANSWER: [YOUR FINAL ANSWER].
|
| 30 |
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 31 |
If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
|
| 32 |
If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
|
| 33 |
If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
|
| 34 |
-
Your answer should only start with "FINAL ANSWER: ", then follows with the answer.
|
|
|
|
| 35 |
"""
|
| 36 |
return {
|
| 37 |
"messages": [sys_msg] + state["messages"]
|
|
|
|
| 24 |
def enhancer(state: MessagesState):
|
| 25 |
sys_msg = """
|
| 26 |
You are a helpful assistant tasked with answering questions using a set of tools.
|
|
|
|
| 27 |
Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
| 28 |
FINAL ANSWER: [YOUR FINAL ANSWER].
|
| 29 |
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
| 30 |
If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
|
| 31 |
If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
|
| 32 |
If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
|
| 33 |
+
Your answer should only start with "FINAL ANSWER: ", then follows with the answer.
|
| 34 |
+
Use the tool that is most appropiate on the task you are required to do. Whenever possible, look for updated information through searches in the web, Wikipedia, Arxiv, etc.
|
| 35 |
"""
|
| 36 |
return {
|
| 37 |
"messages": [sys_msg] + state["messages"]
|