Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,11 +98,11 @@ def tool_selector(state: AgentState) -> AgentState:
|
|
| 98 |
" {'action':'audio'}\n"
|
| 99 |
" {'action':'excel'}\n"
|
| 100 |
" {'action':'final'}\n"
|
| 101 |
-
"if the tool you want isnt listed above, return {'action':'final'}"
|
| 102 |
-
"Use wiki if you need to search online for information. Keep the query short and concise and accurate."
|
| 103 |
-
"
|
| 104 |
-
"Use audio if the question is about an audio file"
|
| 105 |
-
"Use excel if the question is about an excel file"
|
| 106 |
|
| 107 |
)
|
| 108 |
)
|
|
@@ -163,7 +163,7 @@ def excel_tool(state: AgentState) -> AgentState:
|
|
| 163 |
def final_node(state: AgentState) -> AgentState:
|
| 164 |
print("reached final node")
|
| 165 |
wrap = SystemMessage(
|
| 166 |
-
content="Using everything so far, reply ONLY with {'final_answer':'…'}. 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."
|
| 167 |
"reply **only** with "
|
| 168 |
"{\"final_answer\":\"…\"} (no markdown, no commentary)."
|
| 169 |
)
|
|
|
|
| 98 |
" {'action':'audio'}\n"
|
| 99 |
" {'action':'excel'}\n"
|
| 100 |
" {'action':'final'}\n"
|
| 101 |
+
"if the tool you want isnt listed above, return {'action':'final'} \n"
|
| 102 |
+
"Use wiki if you need to search online for information. Keep the query short and concise and accurate. The query should not be a prompt but instad you should search for the relevant information rather than asking for the answer directly.\n"
|
| 103 |
+
"If the question is about any image, you have to use ocr tool. It will tell you about the image also\n"
|
| 104 |
+
"Use audio if the question is about an audio file\n"
|
| 105 |
+
"Use excel if the question is about an excel file\n"
|
| 106 |
|
| 107 |
)
|
| 108 |
)
|
|
|
|
| 163 |
def final_node(state: AgentState) -> AgentState:
|
| 164 |
print("reached final node")
|
| 165 |
wrap = SystemMessage(
|
| 166 |
+
content="Using everything so far, reply ONLY with {'final_answer':'…'}. 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. \n"
|
| 167 |
"reply **only** with "
|
| 168 |
"{\"final_answer\":\"…\"} (no markdown, no commentary)."
|
| 169 |
)
|