Update README

This commit is contained in:
yangdx
2025-05-16 09:28:08 +08:00
parent c41f8d9ed3
commit 0a613208c1
2 changed files with 6 additions and 2 deletions

View File

@@ -111,6 +111,8 @@ python examples/lightrag_openai_demo.py
## 使用LightRAG Core进行编程 ## 使用LightRAG Core进行编程
> 如果您希望将LightRAG集成到您的项目中建议您使用LightRAG Server提供的REST API。LightRAG Core通常用于嵌入式应用或供希望进行研究与评估的学者使用。
### 一个简单程序 ### 一个简单程序
以下Python代码片段演示了如何初始化LightRAG、插入文本并进行查询 以下Python代码片段演示了如何初始化LightRAG、插入文本并进行查询
@@ -769,7 +771,7 @@ rag = LightRAG(
create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype)); create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype));
CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties); CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties);
ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx; ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx;
-- 如有必要可以删除 -- 如有必要可以删除
drop INDEX entity_p_idx; drop INDEX entity_p_idx;
drop INDEX vertex_p_idx; drop INDEX vertex_p_idx;

View File

@@ -147,6 +147,8 @@ For a streaming response implementation example, please see `examples/lightrag_o
## Programing with LightRAG Core ## Programing with LightRAG Core
> If you would like to integrate LightRAG into your project, we recommend utilizing the REST API provided by the LightRAG Server. LightRAG Core is typically intended for embedded applications or for researchers who wish to conduct studies and evaluations.
### A Simple Program ### A Simple Program
Use the below Python snippet to initialize LightRAG, insert text to it, and perform queries: Use the below Python snippet to initialize LightRAG, insert text to it, and perform queries:
@@ -773,7 +775,7 @@ For production level scenarios you will most likely want to leverage an enterpri
create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype)); create INDEX CONCURRENTLY entity_idx_node_id ON dickens."Entity" (ag_catalog.agtype_access_operator(properties, '"node_id"'::agtype));
CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties); CREATE INDEX CONCURRENTLY entity_node_id_gin_idx ON dickens."Entity" using gin(properties);
ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx; ALTER TABLE dickens."DIRECTED" CLUSTER ON directed_sid_idx;
-- drop if necessary -- drop if necessary
drop INDEX entity_p_idx; drop INDEX entity_p_idx;
drop INDEX vertex_p_idx; drop INDEX vertex_p_idx;