From b93d7ee81ef41eb268dbaa02d439ed6172695829 Mon Sep 17 00:00:00 2001 From: aero-xi Date: Mon, 12 Aug 2024 16:27:57 +0800 Subject: [PATCH] change insert to be sync (#153) --- src/pai_rag/data/rag_dataloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pai_rag/data/rag_dataloader.py b/src/pai_rag/data/rag_dataloader.py index d69a776c..0aafdd27 100644 --- a/src/pai_rag/data/rag_dataloader.py +++ b/src/pai_rag/data/rag_dataloader.py @@ -222,7 +222,7 @@ async def aload( if enable_raptor: nodes_with_embeddings = await self.node_enhance.acall(nodes=nodes) - await self.index.vector_index.insert_nodes_async(nodes_with_embeddings) + self.index.vector_index.insert_nodes(nodes_with_embeddings) logger.info( f"Async inserted {len(nodes)} and enhanced {len(nodes_with_embeddings)-len(nodes)} nodes successfully."