mirjam-m commited on
Commit
3023bae
·
1 Parent(s): d14382e

graph test

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -47,8 +47,8 @@ Perform any final reasoning or calculation steps needed based on the collected d
47
  Double-check that the synthesized answer directly addresses the original question and respects ALL specific formatting or content details requested (e.g., rounding, order, units IF asked for).\n"
48
 
49
  4. Format Output:
50
- Response **MUST** start **EXACTLY** with `FINAL ANSWER: ` followed by the answer. NO EXCEPTIONS
51
- The part after `FINAL ANSWER: ` **MUST** contain **ONLY** the final answer, formatted precisely
52
 
53
  Question: {question}
54
  """
@@ -59,6 +59,7 @@ class AnswerState(TypedDict):
59
  answer: Optional[str]
60
  messages: List[Dict[str, Any]]
61
  is_final_answer: bool
 
62
 
63
 
64
  class BasicAgent:
@@ -92,6 +93,7 @@ class BasicAgent:
92
  "answer": None,
93
  "messages": [],
94
  "is_final_answer": False,
 
95
  }
96
  )
97
  return res.get("answer", "N/A")
@@ -134,6 +136,8 @@ class BasicAgent:
134
  print(f"Agent returning answer: {state['answer']}")
135
  state["answer"] = answer
136
 
 
 
137
  return "FINAL_ANSWER"
138
 
139
 
 
47
  Double-check that the synthesized answer directly addresses the original question and respects ALL specific formatting or content details requested (e.g., rounding, order, units IF asked for).\n"
48
 
49
  4. Format Output:
50
+ Response **MUST** start **EXACTLY** with `FINAL ANSWER: ` followed by the answer.
51
+ OR with `TOOL: ` followed by the tool name and the request to the tool, example `TOOL: GoogleSearchAgent(request='search query')`
52
 
53
  Question: {question}
54
  """
 
59
  answer: Optional[str]
60
  messages: List[Dict[str, Any]]
61
  is_final_answer: bool
62
+ search_request: Optional[str]
63
 
64
 
65
  class BasicAgent:
 
93
  "answer": None,
94
  "messages": [],
95
  "is_final_answer": False,
96
+ "search_request": None,
97
  }
98
  )
99
  return res.get("answer", "N/A")
 
136
  print(f"Agent returning answer: {state['answer']}")
137
  state["answer"] = answer
138
 
139
+ return "FINAL_ANSWER"
140
+
141
  return "FINAL_ANSWER"
142
 
143