Optional attemptIf true, attempts to use an LLM to fix or extract JSON if standard parsing fails.
Optional llmThe model a repair calls. LLMUtilityAI: else its jsonFixerModelId, else its defaultModelId.
Optional llmThe provider a repair calls. LLMUtilityAI: else its defaultProviderId.
Optional targetOptional JSON schema (draft-07) to validate the parsed object against, with Ajv. The standard formats are checked
(date-time, email, uri and the others of ajv-formats), a keyword Ajv does not know is passed over, as
JSON Schema says, and so is a format it does not know, and a value is coerced to the type its schema names where
it can ("5" to 5) in the value answered. The schema may be built anew for every call, under the same $id too.
StatisticalUtilityAI answers null for a value that fails it. LLMUtilityAI sends a value that fails it for repair
as it sends a text that does not parse, names the schema (and a parsed value's errors) in the repair request, and
answers null when no repair passes it. No value passes a schema Ajv cannot compile, a schema under the draft-07
meta-schema's $id or a schema marked $async: both classes answer null, and LLMUtilityAI asks for no repair.
Optional maxLLMUtilityAI: how many repairs to try, each on the text the last one answered, while a repair does not parse or
fails targetSchema. 1 unless it is a whole number of 1 or more, so Infinity is 1 too.
Options for safe JSON parsing.