Skip to content

Commit b35647a

Browse files
authoredOct 9, 2024
Fix graph rendering bug due to missing column in updated GraphRAG output (#16)
1 parent 0d28680 commit b35647a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/app/utils/parquet-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export const readParquetFile = async (file: File, schema?: string): Promise<any[
8787
id: row[0],
8888
title: row[1],
8989
level: parseValue(row[2], 'number'),
90-
raw_community: parseValue(row[3], 'number'),
91-
relationship_ids: row[4],
92-
text_unit_ids: row[5],
90+
...(row.length > 5 ? { raw_community: parseValue(row[3], 'number') } : {}), // From graphrag 0.3.X onwards, raw_community is removed
91+
relationship_ids: row[row.length > 5 ? 4 : 3],
92+
text_unit_ids: row[row.length > 5 ? 5 : 4],
9393
})));
9494
} else if (schema === 'community_report') {
9595
resolve(rows.map(row => ({

0 commit comments

Comments
 (0)
Failed to load comments.