File size: 816 Bytes
077865a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
interface JsonSchemaish {
    type?: string;
    properties?: Record<string, JsonSchemaish>;
}
/**
 * Repair a tool call's `arguments` JSON string against the tool's parameter
 * schema. Returns the original string untouched whenever anything doesn't
 * parse or doesn't match — this must never corrupt a valid call.
 */
export declare function repairToolArguments(args: string, paramSchema?: JsonSchemaish): string;
/**
 * Build a tool-name → parameter-schema map from an OpenAI-style tools array
 * (chat-completions shape: {type:'function', function:{name, parameters}}).
 */
export declare function toolSchemaMap(tools?: Array<{
    type?: string;
    function?: {
        name?: string;
        parameters?: unknown;
    };
}>): Map<string, JsonSchemaish>;
export {};
//# sourceMappingURL=tool-args.d.ts.map