ReMe/reme2/component/client/base_client.py
jinli.yl ca5970c6b0 refactor(component): refactor base components and file store implementations
- Remove abstract methods from base component start/close
- Update BaseJob to remove name parameter and simplify initialization
- Change file modification time field from mtime_ms to modified_time in seconds
- Add type checking imports and improve typing annotations
- Implement LocalFileStore with JSONL persistence for file chunks
- Add MdFileParser with markdown and frontmatter support
- Simplify HttpClient call method with proper kwargs handling
- Remove unused ReMe class methods and create backup version
- Update StreamJob to use step_components instead of steps attribute
2026-04-23 17:44:25 +08:00

26 lines
696 B
Python

"""Abstract base class for client implementations."""
from abc import abstractmethod
from ..base_component import BaseComponent
from ...enumeration import ComponentEnum
class BaseClient(BaseComponent):
"""Abstract base class for clients that communicate with ReMe services."""
component_type = ComponentEnum.CLIENT
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
self.client = None
async def _start(self) -> None:
"""Initialize the client."""
async def _close(self) -> None:
"""Close the client."""
@abstractmethod
async def __call__(self) -> dict:
"""Invoke an action with the given configuration."""