Merge branch 'HKUDS:main' into main

This commit is contained in:
JavieHush
2024-10-22 15:46:37 +08:00
committed by GitHub

View File

@@ -42,6 +42,7 @@ pip install lightrag-hku
```
## Quick Start
* [Video demo](https://www.youtube.com/watch?v=g21royNJ4fw) of running LightRAG locally.
* All the code can be found in the `examples`.
* Set OpenAI API key in environment if using OpenAI models: `export OPENAI_API_KEY="sk-...".`
* Download the demo text "A Christmas Carol by Charles Dickens":
@@ -51,6 +52,7 @@ curl https://raw.githubusercontent.com/gusye1234/nano-graphrag/main/tests/mock_d
Use the below Python snippet (in a script) to initialize LightRAG and perform queries:
```python
import os
from lightrag import LightRAG, QueryParam
from lightrag.llm import gpt_4o_mini_complete, gpt_4o_complete
@@ -63,8 +65,6 @@ from lightrag.llm import gpt_4o_mini_complete, gpt_4o_complete
WORKING_DIR = "./dickens"
WORKING_DIR = "./dickens"
if not os.path.exists(WORKING_DIR):
os.mkdir(WORKING_DIR)