Docs: Update benchmark for google/gemini-3.1-flash-lite-preview

This commit is contained in:
github-actions[bot]
2026-03-03 22:42:09 +00:00
parent 5e98b8d911
commit 47ccd20b71
12 changed files with 293 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
async function processCSV(csv, { filterColumn, filterValue, groupBy, aggregateColumn, operation }) {
const { parse } = await import('https://cdn.skypack.dev/papaparse');
const { data: rows } = parse(csv, { header: true, dynamicTyping: true });
const filtered = rows.filter(r => r[filterColumn] == filterValue);
const groups = filtered.reduce((acc, row) => {
const key = row[groupBy];
acc[key] = acc[key] || [];
acc[key].push(Number(row[aggregateColumn]) || 0);
return acc;
}, {});
return Object.entries(groups).map(([key, vals]) => {
let res;
if (operation === 'sum') res = vals.reduce((a, b) => a + b, 0);
if (operation === 'count') res = vals.length;
if (operation === 'avg') res = vals.reduce((a, b) => a + b, 0) / vals.length;
return { [groupBy]: key, result: res };
});
}
export default processCSV;
// Generation time: 1.399s
// Result: PASS