import { Schema } from "jsonschema"; import { PromptFunctions, PromptMemory, Tokenizer } from "promptrix"; import { PromptResponse, Validation, PromptResponseValidator } from "./types"; /** * Parses any JSON returned by the model and optionally verifies it against a JSON schema. * @template TContent Optional. Type of the content of the message. Defaults to `Record`. */ export declare class JSONResponseValidator implements PromptResponseValidator { /** * Creates a new `JSONResponseValidator` instance. * @param schema Optional. JSON schema to validate the response against. * @param missingJsonFeedback Optional. Custom feedback to give when no JSON is returned. * @param errorFeedback Optional. Custom feedback to give when an error is detected. */ constructor(schema?: Schema, missingJsonFeedback?: string, errorFeedback?: string, instanceName?: string); readonly errorFeedback: string; readonly instanceName?: string; readonly missingJsonFeedback: string; readonly schema?: Schema; /** * Validates the response. * @param memory Memory used to render the prompt. * @param functions Functions used to render the prompt. * @param tokenizer Tokenizer used to render the prompt. * @param response Response to validate. * @param remaining_attempts Number of remaining validation attempts. * @returns A `Validation` with the status and value. */ validateResponse(memory: PromptMemory, functions: PromptFunctions, tokenizer: Tokenizer, response: PromptResponse, remaining_attempts: number): Promise; private getErrorFix; } //# sourceMappingURL=JSONResponseValidator.d.ts.map