import type { ChatCompletionTool } from "../resources/chat/completions.js"; import { ResponseTextConfig, type FunctionTool, type ParsedResponse, type Response, type ResponseCreateParamsBase, type ResponseCreateParamsNonStreaming, type ResponseFunctionToolCall, type Tool } from "../resources/responses/responses.js"; import { type AutoParseableTextFormat } from "../lib/parser.js"; export type ParseableToolsParams = Array | ChatCompletionTool | null; export type ResponseCreateParamsWithTools = ResponseCreateParamsBase & { tools?: ParseableToolsParams; }; type TextConfigParams = { text?: ResponseTextConfig; }; export type ExtractParsedContentFromParams = NonNullable['format'] extends AutoParseableTextFormat ? P : null; export declare function maybeParseResponse>>(response: Response, params: Params): ParsedResponse; export declare function parseResponse>(response: Response, params: Params): ParsedResponse; export declare function hasAutoParseableInput(params: ResponseCreateParamsWithTools): boolean; type ToolOptions = { name: string; arguments: any; function?: ((args: any) => any) | undefined; }; export type AutoParseableResponseTool = FunctionTool & { __arguments: OptionsT['arguments']; __name: OptionsT['name']; $brand: 'auto-parseable-tool'; $callback: ((args: OptionsT['arguments']) => any) | undefined; $parseRaw(args: string): OptionsT['arguments']; }; export declare function makeParseableResponseTool(tool: FunctionTool, { parser, callback, }: { parser: (content: string) => OptionsT['arguments']; callback: ((args: any) => any) | undefined; }): AutoParseableResponseTool; export declare function isAutoParsableTool(tool: any): tool is AutoParseableResponseTool; export declare function shouldParseToolCall(params: ResponseCreateParamsNonStreaming | null | undefined, toolCall: ResponseFunctionToolCall): boolean; export declare function validateInputTools(tools: ChatCompletionTool[] | undefined): void; export declare function addOutputText(rsp: Response): void; export {}; //# sourceMappingURL=ResponsesParser.d.ts.map