/** * An object that captures the JSON schema of the output, as well as validating/parsing JSON * produced by the LLM into the output type. */ export declare class AgentOutputSchema { /** * The type of the output. */ outputType: any; /** * Whether the output type is wrapped in a dictionary. This is generally done if the base * output type cannot be represented as a JSON Schema object. */ private _isWrapped; /** * The JSON schema of the output. */ private _outputSchema; /** * Whether the JSON schema is in strict mode. We **strongly** recommend setting this to true, * as it increases the likelihood of correct JSON input. */ strictJsonSchema: boolean; /** * Creates an AgentOutputSchema for the given output type. * * @param outputType The type of the output * @param strictJsonSchema Whether the JSON schema is in strict mode */ constructor(outputType: any, strictJsonSchema?: boolean); /** * Whether the output type is plain text (versus a JSON object). */ isPlainText(): boolean; /** * The JSON schema of the output type. */ jsonSchema(): Record; /** * Validate a JSON string against the output type. Returns the validated object, or raises * a `ModelBehaviorError` if the JSON is invalid. * * @param jsonStr The JSON string to validate * @param partial Whether to accept partial objects * @returns The validated object * @throws ModelBehaviorError if the JSON is invalid */ validateJson(jsonStr: string, partial?: boolean): T; /** * The name of the output type. */ get outputTypeName(): string; }