| 1234567891011121314151617 |
- # -*- coding: utf-8 -*-
- """Base skill definitions for document chat."""
- from abc import ABC, abstractmethod
- from core.document_chat.schemas import DocumentChatSkillInput, DocumentChatSkillOutput
- class BaseDocumentChatSkill(ABC):
- def __init__(self, name: str, function_name: str):
- self.name = name
- self.function_name = function_name
- @abstractmethod
- async def run(self, skill_input: DocumentChatSkillInput) -> DocumentChatSkillOutput:
- """Run the skill and return a normalized output."""
- raise NotImplementedError
|