fix(scrapeURL/llmExtract): fill in required field as well

This commit is contained in:
Gergő Móricz 2024-11-07 22:48:57 +01:00
parent 0588f340c3
commit 79cadcb769

View File

@ -23,6 +23,7 @@ function normalizeSchema(x: any): any {
return { return {
...x, ...x,
properties: Object.fromEntries(Object.entries(x.properties).map(([k, v]) => [k, normalizeSchema(v)])), properties: Object.fromEntries(Object.entries(x.properties).map(([k, v]) => [k, normalizeSchema(v)])),
required: Object.keys(x.properties),
additionalProperties: false, additionalProperties: false,
} }
} else if (x && x.type === "array") { } else if (x && x.type === "array") {