Merge pull request #54 from wrosko/patch-1
Browse files
README.md
CHANGED
@@ -47,12 +47,21 @@ pip install lightrag-hku
|
|
47 |
```bash
|
48 |
curl https://raw.githubusercontent.com/gusye1234/nano-graphrag/main/tests/mock_data.txt > ./book.txt
|
49 |
```
|
50 |
-
Use the below Python snippet to initialize LightRAG and perform queries:
|
51 |
|
52 |
```python
|
53 |
from lightrag import LightRAG, QueryParam
|
54 |
from lightrag.llm import gpt_4o_mini_complete, gpt_4o_complete
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
WORKING_DIR = "./dickens"
|
57 |
|
58 |
if not os.path.exists(WORKING_DIR):
|
|
|
47 |
```bash
|
48 |
curl https://raw.githubusercontent.com/gusye1234/nano-graphrag/main/tests/mock_data.txt > ./book.txt
|
49 |
```
|
50 |
+
Use the below Python snippet (in a script) to initialize LightRAG and perform queries:
|
51 |
|
52 |
```python
|
53 |
from lightrag import LightRAG, QueryParam
|
54 |
from lightrag.llm import gpt_4o_mini_complete, gpt_4o_complete
|
55 |
|
56 |
+
#########
|
57 |
+
# Uncomment the below two lines if running in a jupyter notebook to handle the async nature of rag.insert()
|
58 |
+
# import nest_asyncio
|
59 |
+
# nest_asyncio.apply()
|
60 |
+
#########
|
61 |
+
|
62 |
+
WORKING_DIR = "./dickens"
|
63 |
+
|
64 |
+
|
65 |
WORKING_DIR = "./dickens"
|
66 |
|
67 |
if not os.path.exists(WORKING_DIR):
|