from abc import ABC, abstractmethod from typing import Dict class IWritingService(ABC): @abstractmethod async def get_writing_task_general_question(self, task: int, topic: str, difficulty: str): pass @abstractmethod async def grade_writing_task(self, task: int, question: str, answer: str): pass # ================================================================================================================== # Helpers # ================================================================================================================== @staticmethod @abstractmethod def _get_writing_prompt(task: int, topic: str, difficulty: str): pass @staticmethod @abstractmethod async def _get_fixed_text(self, text): pass @staticmethod @abstractmethod def _zero_rating(comment: str): pass