cowrycode commited on
Commit
1cf8163
·
verified ·
1 Parent(s): 79535ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -26
app.py CHANGED
@@ -22,36 +22,36 @@ class BasicAgent:
22
  def __init__(self):
23
  print("BasicAgent initialized.")
24
  self.graph = build_graph()
25
- self.systemMsg = SystemMessage(
26
- content="""
27
- "You are a helpful assistant tasked with answering questions using a set of tools.\n"
28
- "Your final answer must strictly follow this format:\n"
29
- "FINAL ANSWER: [ANSWER]\n"
30
- "Only write the answer in that exact format. Do not explain anything. Do not include any other text. \n"
31
- "If you are provided with a similar question and its final answer, and the current question is **exactly the same**, then simply return the same final answer without using any tools. \n"
32
- "Only use tools if the current question is different from the similar one. \n"
33
- "Examples: \n"
34
- "- FINAL ANSWER: FunkMonk \n"
35
- "- FINAL ANSWER: Paris \n"
36
- "- FINAL ANSWER: 128 \n"
37
- " \n"
38
- "Once you output 'FINAL ANSWER', stop reasoning and do not call any tool.\n"
39
- "If you do not follow this format exactly, your response will be considered incorrect. \n"
40
- "Use the most up-to-date information available to you we are in December 2025.
41
- """
42
- )
43
  # self.systemMsg = SystemMessage(
44
  # content="""
45
- # "You are an AI agent designed to answer questions by using available tools efficiently.\n"
46
- # "Guidelines:\n"
47
- # "1. Always determine the appropriate tool(s) for the query and use them before generating a response.\n"
48
- # "2. Incorporate the most accurate and up-to-date information; today is December 2025.\n"
49
- # "3. Perform any necessary reasoning or calculations using the tools before responding.\n"
50
- # "4. Structure your final response clearly, ending with: FINAL ANSWER: [ANSWER]\n"
51
- # "5. If information is unavailable or a tool cannot provide a result, indicate that explicitly.\n"
52
- # "Your goal: Combine the tools’ outputs with your reasoning to provide reliable, concise, and actionable answers."
 
 
 
 
 
 
53
  # """
54
  # )
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  def __call__(self, question: str) -> str:
57
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
22
  def __init__(self):
23
  print("BasicAgent initialized.")
24
  self.graph = build_graph()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  # self.systemMsg = SystemMessage(
26
  # content="""
27
+ # "You are a helpful assistant tasked with answering questions using a set of tools.\n"
28
+ # "Your final answer must strictly follow this format:\n"
29
+ # "FINAL ANSWER: [ANSWER]\n"
30
+ # "Only write the answer in that exact format. Do not explain anything. Do not include any other text. \n"
31
+ # "If you are provided with a similar question and its final answer, and the current question is **exactly the same**, then simply return the same final answer without using any tools. \n"
32
+ # "Only use tools if the current question is different from the similar one. \n"
33
+ # "Examples: \n"
34
+ # "- FINAL ANSWER: FunkMonk \n"
35
+ # "- FINAL ANSWER: Paris \n"
36
+ # "- FINAL ANSWER: 128 \n"
37
+ # " \n"
38
+ # "Once you output 'FINAL ANSWER', stop reasoning and do not call any tool.\n"
39
+ # "If you do not follow this format exactly, your response will be considered incorrect. \n"
40
+ # "Use the most up-to-date information available to you we are in December 2025.
41
  # """
42
  # )
43
+ self.systemMsg = SystemMessage(
44
+ content="""
45
+ "You are an AI agent designed to answer questions by using available tools efficiently.\n"
46
+ "Guidelines:\n"
47
+ "1. Always determine the appropriate tool(s) for the query and use them before generating a response.\n"
48
+ "2. Incorporate the most accurate and up-to-date information; today is December 2025.\n"
49
+ "3. Perform any necessary reasoning or calculations using the tools before responding.\n"
50
+ "4. Structure your final response clearly, ending with: FINAL ANSWER: [ANSWER]\n"
51
+ "5. If information is unavailable or a tool cannot provide a result, indicate that explicitly.\n"
52
+ "Your goal: Combine the tools’ outputs with your reasoning to provide reliable, concise, and actionable answers."
53
+ """
54
+ )
55
 
56
  def __call__(self, question: str) -> str:
57
  print(f"Agent received question (first 50 chars): {question[:50]}...")