fix: 修复腾讯云向量化失败

This commit is contained in:
shaohuzhang1 2024-10-22 18:55:13 +08:00 committed by shaohuzhang1
parent aeef9c7714
commit fc337cf6ef

View File

@ -5,8 +5,10 @@ from tencentcloud.common import credential
from tencentcloud.hunyuan.v20230901.hunyuan_client import HunyuanClient
from tencentcloud.hunyuan.v20230901.models import GetEmbeddingRequest
from setting.models_provider.base_model_provider import MaxKBBaseModel
class TencentEmbeddingModel(Embeddings):
class TencentEmbeddingModel(MaxKBBaseModel, Embeddings):
def embed_documents(self, texts: List[str]) -> List[List[float]]:
return [self.embed_query(text) for text in texts]