Skip to content

Commit

Permalink
Refactor async call for CSV conversion in browse-text script
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Sep 27, 2024
1 parent 499fb65 commit ea3d066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sample/genaisrc/browse-text.genai.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const page = await host.browse(
)
const table = page.locator('table[data-testid="csv-table"]')
const html = await table.innerHTML()
const csv = await HTML.convertTablesToJSON("<table>" + html + "</table>")[0]
const csv = (await HTML.convertTablesToJSON("<table>" + html + "</table>"))[0]
csv.forEach((row) => delete row[Object.keys(row)[0]]) // remove the first column
defData("DATA", csv)
$`Analyze DATA and provide a statistical summary.`

0 comments on commit ea3d066

Please sign in to comment.