import { PromptResponseValidator, Validation, ChatCompletionFunction, PromptResponse, ChatCompletionTool } from "./types"; import { PromptMemory, PromptFunctions, Tokenizer } from "promptrix"; import { Schema } from "jsonschema"; /** * Validates tool calls returned by the model. * @remarks */ export declare class ToolResponseValidator implements PromptResponseValidator { private readonly _functions; /** * Creates a new `ToolResponseValidator` instance. * @param tools Optional. List of tools supported for the prompt. */ constructor(tools?: ChatCompletionTool[]); /** * Gets a list of the functions configured for the validator. */ get functions(): ChatCompletionFunction[]; /** * Gets a list of the tools configured for the validator. */ get tools(): ChatCompletionTool[]; /** * Adds a new function to the validator. * @param name Name of the function. * @param description Optional. Description of how the model should use the function. * @param parameters Optional. JSON Schema for functions parameters. * @returns The validator for chaining purposes. */ addFunction(name: string, parameters: Schema, description?: string): this; /** * 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; } //# sourceMappingURL=ToolResponseValidator.d.ts.map