mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
24 lines
739 B
Python
24 lines
739 B
Python
from llama_index.embeddings.dashscope import DashScopeEmbedding
|
|
|
|
from memory_scope.models import MODEL_REGISTRY
|
|
from memory_scope.models.base_model import BaseModel
|
|
from memory_scope.models.response import ModelResponse, ModelResponseGen
|
|
|
|
|
|
class BaseEmbeddingModel(BaseModel):
|
|
MODEL_REGISTRY.batch_register([
|
|
DashScopeEmbedding,
|
|
])
|
|
|
|
def before_call(self, **kwargs) -> None:
|
|
pass
|
|
|
|
def after_call(self, model_response: ModelResponse | ModelResponseGen,
|
|
**kwargs) -> ModelResponse | ModelResponseGen:
|
|
pass
|
|
|
|
def _call(self, stream: bool = False, **kwargs) -> ModelResponse | ModelResponseGen:
|
|
pass
|
|
|
|
async def _async_call(self, **kwargs) -> ModelResponse:
|
|
pass
|