yangdx commited on
Commit
75016ae
·
1 Parent(s): 541c1fb

Fix context format

Browse files
Files changed (1) hide show
  1. lightrag/operate.py +19 -14
lightrag/operate.py CHANGED
@@ -1349,20 +1349,25 @@ async def _build_query_context(
1349
  relations_str = json.dumps(relations_context, ensure_ascii=False)
1350
  text_units_str = json.dumps(text_units_context, ensure_ascii=False)
1351
 
1352
- result = f"""
1353
- -----Entities-----
1354
- ```json
1355
- {entities_str}
1356
- ```
1357
- -----Relationships-----
1358
- ```json
1359
- {relations_str}
1360
- ```
1361
- -----Sources-----
1362
- ```json
1363
- {text_units_str}
1364
- ```
1365
- """.strip()
 
 
 
 
 
1366
  return result
1367
 
1368
 
 
1349
  relations_str = json.dumps(relations_context, ensure_ascii=False)
1350
  text_units_str = json.dumps(text_units_context, ensure_ascii=False)
1351
 
1352
+ result = f"""-----Entities-----
1353
+
1354
+ ```json
1355
+ {entities_str}
1356
+ ```
1357
+
1358
+ -----Relationships-----
1359
+
1360
+ ```json
1361
+ {relations_str}
1362
+ ```
1363
+
1364
+ -----Sources-----
1365
+
1366
+ ```json
1367
+ {text_units_str}
1368
+ ```
1369
+
1370
+ """
1371
  return result
1372
 
1373