From 28b53144d9c1da12535003b4183441823551c7f6 Mon Sep 17 00:00:00 2001 From: Yannick Stephan Date: Sun, 9 Feb 2025 15:00:07 +0100 Subject: [PATCH] updated readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 456d9a72..edd33fb0 100644 --- a/README.md +++ b/README.md @@ -408,6 +408,21 @@ rag = LightRAG( with open("./newText.txt") as f: rag.insert(f.read()) ``` + +### Insert using Pipeline +The `apipeline_enqueue_documents` and `apipeline_process_enqueue_documents` functions allow you to perform incremental insertion of documents into the graph. + +This is useful for scenarios where you want to process documents in the background while still allowing the main thread to continue executing. + +And using a routine to process news documents. + +```python +rag = LightRAG(..) +await rag.apipeline_enqueue_documents(string_or_strings) +# Your routine in loop +await rag.apipeline_process_enqueue_documents(string_or_strings) +``` + ### Separate Keyword Extraction We've introduced a new function `query_with_separate_keyword_extraction` to enhance the keyword extraction capabilities. This function separates the keyword extraction process from the user's prompt, focusing solely on the query to improve the relevance of extracted keywords.