mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-04-28 04:02:14 +00:00
Docs: Update benchmark for deepseek/deepseek-v4-pro
This commit is contained in:
19
tests/8_json_validator/outputs/deepseek_deepseek-v4-pro.js
Normal file
19
tests/8_json_validator/outputs/deepseek_deepseek-v4-pro.js
Normal file
@@ -0,0 +1,19 @@
|
||||
let _p
|
||||
async function validateJSON(d, s) {
|
||||
if (!_p) _p = (async () => {
|
||||
const {default: A} = await import('https://cdn.jsdelivr.net/npm/ajv@8.17.1/dist/ajv2020.esm.js')
|
||||
return new A({allErrors: 1})
|
||||
})()
|
||||
try {
|
||||
const a = await _p
|
||||
const v = a.validate(s, d)
|
||||
return v
|
||||
? {valid: 1, errors: []}
|
||||
: {valid: 0, errors: a.errors.map(e => `${e.instancePath||'/'} ${e.message}`.trim())}
|
||||
} catch (e) {
|
||||
return {valid: 0, errors: [e.message]}
|
||||
}
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 54.656s
|
||||
// Result: FAIL
|
||||
Reference in New Issue
Block a user