diff --git a/lightrag/operate.py b/lightrag/operate.py index 12cfd5d6..eb027325 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -1349,20 +1349,25 @@ async def _build_query_context( relations_str = json.dumps(relations_context, ensure_ascii=False) text_units_str = json.dumps(text_units_context, ensure_ascii=False) - result = f""" - -----Entities----- - ```json - {entities_str} - ``` - -----Relationships----- - ```json - {relations_str} - ``` - -----Sources----- - ```json - {text_units_str} - ``` - """.strip() + result = f"""-----Entities----- + +```json +{entities_str} +``` + +-----Relationships----- + +```json +{relations_str} +``` + +-----Sources----- + +```json +{text_units_str} +``` + +""" return result