Spaces:
Build error
Build error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -21,22 +21,11 @@ from typing import TypedDict, Annotated, List
|
|
| 21 |
load_dotenv()
|
| 22 |
|
| 23 |
# Custom Agent Prompt Template
|
| 24 |
-
Agent_prompt_template = '''You are a helpful assistant
|
| 25 |
-
|
| 26 |
FINAL ANSWER: [YOUR FINAL ANSWER].
|
| 27 |
-
|
| 28 |
-
|
| 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. 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.
|
| 32 |
-
- Provide the answer in clear and professional language.
|
| 33 |
-
- **Limit** the FINAL ANSWER to 1000 words and keep it to the point.
|
| 34 |
-
- **Do not** include any additional information or explanations in your FINAL ANSWER.
|
| 35 |
-
- **Do not** include any information that is not relevant to the question.
|
| 36 |
-
- **Validate** your answer before providing it.
|
| 37 |
-
- **Print** all the steps you take to arrive at your answer.
|
| 38 |
-
|
| 39 |
-
Your answer should only start with "FINAL ANSWER: ", then follows with the answer. '''
|
| 40 |
|
| 41 |
sys_msg = SystemMessage(content=Agent_prompt_template)
|
| 42 |
|
|
|
|
| 21 |
load_dotenv()
|
| 22 |
|
| 23 |
# Custom Agent Prompt Template
|
| 24 |
+
Agent_prompt_template = '''You are a helpful assistant tasked with answering questions using a set of tools.
|
| 25 |
+
Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
| 26 |
FINAL ANSWER: [YOUR FINAL ANSWER].
|
| 27 |
+
YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. 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. 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. 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.
|
| 28 |
+
Your answer should only start with "FINAL ANSWER: ", then follows with the answer. '''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
sys_msg = SystemMessage(content=Agent_prompt_template)
|
| 31 |
|