(tools)
| 81780 | return isAutoParsableTool(inputTool) || inputTool?.function.strict || false; |
| 81781 | } |
| 81782 | function hasAutoParseableInput(params) { |
| 81783 | if (isAutoParsableResponseFormat(params.response_format)) { |
| 81784 | return true; |
| 81785 | } |
| 81786 | return params.tools?.some((t2) => isAutoParsableTool(t2) || t2.type === "function" && t2.function.strict === true) ?? false; |
| 81787 | } |
| 81788 | function validateInputTools(tools) { |
| 81789 | for (const tool of tools ?? []) { |
| 81790 | if (tool.type !== "function") { |
| 81791 | throw new OpenAIError(`Currently only \`function\` tool types support auto-parsing; Received \`${tool.type}\``); |
| 81792 | } |
| 81793 | if (tool.function.strict !== true) { |
| 81794 | throw new OpenAIError(`The \`${tool.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`); |
no outgoing calls
no test coverage detected
searching dependent graphs…