Interface: ParseJsonOptions<_T>
Defined in: packages/agentos/src/nlp/ai_utilities/IUtilityAI.ts:164
Options for safe JSON parsing.
Type Parameters
_T
_T = any
Properties
attemptFixWithLLM?
optionalattemptFixWithLLM:boolean
Defined in: packages/agentos/src/nlp/ai_utilities/IUtilityAI.ts:166
If true, attempts to use an LLM to fix or extract JSON if standard parsing fails.
llmModelIdForFix?
optionalllmModelIdForFix:string
Defined in: packages/agentos/src/nlp/ai_utilities/IUtilityAI.ts:168
Model ID to use for LLM-based fixing.
llmProviderIdForFix?
optionalllmProviderIdForFix:string
Defined in: packages/agentos/src/nlp/ai_utilities/IUtilityAI.ts:170
Provider ID for the LLM fixer.
maxRepairAttempts?
optionalmaxRepairAttempts:number
Defined in: packages/agentos/src/nlp/ai_utilities/IUtilityAI.ts:177
Max repair attempts with LLM if schema validation fails.
targetSchema?
optionaltargetSchema:JSONSchemaObject
Defined in: packages/agentos/src/nlp/ai_utilities/IUtilityAI.ts:175
Optional JSON schema to validate the parsed object against. If validation fails, the method may return null or attempt to fix again.