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

This commit is contained in:
github-actions[bot]
2026-02-05 19:39:59 +00:00
parent b0c93b9efa
commit 73a72a2b7e
11 changed files with 298 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
async function processCSV(csv, config) {
const { filterColumn, filterValue, groupBy, aggregateColumn, operation } = config;
const { default: Papa } = await import("https://cdn.jsdelivr.net/npm/papaparse@5/+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 = new Map();
for (const row of filtered) {
const key = row[groupBy];
if (!groups.has(key)) groups.set(key, []);
groups.get(key).push(row);
}
const toNum = v => {
const n = Number(v);
return Number.isFinite(n) ? n : 0;
};
return [...groups.entries()].map(([groupValue, rows]) => {
let result;
if (operation === "count") {
result = rows.length;
} else {
const sum = rows.reduce((acc, r) => acc + toNum(r[aggregateColumn]), 0);
result = operation === "avg" ? sum / rows.length : sum;
}
return { [groupBy]: groupValue, result };
});
}
export default processCSV;
// Generation time: 6.543s
// Result: PASS