Docs: Update benchmark for moonshotai/kimi-k2-thinking

This commit is contained in:
github-actions[bot]
2025-11-15 00:13:33 +00:00
parent da087e9ca0
commit 0d5effb238
10 changed files with 176 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
async function processCSV(csv, cfg) {
const [{ default: Papa }, { default: _ }] = await Promise.all([
import('https://cdn.jsdelivr.net/npm/papaparse@5.4.1/+esm'),
import('https://cdn.jsdelivr.net/npm/lodash@4.17.21/+esm')
]);
const filtered = Papa.parse(csv, { header: true, dynamicTyping: true }).data
.filter(r => r[cfg.filterColumn] == cfg.filterValue);
return Object.entries(_.groupBy(filtered, cfg.groupBy)).map(([k, v]) => {
const sum = v.reduce((s, r) => s + (Number(r[cfg.aggregateColumn]) || 0), 0);
return {
[cfg.groupBy]: k,
result: cfg.operation === 'count' ? v.length :
cfg.operation === 'avg' ? sum / v.length : sum
};
});
}
export default processCSV;