s1144662 commited on
Commit
335b6ab
·
verified ·
1 Parent(s): f64bfe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -35,17 +35,25 @@ class GroqAgent:
35
  "messages": [
36
  {
37
  "role": "system",
38
- "content": "You are a helpful AI assistant. Answer questions accurately and concisely. Provide direct answers without unnecessary explanation."
 
 
 
 
 
39
  },
40
  {
41
  "role": "user",
42
- "content": question
43
  }
44
  ],
45
- "temperature": 0.2,
46
- "max_tokens": 500,
47
  "top_p": 0.9
48
  }
 
 
 
49
 
50
  response = requests.post(
51
  GROQ_API_URL,
 
35
  "messages": [
36
  {
37
  "role": "system",
38
+ "content": (
39
+ "You are taking a strict multiple-choice exam. "
40
+ "For each question, give ONLY the final answer in 1-2 sentences. "
41
+ "No explanations, no introductions, no 'I'm an AI' statements. "
42
+ "If you can't see a video/image/file, use web knowledge and typical context to infer."
43
+ )
44
  },
45
  {
46
  "role": "user",
47
+ "content": f"Question: {question}\n\nAnswer:"
48
  }
49
  ],
50
+ "temperature": 0.1, # 更低的隨機性
51
+ "max_tokens": 300,
52
  "top_p": 0.9
53
  }
54
+
55
+ "top_p": 0.9
56
+ }
57
 
58
  response = requests.post(
59
  GROQ_API_URL,