26 lines
720 B
Python
26 lines
720 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Optional
|
|
|
|
from fastapi import BackgroundTasks
|
|
|
|
|
|
class ISpeakingController(ABC):
|
|
|
|
@abstractmethod
|
|
async def get_speaking_part(self, task: int, topic: str, difficulty: str, second_topic: Optional[str] = None):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def save_speaking(self, data, background_tasks: BackgroundTasks):
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def generate_video(
|
|
self, part: int, avatar: str, topic: str, questions: list[str],
|
|
*,
|
|
second_topic: Optional[str] = None,
|
|
prompts: Optional[list[str]] = None,
|
|
suffix: Optional[str] = None,
|
|
):
|
|
pass
|