Add comment specifying jupyter req
Add lines that can be uncommented if running in a jupyter notebook
This commit is contained in:
11
README.md
11
README.md
@@ -47,12 +47,21 @@ pip install lightrag-hku
|
|||||||
```bash
|
```bash
|
||||||
curl https://raw.githubusercontent.com/gusye1234/nano-graphrag/main/tests/mock_data.txt > ./book.txt
|
curl https://raw.githubusercontent.com/gusye1234/nano-graphrag/main/tests/mock_data.txt > ./book.txt
|
||||||
```
|
```
|
||||||
Use the below Python snippet to initialize LightRAG and perform queries:
|
Use the below Python snippet (in a script) to initialize LightRAG and perform queries:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from lightrag import LightRAG, QueryParam
|
from lightrag import LightRAG, QueryParam
|
||||||
from lightrag.llm import gpt_4o_mini_complete, gpt_4o_complete
|
from lightrag.llm import gpt_4o_mini_complete, gpt_4o_complete
|
||||||
|
|
||||||
|
#########
|
||||||
|
# Uncomment the below two lines if running in a jupyter notebook to handle the async nature of rag.insert()
|
||||||
|
# import nest_asyncio
|
||||||
|
# nest_asyncio.apply()
|
||||||
|
#########
|
||||||
|
|
||||||
|
WORKING_DIR = "./dickens"
|
||||||
|
|
||||||
|
|
||||||
WORKING_DIR = "./dickens"
|
WORKING_DIR = "./dickens"
|
||||||
|
|
||||||
if not os.path.exists(WORKING_DIR):
|
if not os.path.exists(WORKING_DIR):
|
||||||
|
Reference in New Issue
Block a user