albertCHY commited on
Commit
7bcf80c
·
verified ·
1 Parent(s): b16d221

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -29,7 +29,7 @@ class BasicAgent:
29
  def __call__(self, question: str) -> str:
30
  response = graph.invoke({
31
  "messages": [SystemMessage(content = """
32
- You are a helpful assistant tasked with answering questions using a set of tools.
33
  Now, I will ask you a question. Report your thoughts, and answer in the fewest words possible.
34
  If the answer is only one word, format it as such, no extra punctuation.
35
  If your answer is a list, use a comma delimited list. Ex "cornstarch, freshly squeezed lemon juice, granulated sugar" or "Myanmar, Indonesia"
@@ -37,7 +37,19 @@ If your answer is a number, only respond with the number, nothing else.
37
  DO NOT USE SQUARE BRACKETS IN YOUR ANSWERS UNLESS DIRECTLY STATED.
38
  DO NOT START YOUR ANSWER WITH "YOUR FINAL ANSWER".
39
  YOUR ANSWER SHOULD ONLY BE THE ANSWER AND NOTHING ELSE.
40
- If you need to process any video or audio, return "I don't have enough tools yet" since such tools haven't been provided.
 
 
 
 
 
 
 
 
 
 
 
 
41
  """), HumanMessage(content=question)],
42
  "file_path": None,
43
  "url": None,
 
29
  def __call__(self, question: str) -> str:
30
  response = graph.invoke({
31
  "messages": [SystemMessage(content = """
32
+ You are a helpful assistant tasked with answering GIGA questions using a set of tools.
33
  Now, I will ask you a question. Report your thoughts, and answer in the fewest words possible.
34
  If the answer is only one word, format it as such, no extra punctuation.
35
  If your answer is a list, use a comma delimited list. Ex "cornstarch, freshly squeezed lemon juice, granulated sugar" or "Myanmar, Indonesia"
 
37
  DO NOT USE SQUARE BRACKETS IN YOUR ANSWERS UNLESS DIRECTLY STATED.
38
  DO NOT START YOUR ANSWER WITH "YOUR FINAL ANSWER".
39
  YOUR ANSWER SHOULD ONLY BE THE ANSWER AND NOTHING ELSE.
40
+ If you need to process any video or audio, or run any code, return "I don't have enough tools yet" since such tools haven't been provided.
41
+ Available Tools:
42
+ extract_text_from_image: Get informations and extracts text from an image file. Only use this tool if a file_path is currently not None in the State.
43
+ One argument, takes in a string file path, and returns informations from the image.
44
+
45
+ download_and_read_file: Download and read the file attached to the GAIA task its contents.
46
+ Call this first if there is a file attached to a GAIA Task.
47
+ One argument, the task_id that belongs to the GAIA task whose file should be downloaded and read.
48
+
49
+ wikipedia_search_tool: Search wikipedia for a query and return a max of three results.
50
+ One argument, takes a keywords string as the search query.
51
+
52
+ web_search_tool: Use DuckDuckSearchRun to get result for a query.
53
  """), HumanMessage(content=question)],
54
  "file_path": None,
55
  "url": None,