memoryscope.core.models.base_model
- class memoryscope.core.models.base_model.BaseModel(model_name: str, module_name: str, timeout: int | None = None, max_retries: int = 3, retry_interval: float = 1.0, kwargs_filter: bool = True, raise_exception: bool = True, **kwargs)[源代码]
基类:
object
- __init__(model_name: str, module_name: str, timeout: int | None = None, max_retries: int = 3, retry_interval: float = 1.0, kwargs_filter: bool = True, raise_exception: bool = True, **kwargs)[源代码]
- model_name: str
- module_name: str
- timeout: int
- max_retries: int
- retry_interval: float
- kwargs_filter: bool
- raise_exception: bool
- context: _singleton
- kwargs: dict
- property model
- abstract before_call(model_response: ModelResponse, **kwargs)[源代码]
- abstract after_call(model_response: ModelResponse, **kwargs) ModelResponse | Generator[ModelResponse, None, None] [源代码]
- call(stream: bool = False, **kwargs) ModelResponse | Generator[ModelResponse, None, None] [源代码]
- async async_call(**kwargs) ModelResponse [源代码]