update:milvus batch

This commit is contained in:
aries-ckt
2023-05-25 17:17:02 +08:00
parent 85906a3c45
commit adb8a5a316
2 changed files with 9 additions and 8 deletions

View File

@@ -2,9 +2,6 @@
# -*- coding: utf-8 -*-
from abc import ABC, abstractmethod
from typing import Dict, List, Optional
from langchain.embeddings import HuggingFaceEmbeddings
from pilot.configs.config import Config
from pilot.vector_store.connector import VectorStoreConnector
@@ -35,9 +32,7 @@ class SourceEmbedding(ABC):
self.model_name = model_name
self.vector_store_config = vector_store_config
self.embedding_args = embedding_args
self.embeddings = HuggingFaceEmbeddings(model_name=self.model_name)
vector_store_config["embeddings"] = self.embeddings
self.embeddings = vector_store_config["embeddings"]
self.vector_client = VectorStoreConnector(
CFG.VECTOR_STORE_TYPE, vector_store_config
)