File size: 1,510 Bytes
581b2e8
 
 
 
 
 
 
 
 
 
a7e5906
581b2e8
 
 
 
 
 
a7e5906
581b2e8
 
 
 
a7e5906
581b2e8
 
 
a7e5906
581b2e8
 
a7e5906
581b2e8
 
 
 
a7e5906
581b2e8
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
GEN_QUESTION_FOR_PARAGRAPH_OUTPUT_TOOL = {
    "type": "function",
    "function": {
        "name": "parse_paragraph_questions",
        "description": (
            "Parse the generated reading comprehension questions from a paragraph into structured JSON."
        ),
        "parameters": {
            "type": "object",
            "properties": {
                "list_questions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "question": {
                                "type": "string",
                                "description": "The text of the generated single-choice question."
                            },
                            "choices": {
                                "type": "array",
                                "items": {"type": "string"},
                                "description": "List of answer options."
                            },
                            "answer": {
                                "type": "string",
                                "description": "The correct answer."
                            }
                        },
                        "required": ["question", "choices", "answer"]
                    },
                    "description": "List of generated questions with choices and answers."
                }
            },
            "required": ["list_questions"]
        }
    }
}