Writing and speaking rework, some changes to module upload
This commit is contained in:
18
app/dtos/evaluation.py
Normal file
18
app/dtos/evaluation.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from enum import Enum
|
||||
from typing import Dict, Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class EvaluationType(str, Enum):
|
||||
WRITING = "writing"
|
||||
SPEAKING_INTERACTIVE = "speaking_interactive"
|
||||
SPEAKING = "speaking"
|
||||
|
||||
class EvaluationRecord(BaseModel):
|
||||
id: str
|
||||
session_id: str
|
||||
exercise_id: str
|
||||
type: EvaluationType
|
||||
task: int
|
||||
status: str = "pending"
|
||||
result: Optional[Dict] = None
|
||||
@@ -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
|
||||
|
||||
@@ -2,5 +2,7 @@ from pydantic import BaseModel
|
||||
|
||||
|
||||
class WritingGradeTaskDTO(BaseModel):
|
||||
sessionId: str
|
||||
question: str
|
||||
answer: str
|
||||
exercise_id: str
|
||||
|
||||
Reference in New Issue
Block a user