mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-14 00:27:55 +00:00
Docs: Update benchmark for deepseek/deepseek-v3.2
This commit is contained in:
13
tests/8_json_validator/outputs/deepseek_deepseek-v3.2.js
Normal file
13
tests/8_json_validator/outputs/deepseek_deepseek-v3.2.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const validateJSON = async (json, schema) => {
|
||||
const { default: Ajv } = await import('https://cdn.skypack.dev/ajv@8.12.0');
|
||||
const ajv = new Ajv({ allErrors: true });
|
||||
const validate = ajv.compile(schema);
|
||||
const valid = validate(json);
|
||||
return {
|
||||
valid,
|
||||
errors: valid ? [] : validate.errors.map(e => `${e.instancePath} ${e.message}`)
|
||||
};
|
||||
};
|
||||
export default validateJSON;
|
||||
// Generation time: 4.839s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user