Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def generate_question(topic, difficulty):
|
|
35 |
prompt = f"請根據以下教育學教材內容,設計一個屬於「{topic}」主題、「{difficulty}」難度的考題:\n\n{pdf_text}"
|
36 |
try:
|
37 |
response = openai.ChatCompletion.create(
|
38 |
-
model="gpt-
|
39 |
messages=[
|
40 |
{"role": "system", "content": "你是一位教育專家,請根據教材內容設計問題。"},
|
41 |
{"role": "user", "content": prompt}
|
@@ -57,7 +57,7 @@ def analyze_answer(user_input, topic):
|
|
57 |
|
58 |
try:
|
59 |
response = openai.ChatCompletion.create(
|
60 |
-
model="gpt-
|
61 |
messages=[
|
62 |
{"role": "system", "content": "你是一位教育專家,請根據教材內容分析學生回答。"},
|
63 |
{"role": "user", "content": prompt}
|
|
|
35 |
prompt = f"請根據以下教育學教材內容,設計一個屬於「{topic}」主題、「{difficulty}」難度的考題:\n\n{pdf_text}"
|
36 |
try:
|
37 |
response = openai.ChatCompletion.create(
|
38 |
+
model="gpt-4o-mini-2024-07-18",
|
39 |
messages=[
|
40 |
{"role": "system", "content": "你是一位教育專家,請根據教材內容設計問題。"},
|
41 |
{"role": "user", "content": prompt}
|
|
|
57 |
|
58 |
try:
|
59 |
response = openai.ChatCompletion.create(
|
60 |
+
model="gpt-4o-mini-2024-07-18",
|
61 |
messages=[
|
62 |
{"role": "system", "content": "你是一位教育專家,請根據教材內容分析學生回答。"},
|
63 |
{"role": "user", "content": prompt}
|