yangdx
commited on
Commit
·
d3427f3
1
Parent(s):
ef3cf44
Fix linting
Browse files- README-zh.md +2 -2
- README.md +2 -2
- examples/lightrag_openai_demo.py +4 -2
README-zh.md
CHANGED
|
@@ -125,7 +125,7 @@ def main():
|
|
| 125 |
# Initialize RAG instance
|
| 126 |
rag = await initialize_rag()
|
| 127 |
rag.insert("Your text")
|
| 128 |
-
|
| 129 |
# Perform hybrid search
|
| 130 |
mode="hybrid"
|
| 131 |
print(
|
|
@@ -821,7 +821,7 @@ rag = LightRAG(
|
|
| 821 |
create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype));
|
| 822 |
CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties);
|
| 823 |
ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx;
|
| 824 |
-
|
| 825 |
-- 如有必要可以删除
|
| 826 |
drop INDEX entity_p_idx;
|
| 827 |
drop INDEX vertex_p_idx;
|
|
|
|
| 125 |
# Initialize RAG instance
|
| 126 |
rag = await initialize_rag()
|
| 127 |
rag.insert("Your text")
|
| 128 |
+
|
| 129 |
# Perform hybrid search
|
| 130 |
mode="hybrid"
|
| 131 |
print(
|
|
|
|
| 821 |
create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype));
|
| 822 |
CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties);
|
| 823 |
ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx;
|
| 824 |
+
|
| 825 |
-- 如有必要可以删除
|
| 826 |
drop INDEX entity_p_idx;
|
| 827 |
drop INDEX vertex_p_idx;
|
README.md
CHANGED
|
@@ -161,7 +161,7 @@ def main():
|
|
| 161 |
# Initialize RAG instance
|
| 162 |
rag = await initialize_rag()
|
| 163 |
rag.insert("Your text")
|
| 164 |
-
|
| 165 |
# Perform hybrid search
|
| 166 |
mode="hybrid"
|
| 167 |
print(
|
|
@@ -842,7 +842,7 @@ For production level scenarios you will most likely want to leverage an enterpri
|
|
| 842 |
create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype));
|
| 843 |
CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties);
|
| 844 |
ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx;
|
| 845 |
-
|
| 846 |
-- drop if necessary
|
| 847 |
drop INDEX entity_p_idx;
|
| 848 |
drop INDEX vertex_p_idx;
|
|
|
|
| 161 |
# Initialize RAG instance
|
| 162 |
rag = await initialize_rag()
|
| 163 |
rag.insert("Your text")
|
| 164 |
+
|
| 165 |
# Perform hybrid search
|
| 166 |
mode="hybrid"
|
| 167 |
print(
|
|
|
|
| 842 |
create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype));
|
| 843 |
CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties);
|
| 844 |
ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx;
|
| 845 |
+
|
| 846 |
-- drop if necessary
|
| 847 |
drop INDEX entity_p_idx;
|
| 848 |
drop INDEX vertex_p_idx;
|
examples/lightrag_openai_demo.py
CHANGED
|
@@ -124,7 +124,8 @@ async def main():
|
|
| 124 |
print("=====================")
|
| 125 |
print(
|
| 126 |
await rag.aquery(
|
| 127 |
-
"What are the top themes in this story?",
|
|
|
|
| 128 |
)
|
| 129 |
)
|
| 130 |
|
|
@@ -134,7 +135,8 @@ async def main():
|
|
| 134 |
print("=====================")
|
| 135 |
print(
|
| 136 |
await rag.aquery(
|
| 137 |
-
"What are the top themes in this story?",
|
|
|
|
| 138 |
)
|
| 139 |
)
|
| 140 |
except Exception as e:
|
|
|
|
| 124 |
print("=====================")
|
| 125 |
print(
|
| 126 |
await rag.aquery(
|
| 127 |
+
"What are the top themes in this story?",
|
| 128 |
+
param=QueryParam(mode="global"),
|
| 129 |
)
|
| 130 |
)
|
| 131 |
|
|
|
|
| 135 |
print("=====================")
|
| 136 |
print(
|
| 137 |
await rag.aquery(
|
| 138 |
+
"What are the top themes in this story?",
|
| 139 |
+
param=QueryParam(mode="hybrid"),
|
| 140 |
)
|
| 141 |
)
|
| 142 |
except Exception as e:
|