mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-17 23:51:19 +00:00
- 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
26 lines
696 B
Python
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."""
|