Changes to endpoints so they allow to only get context and then the exercises as well as tidying up a bit
This commit is contained in:
@@ -15,5 +15,5 @@ __all__ = [
|
||||
"ILevelController",
|
||||
"IGradeController",
|
||||
"ITrainingController",
|
||||
"IUserController"
|
||||
"IUserController",
|
||||
]
|
||||
|
||||
@@ -6,6 +6,10 @@ from typing import Dict
|
||||
|
||||
class ILevelController(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def generate_exercises(self, dto):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_level_exam(self):
|
||||
pass
|
||||
|
||||
@@ -5,7 +5,11 @@ from typing import List
|
||||
class IListeningController(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def get_listening_question(self, section_id: int, topic: str, exercises: List[str], difficulty: str):
|
||||
async def generate_listening_dialog(self, section_id: int, topic: str, difficulty: str):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_listening_question(self, section: int, dto):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import UploadFile
|
||||
|
||||
|
||||
class IReadingController(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def get_reading_passage(self, passage: int, topic: str, exercises: List[str], difficulty: str):
|
||||
async def import_exam(self, exercises: UploadFile, solutions: UploadFile = None):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def generate_reading_passage(self, passage: int, topic: Optional[str], word_count: Optional[int]):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def generate_reading_exercises(self, passage: int, dto):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user