mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-02-04 09:57:54 +00:00
Docs: Update benchmark for moonshotai/kimi-k2.5
This commit is contained in:
16
tests/8_json_validator/outputs/moonshotai_kimi-k2.5.js
Normal file
16
tests/8_json_validator/outputs/moonshotai_kimi-k2.5.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const validateJSON = async (d, s) => {
|
||||
try {
|
||||
const { default: Ajv } = await import('https://esm.sh/ajv@8.12.0');
|
||||
const v = new Ajv({ allErrors: true }).compile(s);
|
||||
const valid = v(d);
|
||||
return {
|
||||
valid,
|
||||
errors: valid ? [] : v.errors.map(e => `${e.instancePath || 'root'}: ${e.message}`)
|
||||
};
|
||||
} catch (e) {
|
||||
return { valid: false, errors: [e.message] };
|
||||
}
|
||||
};
|
||||
export default validateJSON;
|
||||
// Generation time: 27.586s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user