ORromu commited on
Commit
b60955d
·
verified ·
1 Parent(s): 7afbc13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -13,6 +13,12 @@ model = OpenAIServerModel(
13
  api_base="https://generativelanguage.googleapis.com/v1beta/openai/"
14
  )
15
 
 
 
 
 
 
 
16
  # (Keep Constants as is)
17
  # --- Constants ---
18
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
@@ -25,6 +31,7 @@ class BasicAgent:
25
  tools = [DuckDuckGoSearchTool(), WikipediaSearchTool()],
26
  model = model,
27
  add_base_tools=True
 
28
  )
29
  print("BasicAgent initialized.")
30
  def __call__(self, question: str) -> str:
 
13
  api_base="https://generativelanguage.googleapis.com/v1beta/openai/"
14
  )
15
 
16
+ prompt = """You are a helpful assistant tasked with answering questions using a set of tools.
17
+ Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
18
+ FINAL ANSWER: [YOUR FINAL ANSWER].
19
+ 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.
20
+ Your answer should only start with "FINAL ANSWER: ", then follows with the answer. """
21
+
22
  # (Keep Constants as is)
23
  # --- Constants ---
24
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
 
31
  tools = [DuckDuckGoSearchTool(), WikipediaSearchTool()],
32
  model = model,
33
  add_base_tools=True
34
+ system_prompt = prompt
35
  )
36
  print("BasicAgent initialized.")
37
  def __call__(self, question: str) -> str: