UNPKG

@anthropic-ai/sdk

Version:
16 lines • 837 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.splitToolRunnerParams = splitToolRunnerParams; /** * `params` split into the runner's own settings, the `thread` choice, and the params of the thread it runs over. Throws * on a `thread` the params type leaves out. */ function splitToolRunnerParams(params) { const { stream, max_iterations, runToolsEagerly, thread, ...threadParams } = params; if (thread !== undefined && thread !== false) { throw new TypeError('`thread` cannot be set in the params of a tool runner. The runner sets it for each request itself. ' + 'To run without a message thread, pass `thread: false`.'); } return { settings: { stream, max_iterations, runToolsEagerly }, thread, threadParams }; } //# sourceMappingURL=tool-runner-params.js.map