Writing and speaking rework, some changes to module upload

This commit is contained in:
Carlos-Mesquita
2024-11-25 16:41:38 +00:00
parent a54dfad43a
commit a7da187ec6
20 changed files with 495 additions and 195 deletions

View File

@@ -1,27 +1,13 @@
import random
from typing import List, Dict, Optional
from typing import List, Dict
from fastapi import UploadFile
from pydantic import BaseModel
from app.configs.constants import MinTimers
class Video(BaseModel):
text: str
avatar: str
class SaveSpeakingDTO(BaseModel):
exercises: List[Dict]
minTimer: int = MinTimers.SPEAKING_MIN_TIMER_DEFAULT
class GradeSpeakingDTO(BaseModel):
class GradeSpeakingItem(BaseModel):
question: str
answer: str
class GradeSpeakingAnswersDTO(BaseModel):
answers: List[Dict]
class GenerateVideo1DTO(BaseModel):
avatar: str = Optional[str]
questions: List[str]
first_topic: str
second_topic: str
answer: UploadFile