Skip to content

Commit

Permalink
Fix graph rendering bug due to missing column in updated GraphRAG out…
Browse files Browse the repository at this point in the history
…put (#16)
  • Loading branch information
noworneverev authored Oct 9, 2024
1 parent 0d28680 commit b35647a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/utils/parquet-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export const readParquetFile = async (file: File, schema?: string): Promise<any[
id: row[0],
title: row[1],
level: parseValue(row[2], 'number'),
raw_community: parseValue(row[3], 'number'),
relationship_ids: row[4],
text_unit_ids: row[5],
...(row.length > 5 ? { raw_community: parseValue(row[3], 'number') } : {}), // From graphrag 0.3.X onwards, raw_community is removed
relationship_ids: row[row.length > 5 ? 4 : 3],
text_unit_ids: row[row.length > 5 ? 5 : 4],
})));
} else if (schema === 'community_report') {
resolve(rows.map(row => ({
Expand Down

0 comments on commit b35647a

Please sign in to comment.