Spaces:
Sleeping
Sleeping
File size: 576 Bytes
dbaa71b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
from abc import abstractmethod
from typing import List, Any
from pydantic_settings import BaseSettings
from obsei.payload import TextPayload
class BaseTextProcessorConfig(BaseSettings):
TYPE: str = "Base"
class Config:
arbitrary_types_allowed = True
class BaseTextPreprocessor(BaseSettings):
TYPE: str = "Base"
@abstractmethod
def preprocess_input(
self, input_list: List[TextPayload], config: BaseTextProcessorConfig, **kwargs: Any
) -> List[TextPayload]:
pass
class Config:
arbitrary_types_allowed = True
|