chore(model): Modify siliconflow name (#2194)

This commit is contained in:
Fangyin Cheng
2024-12-12 16:47:14 +08:00
committed by GitHub
parent 4da1809b31
commit dab55493f5
10 changed files with 48 additions and 28 deletions

View File

@@ -506,6 +506,7 @@ class Service(BaseService[KnowledgeSpaceEntity, SpaceServeRequest, SpaceServeRes
name=space.name,
embedding_fn=embedding_fn,
max_chunks_once_load=CFG.KNOWLEDGE_MAX_CHUNKS_ONCE_LOAD,
max_threads=CFG.KNOWLEDGE_MAX_THREADS,
llm_client=self.llm_client,
model_name=None,
)
@@ -567,6 +568,10 @@ class Service(BaseService[KnowledgeSpaceEntity, SpaceServeRequest, SpaceServeRes
doc.chunk_size = len(chunk_docs)
vector_ids = [chunk.chunk_id for chunk in chunk_docs]
else:
max_chunks_once_load = (
vector_store_connector._index_store_config.max_chunks_once_load
)
max_threads = vector_store_connector._index_store_config.max_threads
assembler = await EmbeddingAssembler.aload_from_knowledge(
knowledge=knowledge,
index_store=vector_store_connector.index_client,
@@ -575,7 +580,10 @@ class Service(BaseService[KnowledgeSpaceEntity, SpaceServeRequest, SpaceServeRes
chunk_docs = assembler.get_chunks()
doc.chunk_size = len(chunk_docs)
vector_ids = await assembler.apersist()
vector_ids = await assembler.apersist(
max_chunks_once_load=max_chunks_once_load,
max_threads=max_threads,
)
doc.status = SyncStatus.FINISHED.name
doc.result = "document persist into index store success"
if vector_ids is not None: