mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 09:09:07 +08:00
fix(llmExtract): arbitrary objects caused error to be thrown
This commit is contained in:
parent
570809aa59
commit
f5e5bdb710
@ -74,9 +74,9 @@ function normalizeSchema(x: any): any {
|
||||
return {
|
||||
...x,
|
||||
properties: Object.fromEntries(
|
||||
Object.entries(x.properties).map(([k, v]) => [k, normalizeSchema(v)]),
|
||||
Object.entries(x.properties || {}).map(([k, v]) => [k, normalizeSchema(v)]),
|
||||
),
|
||||
required: Object.keys(x.properties),
|
||||
required: Object.keys(x.properties || {}),
|
||||
additionalProperties: false,
|
||||
};
|
||||
} else if (x && x.type === "array") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user