From 5c679384671d716efc24bcddd5bade5b384f6e9a Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sun, 12 Jan 2025 12:46:23 +0100 Subject: [PATCH] Resolve 500 error caused by missing len() for LightRAG's API insert_text endpoint --- lightrag/api/lightrag_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 644e622d..d29b8b56 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -487,7 +487,7 @@ def create_app(args): return InsertResponse( status="success", message="Text successfully inserted", - document_count=len(rag), + document_count=1, ) except Exception as e: raise HTTPException(status_code=500, detail=str(e))