Docs: Update benchmark for anthropic/claude-opus-4.6 TEMP:0.4

This commit is contained in:
github-actions[bot]
2026-02-05 19:52:20 +00:00
parent 46fb6c2d0a
commit 19600ca84b
11 changed files with 297 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
async function processCSV(csv, config) {
const { filterColumn, filterValue, groupBy, aggregateColumn, operation } = config;
const { default: Papa } = await import("https://cdn.jsdelivr.net/npm/papaparse@5.4.1/+esm");
const parsed = Papa.parse(csv.trim(), { header: true, skipEmptyLines: true });
const rows = parsed.data;
const filtered = rows.filter(r => r[filterColumn] == filterValue);
const groups = {};
for (const row of filtered) {
const key = row[groupBy];
if (!groups[key]) groups[key] = [];
groups[key].push(row);
}
return Object.entries(groups).map(([groupValue, groupRows]) => {
let result;
if (operation === "count") {
result = groupRows.length;
} else {
const vals = groupRows.map(r => {
const n = Number(r[aggregateColumn]);
return isNaN(n) ? 0 : n;
});
const sum = vals.reduce((a, b) => a + b, 0);
result = operation === "avg" ? sum / groupRows.length : sum;
}
return { [groupBy]: groupValue, result };
});
}
export default processCSV;
// Generation time: 4.670s
// Result: PASS