Brushed up the backend, added writing task 1 academic prompt gen and grading ENCOA-274
This commit is contained in:
7
ielts_be/services/abc/training/__init__.py
Normal file
7
ielts_be/services/abc/training/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from .training import ITrainingService
|
||||
from .kb import IKnowledgeBase
|
||||
|
||||
__all__ = [
|
||||
"ITrainingService",
|
||||
"IKnowledgeBase"
|
||||
]
|
||||
10
ielts_be/services/abc/training/kb.py
Normal file
10
ielts_be/services/abc/training/kb.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from typing import List, Dict
|
||||
|
||||
|
||||
class IKnowledgeBase(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def query_knowledge_base(self, query: str, category: str, top_k: int = 5) -> List[Dict[str, str]]:
|
||||
pass
|
||||
14
ielts_be/services/abc/training/training.py
Normal file
14
ielts_be/services/abc/training/training.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class ITrainingService(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def fetch_tips(self, context: str, question: str, answer: str, correct_answer: str):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_training_content(self, training_content: Dict) -> Dict:
|
||||
pass
|
||||
Reference in New Issue
Block a user