Updated this to the latest version of develop, got rid of most of the duplication, might be missing some packages in toml, needs testing

This commit is contained in:
Carlos Mesquita
2024-08-30 02:35:11 +01:00
parent 3cf9fa5cba
commit f92a803d96
73 changed files with 3642 additions and 2703 deletions

View File

@@ -2,8 +2,6 @@ from abc import ABC, abstractmethod
from queue import Queue
from typing import List
from app.configs.constants import QuestionType
class IReadingService(ABC):
@@ -14,36 +12,11 @@ class IReadingService(ABC):
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
difficulty: str,
start_id: int
):
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):
async def generate_reading_passage(self, part: int, topic: str, word_count: int = 800):
pass