dlaima commited on
Commit
24398a5
·
verified ·
1 Parent(s): 8e3003f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -7
app.py CHANGED
@@ -9,16 +9,30 @@ import re
9
  from smolagents import CodeAgent, DuckDuckGoSearchTool
10
  from smolagents.models import OpenAIServerModel
11
 
12
- SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question.
13
- Think step-by-step and finish your answer using the template:
14
  FINAL ANSWER: [YOUR FINAL ANSWER]
15
 
16
- Rules for FINAL ANSWER:
17
- - A number: no commas, units, or extra words. Use plain digits only.
18
- - A string: no articles or abbreviations. Use lowercase.
19
- - A list: comma-separated values, formatted as above.
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- Only output the FINAL ANSWER line at the end. Do not explain the answer or repeat the question."""
 
22
 
23
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
24
 
 
9
  from smolagents import CodeAgent, DuckDuckGoSearchTool
10
  from smolagents.models import OpenAIServerModel
11
 
12
+ SYSTEM_PROMPT = """You are a general AI assistant. Reason step by step, then finish with:
13
+
14
  FINAL ANSWER: [YOUR FINAL ANSWER]
15
 
16
+ Answer rules:
17
+ - Numbers: no commas, units, or extra words. Just digits.
18
+ - Strings: lowercase, no articles or abbreviations.
19
+ - Lists: comma-separated, following the above.
20
+
21
+ Examples:
22
+ Q: What is 12 + 7?
23
+ A: 12 + 7 = 19
24
+ FINAL ANSWER: 19
25
+
26
+ Q: Name three European capital cities.
27
+ A: They are Paris, Berlin, and Rome.
28
+ FINAL ANSWER: paris, berlin, rome
29
+
30
+ Q: What is the square root of 81?
31
+ A: \u221a81 = 9
32
+ FINAL ANSWER: 9
33
 
34
+ Now answer the following:
35
+ """
36
 
37
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
38