Skip to content

Commit

Permalink
change insert to be sync (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
aero-xi authored Aug 12, 2024
1 parent 6a6a2e7 commit b93d7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pai_rag/data/rag_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit b93d7ee

Please sign in to comment.