Skip to content

Commit 2bfef70

Browse files
committed
Fix context format
1 parent a09f6eb commit 2bfef70

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

‎lightrag/operate.py‎

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,20 +1349,25 @@ async def _build_query_context(
13491349
relations_str = json.dumps(relations_context, ensure_ascii=False)
13501350
text_units_str = json.dumps(text_units_context, ensure_ascii=False)
13511351

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()
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+
"""
13661371
return result
13671372

13681373

0 commit comments

Comments
 (0)