CindyDelage commited on
Commit
0f0d47e
·
verified ·
1 Parent(s): 7628992

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -50,6 +50,7 @@ class BasicAgent:
50
  self.alfred = CodeAgent(
51
  tools=[
52
  self.wiki_url_tool,
 
53
  self.translator,
54
  self.wiki_tool,
55
  self.web_search,
@@ -77,10 +78,11 @@ class BasicAgent:
77
  "and if so, use only the exact words from the question as keywords—no synonyms. "
78
  "(3) If a web search is needed and the answer is likely on Wikipedia, try using the wiki_url_tool to find the relevant page; "
79
  "if that fails, search manually; if you use wikipedia, always use the wiki_tool to extract data from Wikipedia tables. They always contain the answer to your question. Carefully read and analyze them to identify the relevant table and extract the correct information based on the context of your question. Again, one or more valid tables always exist, so double check if needed. For each table, ask yourself the following question : Are the headers compatible with my question ? Is so, use the table. It may not contain the exact word you are searching for, but you will, by analysing the table content and mostly the headers, find the answer, always. Do not rely on any other sources. "
80
- "(4) Never use synonyms not present in the question. "
81
- "(5) Some questions may include a path to an attached file. If it contains an mp3 audio, use audio_tool to translate it to text." #If it contains an image, use image_tool to describe it.
82
- "(6) If you need to know the list of vegetables, you will find it with vegetable_info_retriever."
83
- "(7) If you need to access the transcript of a YouTube video to understand the audio, try searching for it online."
 
84
  "Never make assumptions to answer a question. . If you do not know the answer, say so clearly. Always report your thoughts and finish your answer with the following template: "
85
  "FINAL ANSWER: [YOUR 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. "
86
  "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. "
 
50
  self.alfred = CodeAgent(
51
  tools=[
52
  self.wiki_url_tool,
53
+ self.commutative,
54
  self.translator,
55
  self.wiki_tool,
56
  self.web_search,
 
78
  "and if so, use only the exact words from the question as keywords—no synonyms. "
79
  "(3) If a web search is needed and the answer is likely on Wikipedia, try using the wiki_url_tool to find the relevant page; "
80
  "if that fails, search manually; if you use wikipedia, always use the wiki_tool to extract data from Wikipedia tables. They always contain the answer to your question. Carefully read and analyze them to identify the relevant table and extract the correct information based on the context of your question. Again, one or more valid tables always exist, so double check if needed. For each table, ask yourself the following question : Are the headers compatible with my question ? Is so, use the table. It may not contain the exact word you are searching for, but you will, by analysing the table content and mostly the headers, find the answer, always. Do not rely on any other sources. "
81
+ "(4) If you need to check if a table is commutative, use the commutative tool and nothing else. "
82
+ "(5) Never use synonyms not present in the question. "
83
+ "(6) Some questions may include a path to an attached file. If it contains an mp3 audio, use audio_tool to translate it to text." #If it contains an image, use image_tool to describe it.
84
+ "(7) If you need to know the list of vegetables, you will find it with vegetable_info_retriever."
85
+ "(8) If you need to access the transcript of a YouTube video to understand the audio, try searching for it online."
86
  "Never make assumptions to answer a question. . If you do not know the answer, say so clearly. Always report your thoughts and finish your answer with the following template: "
87
  "FINAL ANSWER: [YOUR 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. "
88
  "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. "