mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复腾讯云向量化失败
This commit is contained in:
parent
aeef9c7714
commit
fc337cf6ef
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue