tensor-boy commited on
Commit
bd2f7cd
·
verified ·
1 Parent(s): b47bf87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -25,16 +25,11 @@ class BasicAgent:
25
  if not api_key:
26
  raise ValueError("GEMINI_API_KEY environment variable not set. Please set it before running.")
27
  client = genai.Client(api_key=api_key)
28
- model = "gemini-2.0-flash"
 
29
 
30
  # Define a strict system instruction. Ensure that the output is minimal:
31
- system_instruction_text = (
32
- "You are a general AI assistant. Answer the question with a precise, final answer only. "
33
- "If asked for a number, reply with only that number (without commas or units unless explicitly required). "
34
- "If asked for a string, reply with minimal text (do not include articles or abbreviations). "
35
- "If the answer is a comma separated list, format accordingly with minimal punctuation. "
36
- "Output the answer only, with no extra commentary or explanation."
37
- )
38
 
39
  # Build the conversation contents with the user query.
40
  contents = [
 
25
  if not api_key:
26
  raise ValueError("GEMINI_API_KEY environment variable not set. Please set it before running.")
27
  client = genai.Client(api_key=api_key)
28
+ model = "gemini-2.0-flash-lite"
29
+
30
 
31
  # Define a strict system instruction. Ensure that the output is minimal:
32
+ system_instruction_text = ("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.")
 
 
 
 
 
 
33
 
34
  # Build the conversation contents with the user query.
35
  contents = [