updated readme
Browse files
README.md
CHANGED
@@ -408,6 +408,21 @@ rag = LightRAG(
|
|
408 |
with open("./newText.txt") as f:
|
409 |
rag.insert(f.read())
|
410 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
### Separate Keyword Extraction
|
412 |
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.
|
413 |
|
|
|
408 |
with open("./newText.txt") as f:
|
409 |
rag.insert(f.read())
|
410 |
```
|
411 |
+
|
412 |
+
### Insert using Pipeline
|
413 |
+
The `apipeline_enqueue_documents` and `apipeline_process_enqueue_documents` functions allow you to perform incremental insertion of documents into the graph.
|
414 |
+
|
415 |
+
This is useful for scenarios where you want to process documents in the background while still allowing the main thread to continue executing.
|
416 |
+
|
417 |
+
And using a routine to process news documents.
|
418 |
+
|
419 |
+
```python
|
420 |
+
rag = LightRAG(..)
|
421 |
+
await rag.apipeline_enqueue_documents(string_or_strings)
|
422 |
+
# Your routine in loop
|
423 |
+
await rag.apipeline_process_enqueue_documents(string_or_strings)
|
424 |
+
```
|
425 |
+
|
426 |
### Separate Keyword Extraction
|
427 |
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.
|
428 |
|