mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Docs: Update benchmark for openrouter/pony-alpha
This commit is contained in:
12
tests/8_json_validator/outputs/openrouter_pony-alpha.js
Normal file
12
tests/8_json_validator/outputs/openrouter_pony-alpha.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const validateJSON = async (json, schema) => {
|
||||
const { default: Ajv } = await import('https://esm.sh/ajv');
|
||||
const validate = new Ajv().compile(schema);
|
||||
const valid = validate(json);
|
||||
return {
|
||||
valid,
|
||||
errors: valid ? [] : validate.errors.map(e => `${e.instancePath} ${e.message}`)
|
||||
};
|
||||
};
|
||||
export default validateJSON;
|
||||
// Generation time: 103.740s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user