Ramja commited on
Commit
f0a86d4
·
verified ·
1 Parent(s): deadfb6

Update app.py

Browse files

modifications for attempt 4

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from agents import web_agent_1, web_agent_2, web_agent_3 ,agent_1_instructions
9
  # --- Constants ---
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
  initial_general_instructions = "You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: 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. 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."
12
- basic_general_instructions = "/nGive the final answer as concise as possible providing only the answer to the question."
13
  # --- Basic Agent Definition ---
14
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
15
  class BasicAgent:
@@ -18,7 +18,7 @@ class BasicAgent:
18
  def __call__(self, question: str) -> str:
19
  print(f"Agent received question (first 50 chars): {question[:50]}...")
20
  final_question = initial_general_instructions + agent_1_instructions + question + basic_general_instructions
21
- final_answer = web_agent_2.run(final_question)
22
  print(f"Agent returning fixed answer: {final_answer}")
23
  return final_answer
24
 
 
9
  # --- Constants ---
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
  initial_general_instructions = "You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: 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. 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."
12
+ basic_general_instructions = "/nGive the final answer as concise as possible providing only the answer to the question. Pay special attention on the type of data required. Never include the words: FINAL ANSWER"
13
  # --- Basic Agent Definition ---
14
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
15
  class BasicAgent:
 
18
  def __call__(self, question: str) -> str:
19
  print(f"Agent received question (first 50 chars): {question[:50]}...")
20
  final_question = initial_general_instructions + agent_1_instructions + question + basic_general_instructions
21
+ final_answer = web_agent_3.run(final_question)
22
  print(f"Agent returning fixed answer: {final_answer}")
23
  return final_answer
24