from abc import ABC, abstractmethod from queue import Queue from typing import List from app.configs.constants import QuestionType class IReadingService(ABC): @abstractmethod async def gen_reading_passage( self, passage_id: int, topic: str, req_exercises: List[str], number_of_exercises_q: Queue, difficulty: str ): pass # ================================================================================================================== # Helpers # ================================================================================================================== @abstractmethod async def generate_reading_passage(self, q_type: QuestionType, topic: str): pass @abstractmethod async def _generate_reading_exercises( self, passage: str, req_exercises: list, number_of_exercises_q, start_id, difficulty ): pass @abstractmethod async def _gen_summary_fill_blanks_exercise(self, text: str, quantity: int, start_id, difficulty): pass @abstractmethod async def _gen_true_false_not_given_exercise(self, text: str, quantity: int, start_id, difficulty): pass @abstractmethod async def _gen_write_blanks_exercise(self, text: str, quantity: int, start_id, difficulty): pass @abstractmethod async def _gen_paragraph_match_exercise(self, text: str, quantity: int, start_id): pass