MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / __init__

Method __init__

api/dashscope_client.py:739–746  ·  view source on GitHub ↗
(self, embedder, batch_size: int = 100, embedding_cache_file_name: str = "default")

Source from the content-addressed store, hash-verified

737 """Batch embedder specifically designed for DashScope API"""
738
739 def __init__(self, embedder, batch_size: int = 100, embedding_cache_file_name: str = "default") -> None:
740 super().__init__(batch_size=batch_size)
741 self.embedder = embedder
742 self.batch_size = batch_size
743 if self.batch_size > 25:
744 log.warning(f"DashScope batch embedder initialization, batch size: {self.batch_size}, note that DashScope batch embedding size cannot exceed 25, automatically set to 25")
745 self.batch_size = 25
746 self.cache_path = f'./embedding_cache/{embedding_cache_file_name}_{self.embedder.__class__.__name__}_dashscope_embeddings.pkl'
747
748 def call(
749 self, input: BatchEmbedderInputType, model_kwargs: Optional[Dict] = {}, force_recreate: bool = False

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected