From ec36d4e77e306b8f76f3d5be3aca0cfee8e3f111 Mon Sep 17 00:00:00 2001 From: gaudyb Date: Fri, 27 Dec 2024 14:45:57 -0600 Subject: [PATCH] check fix --- .../query/structured_search/basic_search/basic_context.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/graphrag/query/structured_search/basic_search/basic_context.py b/graphrag/query/structured_search/basic_search/basic_context.py index f5c066e76..c8ae1ef0d 100644 --- a/graphrag/query/structured_search/basic_search/basic_context.py +++ b/graphrag/query/structured_search/basic_search/basic_context.py @@ -53,7 +53,9 @@ def build_context( # make a delimited table for the context; this imitates graphrag context building table = ["id|text"] + [f"{s['id']}|{s['text']}" for s in sources] + columns = pd.Index(["id", "text"]) + return ContextBuilderResult( context_chunks="\n\n".join(table), - context_records={"sources": pd.DataFrame(sources, columns=["id", "text"])}, + context_records={"sources": pd.DataFrame(sources, columns=columns)}, )