mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Docs: Update benchmark for openrouter/aurora-alpha
This commit is contained in:
11
tests/8_json_validator/outputs/openrouter_aurora-alpha.js
Normal file
11
tests/8_json_validator/outputs/openrouter_aurora-alpha.js
Normal file
@@ -0,0 +1,11 @@
|
||||
async function validateJSON(d, s) {
|
||||
const {default: Ajv} = await import('https://cdn.jsdelivr.net/npm/ajv@8/dist/ajv.esm.js');
|
||||
const {default: addFormats} = await import('https://cdn.jsdelivr.net/npm/ajv-formats@2/dist/ajv-formats.esm.js');
|
||||
const v = new Ajv({allErrors: true, strict: false});
|
||||
addFormats(v);
|
||||
const ok = v.compile(s)(d);
|
||||
return {valid: ok, errors: ok ? [] : v.errors.map(e => e.message)};
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 1.295s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user