mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-06-07 20:12:13 +00:00
Docs: Update benchmark for google/gemini-3.5-flash
This commit is contained in:
13
tests/8_json_validator/outputs/google_gemini-3.5-flash.js
Normal file
13
tests/8_json_validator/outputs/google_gemini-3.5-flash.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export async function validateJSON(data, schema) {
|
||||
const { default: Ajv } = await import('https://cdn.jsdelivr.net/npm/ajv@8/+esm');
|
||||
const validate = new Ajv({ allErrors: true, strict: false }).compile(schema);
|
||||
const valid = validate(data);
|
||||
|
||||
return {
|
||||
valid,
|
||||
errors: valid ? [] : validate.errors.map(e => `${e.instancePath || 'root'} ${e.message}`)
|
||||
};
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 6.256s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user