From f349618e37a3d7aae8bfd225282293ee58625862 Mon Sep 17 00:00:00 2001 From: jofoks Date: Mon, 31 Mar 2025 14:50:13 -0700 Subject: [PATCH] Fix: unknown filepath errors --- lightrag/operate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lightrag/operate.py b/lightrag/operate.py index 5da02683..dcf833c2 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -1005,7 +1005,6 @@ async def mix_kg_vector_query( try: # Reduce top_k for vector search in hybrid mode since we have structured information from KG mix_topk = min(10, query_param.top_k) - # TODO: add ids to the query results = await chunks_vdb.query( augmented_query, top_k=mix_topk, ids=query_param.ids ) @@ -1601,7 +1600,7 @@ async def _get_edge_data( text_units_section_list = [["id", "content", "file_path"]] for i, t in enumerate(use_text_units): - text_units_section_list.append([i, t["content"], t["file_path"]]) + text_units_section_list.append([i, t["content"], t.get("file_path", "unknown")]) text_units_context = list_of_list_to_csv(text_units_section_list) return entities_context, relations_context, text_units_context