File size: 1,338 Bytes
325b94c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from pydantic import BaseModel, Field
from typing import List, Dict, Literal, Optional

# ====== Pydantic Model for Analysis Phase ======
class AnalysisOutput(BaseModel):
    goal: str = Field(
        ...,
        description="Overall training goal, must start with 'أن يتمكّن المتدرب من...'.",
    )
    target_audience: str = Field(
        ...,
        description="The target audience group and their average age/professional profile.",
    )
    previous_experiences: List[str] = Field(
        ..., description="3–5 short noun-phrases reflecting prior experiences."
    )
    learner_characteristics: List[str] = Field(
        ..., description="Learner characteristics based on developmental dimensions."
    )
    training_needs: List[str] = Field(
        ...,
        description="6 noun-phrases representing training needs extracted from course topics.",
    )
    constraints: Dict[str, List[str]] = Field(
        ...,
        description="Constraints divided into {'trainer': [...], 'trainee': [...]}, 4 noun-phrases each.",
    )
    duration: str = Field(..., description="The duration of the course (days/hours).")
    sources_of_analysis: List[str] = Field(
        ...,
        description="Noun-phrases starting and ending with a مصدر, e.g., 'جمع البيانات وتحليلها'.",
    )