Async release
This commit is contained in:
32
app/services/abc/writing.py
Normal file
32
app/services/abc/writing.py
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
Reference in New Issue
Block a user