35 lines
711 B
Python
35 lines
711 B
Python
import random
|
|
from typing import List, Dict
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from app.configs.constants import MinTimers, AvatarEnum
|
|
|
|
|
|
class SaveSpeakingDTO(BaseModel):
|
|
exercises: List[Dict]
|
|
minTimer: int = MinTimers.SPEAKING_MIN_TIMER_DEFAULT
|
|
|
|
|
|
class SpeakingGradeTask1And2DTO(BaseModel):
|
|
question: str
|
|
answer: str
|
|
|
|
|
|
class SpeakingGradeTask3DTO(BaseModel):
|
|
answers: Dict
|
|
|
|
|
|
class SpeakingGenerateVideoDTO(BaseModel):
|
|
avatar: str = (random.choice(list(AvatarEnum))).value
|
|
prompts: List[str] = []
|
|
question: str
|
|
topic: str
|
|
|
|
|
|
class SpeakingGenerateInteractiveVideoDTO(BaseModel):
|
|
avatar: str = (random.choice(list(AvatarEnum))).value
|
|
questions: List[str]
|
|
topic: str
|
|
|