memoryscope.core.models.llama_index_embedding_model

class memoryscope.core.models.llama_index_embedding_model.LlamaIndexEmbeddingModel(*args, **kwargs)[源代码]

基类:BaseModel

Manages text embeddings utilizing the DashScopeEmbedding within the LlamaIndex framework, facilitating embedding operations for both sync and async modes, inheriting from BaseModel.

m_type: ModelEnum = 'embedding_model'
__init__(*args, **kwargs)[源代码]
classmethod register_model(model_name: str, model_class: type)[源代码]

Registers a new embedding model class with the model registry.

参数:
  • model_name (str) -- The name to register the model under.

  • model_class (type) -- The class of the model to register.

before_call(model_response: ModelResponse, **kwargs)[源代码]
after_call(model_response: ModelResponse, **kwargs) ModelResponse[源代码]
model_name: str
module_name: str
timeout: int
max_retries: int
retry_interval: float
kwargs_filter: bool
raise_exception: bool
context: MemoryscopeContext
kwargs: dict