Docs: Update benchmark for minimax/minimax-m2.1

This commit is contained in:
github-actions[bot]
2025-12-23 02:41:05 +00:00
parent 4d1b1b44a4
commit 3983c8eb1a
11 changed files with 315 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
async function validateJSON(data, schema) {
const Ajv = (await import('https://cdn.jsdelivr.net/npm/ajv@8.12.0/dist/ajv2019.min.js')).default;
const ajv = new Ajv({ allErrors: true, strict: false });
const validate = ajv.compile(schema);
const valid = validate(data);
if (valid) {
return { valid: true, errors: [] };
}
const errors = validate.errors.map(error => {
const message = `${error.instancePath} ${error.message}`;
return error.params && error.params.allowedValues
? `${message} (allowed: ${error.params.allowedValues.join(', ')})`
: message;
});
return { valid: false, errors };
}
export default validateJSON;
// Generation time: 6.888s
// Result: FAIL