MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / validateInputTools

Function validateInputTools

out/cli.cjs:81782–81791  ·  view source on GitHub ↗
(tools)

Source from the content-addressed store, hash-verified

81780 return isAutoParsableTool(inputTool) || inputTool?.function.strict || false;
81781}
81782function 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}
81788function 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`);

Callers 1

parseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…