zrguo
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -85,7 +85,7 @@ Use the below Python snippet (in a script) to initialize LightRAG and perform qu
|
|
85 |
```python
|
86 |
import os
|
87 |
from lightrag import LightRAG, QueryParam
|
88 |
-
from lightrag.llm.openai import gpt_4o_mini_complete, gpt_4o_complete
|
89 |
|
90 |
#########
|
91 |
# Uncomment the below two lines if running in a jupyter notebook to handle the async nature of rag.insert()
|
@@ -95,12 +95,12 @@ from lightrag.llm.openai import gpt_4o_mini_complete, gpt_4o_complete
|
|
95 |
|
96 |
WORKING_DIR = "./dickens"
|
97 |
|
98 |
-
|
99 |
if not os.path.exists(WORKING_DIR):
|
100 |
os.mkdir(WORKING_DIR)
|
101 |
|
102 |
rag = LightRAG(
|
103 |
working_dir=WORKING_DIR,
|
|
|
104 |
llm_model_func=gpt_4o_mini_complete # Use gpt_4o_mini_complete LLM model
|
105 |
# llm_model_func=gpt_4o_complete # Optionally, use a stronger model
|
106 |
)
|
|
|
85 |
```python
|
86 |
import os
|
87 |
from lightrag import LightRAG, QueryParam
|
88 |
+
from lightrag.llm.openai import gpt_4o_mini_complete, gpt_4o_complete, openai_embed
|
89 |
|
90 |
#########
|
91 |
# Uncomment the below two lines if running in a jupyter notebook to handle the async nature of rag.insert()
|
|
|
95 |
|
96 |
WORKING_DIR = "./dickens"
|
97 |
|
|
|
98 |
if not os.path.exists(WORKING_DIR):
|
99 |
os.mkdir(WORKING_DIR)
|
100 |
|
101 |
rag = LightRAG(
|
102 |
working_dir=WORKING_DIR,
|
103 |
+
embedding_func=openai_embed,
|
104 |
llm_model_func=gpt_4o_mini_complete # Use gpt_4o_mini_complete LLM model
|
105 |
# llm_model_func=gpt_4o_complete # Optionally, use a stronger model
|
106 |
)
|