From 0f430ca1a7f6058897c8a1cff098b6630801011c Mon Sep 17 00:00:00 2001 From: zrguo Date: Tue, 4 Mar 2025 12:42:40 +0800 Subject: [PATCH] update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed257049..57563a1f 100644 --- a/README.md +++ b/README.md @@ -785,7 +785,8 @@ rag.delete_by_doc_id("doc_id") LightRAG now supports comprehensive knowledge graph management capabilities, allowing you to create, edit, and delete entities and relationships within your knowledge graph. -### Create Entities and Relations +
+ Create Entities and Relations ```python # Create new entity @@ -807,8 +808,10 @@ relation = rag.create_relation("Google", "Gmail", { "weight": 2.0 }) ``` +
-### Edit Entities and Relations +
+ Edit Entities and Relations ```python # Edit an existing entity @@ -830,6 +833,7 @@ updated_relation = rag.edit_relation("Google", "Google Mail", { "weight": 3.0 }) ``` +
All operations are available in both synchronous and asynchronous versions. The asynchronous versions have the prefix "a" (e.g., `acreate_entity`, `aedit_relation`).