mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Docs: Update benchmark for anthropic/claude-opus-4.6 TEMP:0.7
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
async function validateJSON(json, schema) {
|
||||
const Ajv = (await import("https://esm.sh/ajv@8")).default;
|
||||
const ajv = new Ajv({ allErrors: true });
|
||||
const validate = ajv.compile(schema);
|
||||
const valid = validate(json);
|
||||
return {
|
||||
valid: !!valid,
|
||||
errors: valid ? [] : validate.errors.map(e =>
|
||||
`${e.instancePath ? e.instancePath + " " : ""}${e.message}`
|
||||
)
|
||||
};
|
||||
}
|
||||
export default validateJSON;
|
||||
// Generation time: 4.304s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user