LightRAG/lightrag/api/routers
NeelM0906 9f44e89de7 Add knowledge graph manipulation endpoints
Added three new REST API endpoints for direct knowledge graph manipulation:

- POST /graph/entity/create: Create new entities in the knowledge graph
- POST /graph/relation/create: Create relationships between entities
- POST /graph/entities/merge: Merge duplicate/misspelled entities while preserving relationships

The merge endpoint is particularly useful for consolidating entities discovered after document processing, fixing spelling errors, and cleaning up the knowledge graph. All relationships from source entities are transferred to the target entity, with intelligent handling of duplicate relationships.

Updated API documentation in lightrag/api/README.md with usage examples for all three endpoints.
2025-10-08 15:59:47 -04:00
..
__init__.py
document_routes.py Limit deprecated documents endpoint to 1000 records with fair distribution 2025-09-28 11:18:10 +08:00
graph_routes.py Add knowledge graph manipulation endpoints 2025-10-08 15:59:47 -04:00
ollama_api.py fix(OllamaAPI): Add validation to ensure last message is from user role 2025-10-01 20:48:37 +08:00
query_routes.py Relax conversation history role validation requirements 2025-09-29 13:10:15 +08:00