mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 11:21:00 +00:00
Docs: Update benchmark for google/gemini-3.1-flash-lite-preview
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
async function validateJSON(data, schema) {
|
||||
const { default: Ajv } = await import('https://esm.sh/ajv@8.12.0');
|
||||
const ajv = new Ajv({ allErrors: true });
|
||||
|
||||
const validate = ajv.compile(schema);
|
||||
const valid = validate(data);
|
||||
|
||||
return {
|
||||
valid,
|
||||
errors: valid ? [] : validate.errors.map(e => `${e.instancePath} ${e.message}`)
|
||||
};
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 1.098s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user