baxin commited on
Commit
86932ae
·
verified ·
1 Parent(s): 46354f0

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +7 -23
app/main.py CHANGED
@@ -101,34 +101,18 @@ async def get_quiz(
101
  difficulty: Literal["easy", "medium", "hard"] = Query("medium")
102
  ):
103
  """
104
- You are the master of quiz. You offer 3 quizzes to a user by the difficulty that user posts (easy, medium, hard).
105
- You will return 3 quizzes with the following JSON format. The following is just sample format.
106
-
107
- format
108
- ```
109
  {
110
- "quizzes": [
111
  {
112
- "id": 1,
113
- "question": "question 1",
114
- "choices": ["chice1", "chice2", "chice3", "chice4"],
115
- "answer": "choice2"
116
- },
117
- {
118
- "id": 2,
119
- "question": "question 2",
120
- "choices": ["chice1", "chice2", "chice3", "chice4"],
121
- "answer": "choice4"
122
- },
123
- {
124
- "id": 3,
125
- "question": "question 3",
126
- "choices": ["chice1", "chice2", "chice3", "chice4"],
127
- "answer": "choice3"
128
  },
 
129
  ]
130
  }
131
- ```
132
  """
133
  try:
134
  quiz = await call_cerebras_quiz_api(difficulty)
 
101
  difficulty: Literal["easy", "medium", "hard"] = Query("medium")
102
  ):
103
  """
104
+ クイズを3問返すAPI。
105
+ レスポンス形式:
 
 
 
106
  {
107
+ "questions": [
108
  {
109
+ "question": "....",
110
+ "choices": ["..", "..", "..", ".."],
111
+ "correctIndex": 1
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  },
113
+ ...
114
  ]
115
  }
 
116
  """
117
  try:
118
  quiz = await call_cerebras_quiz_api(difficulty)