mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-04-07 04:42:13 +00:00
Docs: Update benchmark for minimax/minimax-m2.7
This commit is contained in:
11
tests/8_json_validator/outputs/minimax_minimax-m2.7.js
Normal file
11
tests/8_json_validator/outputs/minimax_minimax-m2.7.js
Normal file
@@ -0,0 +1,11 @@
|
||||
async function validateJSON(data, schema) {
|
||||
const Ajv = (await import('https://cdn.jsdelivr.net/npm/ajv@8/dist/ajv.bundle.min.js')).default;
|
||||
const ajv = new Ajv({ allErrors: true });
|
||||
const validate = ajv.compile(schema);
|
||||
const valid = validate(data);
|
||||
const errors = valid ? [] : validate.errors.map(e => `${e.instancePath || '/'}: ${e.message}`);
|
||||
return { valid, errors };
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 25.859s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user