Merge branch 'stevezhangishero/main'
Browse files- lightrag/lightrag.py +6 -2
lightrag/lightrag.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from __future__ import annotations
|
2 |
|
|
|
3 |
import asyncio
|
4 |
import configparser
|
5 |
import os
|
@@ -988,7 +989,8 @@ class LightRAG:
|
|
988 |
)
|
989 |
except Exception as e:
|
990 |
# Log error and update pipeline status
|
991 |
-
error_msg = f"Failed to process document {doc_id}: {
|
|
|
992 |
logger.error(error_msg)
|
993 |
async with pipeline_status_lock:
|
994 |
pipeline_status["latest_message"] = error_msg
|
@@ -1105,7 +1107,9 @@ class LightRAG:
|
|
1105 |
llm_response_cache=self.llm_response_cache,
|
1106 |
)
|
1107 |
except Exception as e:
|
1108 |
-
logger.error(
|
|
|
|
|
1109 |
raise e
|
1110 |
|
1111 |
async def _insert_done(
|
|
|
1 |
from __future__ import annotations
|
2 |
|
3 |
+
import traceback
|
4 |
import asyncio
|
5 |
import configparser
|
6 |
import os
|
|
|
989 |
)
|
990 |
except Exception as e:
|
991 |
# Log error and update pipeline status
|
992 |
+
error_msg = f"Failed to process document {doc_id}: {traceback.format_exc()}"
|
993 |
+
|
994 |
logger.error(error_msg)
|
995 |
async with pipeline_status_lock:
|
996 |
pipeline_status["latest_message"] = error_msg
|
|
|
1107 |
llm_response_cache=self.llm_response_cache,
|
1108 |
)
|
1109 |
except Exception as e:
|
1110 |
+
logger.error(
|
1111 |
+
f"Failed to extract entities and relationships : {traceback.format_exc()} 。"
|
1112 |
+
)
|
1113 |
raise e
|
1114 |
|
1115 |
async def _insert_done(
|