modelmix 2.3.2 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -5
- package/demo/demo.mjs +17 -6
- package/demo/node_modules/.package-lock.json +254 -0
- package/demo/node_modules/@anthropic-ai/sdk/CHANGELOG.md +859 -0
- package/demo/node_modules/@anthropic-ai/sdk/LICENSE +8 -0
- package/demo/node_modules/@anthropic-ai/sdk/README.md +424 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.d.ts +9 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.js +16 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.mjs +12 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/MultipartBody.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/README.md +46 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.d.ts +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.js +21 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.mjs +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-bun.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.d.ts +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.js +21 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.mjs +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime-node.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.d.ts +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.js +21 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.mjs +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/runtime.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.d.ts +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.js +21 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.mjs +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types-node.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.d.ts +101 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/auto/types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.d.ts +6 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.js +14 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.mjs +10 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/bun-runtime.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/index.d.ts +81 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/index.js +13 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/index.mjs +7 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.d.ts +12 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/manual-types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.d.ts +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.js +90 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.mjs +56 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-runtime.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.d.ts +42 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/node-types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.d.ts +37 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.js +41 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.mjs +37 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/registry.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.d.ts +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.js +78 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.mjs +71 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-runtime.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.d.ts +83 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/_shims/web-types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/core.d.ts +239 -0
- package/demo/node_modules/@anthropic-ai/sdk/core.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/core.js +879 -0
- package/demo/node_modules/@anthropic-ai/sdk/core.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/core.mjs +848 -0
- package/demo/node_modules/@anthropic-ai/sdk/core.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/error.d.ts +53 -0
- package/demo/node_modules/@anthropic-ai/sdk/error.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/error.js +143 -0
- package/demo/node_modules/@anthropic-ai/sdk/error.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/error.mjs +127 -0
- package/demo/node_modules/@anthropic-ai/sdk/error.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.d.mts +147 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.d.ts +147 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.js +149 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.mjs +121 -0
- package/demo/node_modules/@anthropic-ai/sdk/index.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +94 -0
- package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +436 -0
- package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +432 -0
- package/demo/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/package.json +104 -0
- package/demo/node_modules/@anthropic-ai/sdk/resource.d.ts +6 -0
- package/demo/node_modules/@anthropic-ai/sdk/resource.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resource.js +11 -0
- package/demo/node_modules/@anthropic-ai/sdk/resource.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resource.mjs +7 -0
- package/demo/node_modules/@anthropic-ai/sdk/resource.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +9 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +40 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +13 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.js +9 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.d.ts +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.js +9 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.mjs +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/index.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.d.ts +462 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.js +20 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.mjs +16 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/messages.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.d.ts +19 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.js +40 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.mjs +13 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/beta/tools/tools.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +184 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/completions.js +19 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/completions.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/completions.mjs +15 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/index.d.ts +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/index.js +11 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/index.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/index.mjs +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/messages.d.ts +619 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/messages.js +28 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/messages.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/messages.mjs +23 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.js +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/resources/top-level.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/node.d.ts +29 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/node.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/node.js +31 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/node.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/node.mjs +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/node.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/web.d.ts +26 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/web.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/web.js +31 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/web.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/web.mjs +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/shims/web.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/MultipartBody.ts +9 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/README.md +46 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime-bun.ts +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime-node.ts +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/runtime.ts +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types-node.ts +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.d.ts +101 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/auto/types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/bun-runtime.ts +14 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.d.ts +81 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.js +13 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/index.mjs +7 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.d.ts +12 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/manual-types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-runtime.ts +83 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.d.ts +42 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/node-types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/registry.ts +67 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-runtime.ts +103 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.d.ts +83 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.js +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/_shims/web-types.mjs +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/core.ts +1162 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/error.ts +146 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/index.ts +264 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/lib/.keep +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +535 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resource.ts +11 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +12 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +4 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/index.ts +16 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/messages.ts +531 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/beta/tools/tools.ts +22 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +223 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/index.ts +33 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/messages.ts +729 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/resources/top-level.ts +3 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/shims/node.ts +50 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/shims/web.ts +50 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/streaming.ts +509 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/tsconfig.json +11 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/uploads.ts +248 -0
- package/demo/node_modules/@anthropic-ai/sdk/src/version.ts +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/streaming.d.ts +41 -0
- package/demo/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/streaming.js +431 -0
- package/demo/node_modules/@anthropic-ai/sdk/streaming.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/streaming.mjs +424 -0
- package/demo/node_modules/@anthropic-ai/sdk/streaming.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/uploads.d.ts +75 -0
- package/demo/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/uploads.js +165 -0
- package/demo/node_modules/@anthropic-ai/sdk/uploads.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/uploads.mjs +152 -0
- package/demo/node_modules/@anthropic-ai/sdk/uploads.mjs.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/version.d.ts +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/version.d.ts.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/version.js +5 -0
- package/demo/node_modules/@anthropic-ai/sdk/version.js.map +1 -0
- package/demo/node_modules/@anthropic-ai/sdk/version.mjs +2 -0
- package/demo/node_modules/@anthropic-ai/sdk/version.mjs.map +1 -0
- package/demo/node_modules/@types/node/LICENSE +21 -0
- package/demo/node_modules/@types/node/README.md +15 -0
- package/demo/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/demo/node_modules/@types/node/assert.d.ts +985 -0
- package/demo/node_modules/@types/node/async_hooks.d.ts +522 -0
- package/demo/node_modules/@types/node/buffer.d.ts +2353 -0
- package/demo/node_modules/@types/node/child_process.d.ts +1544 -0
- package/demo/node_modules/@types/node/cluster.d.ts +578 -0
- package/demo/node_modules/@types/node/console.d.ts +452 -0
- package/demo/node_modules/@types/node/constants.d.ts +19 -0
- package/demo/node_modules/@types/node/crypto.d.ts +4457 -0
- package/demo/node_modules/@types/node/dgram.d.ts +596 -0
- package/demo/node_modules/@types/node/diagnostics_channel.d.ts +546 -0
- package/demo/node_modules/@types/node/dns/promises.d.ts +473 -0
- package/demo/node_modules/@types/node/dns.d.ts +853 -0
- package/demo/node_modules/@types/node/dom-events.d.ts +124 -0
- package/demo/node_modules/@types/node/domain.d.ts +170 -0
- package/demo/node_modules/@types/node/events.d.ts +819 -0
- package/demo/node_modules/@types/node/fs/promises.d.ts +1205 -0
- package/demo/node_modules/@types/node/fs.d.ts +4237 -0
- package/demo/node_modules/@types/node/globals.d.ts +377 -0
- package/demo/node_modules/@types/node/globals.global.d.ts +1 -0
- package/demo/node_modules/@types/node/http.d.ts +1803 -0
- package/demo/node_modules/@types/node/http2.d.ts +2392 -0
- package/demo/node_modules/@types/node/https.d.ts +544 -0
- package/demo/node_modules/@types/node/index.d.ts +88 -0
- package/demo/node_modules/@types/node/inspector.d.ts +2738 -0
- package/demo/node_modules/@types/node/module.d.ts +298 -0
- package/demo/node_modules/@types/node/net.d.ts +918 -0
- package/demo/node_modules/@types/node/os.d.ts +473 -0
- package/demo/node_modules/@types/node/package.json +222 -0
- package/demo/node_modules/@types/node/path.d.ts +191 -0
- package/demo/node_modules/@types/node/perf_hooks.d.ts +626 -0
- package/demo/node_modules/@types/node/process.d.ts +1548 -0
- package/demo/node_modules/@types/node/punycode.d.ts +117 -0
- package/demo/node_modules/@types/node/querystring.d.ts +141 -0
- package/demo/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/demo/node_modules/@types/node/readline.d.ts +666 -0
- package/demo/node_modules/@types/node/repl.d.ts +430 -0
- package/demo/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/demo/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/demo/node_modules/@types/node/stream/web.d.ts +352 -0
- package/demo/node_modules/@types/node/stream.d.ts +1731 -0
- package/demo/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/demo/node_modules/@types/node/test.d.ts +1113 -0
- package/demo/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/demo/node_modules/@types/node/timers.d.ts +126 -0
- package/demo/node_modules/@types/node/tls.d.ts +1203 -0
- package/demo/node_modules/@types/node/trace_events.d.ts +171 -0
- package/demo/node_modules/@types/node/tty.d.ts +206 -0
- package/demo/node_modules/@types/node/url.d.ts +954 -0
- package/demo/node_modules/@types/node/util.d.ts +2075 -0
- package/demo/node_modules/@types/node/v8.d.ts +753 -0
- package/demo/node_modules/@types/node/vm.d.ts +667 -0
- package/demo/node_modules/@types/node/wasi.d.ts +160 -0
- package/demo/node_modules/@types/node/worker_threads.d.ts +692 -0
- package/demo/node_modules/@types/node/zlib.d.ts +517 -0
- package/demo/node_modules/@types/node-fetch/LICENSE +21 -0
- package/demo/node_modules/@types/node-fetch/README.md +15 -0
- package/demo/node_modules/@types/node-fetch/externals.d.ts +32 -0
- package/demo/node_modules/@types/node-fetch/index.d.ts +238 -0
- package/demo/node_modules/@types/node-fetch/package.json +83 -0
- package/demo/node_modules/abort-controller/LICENSE +21 -0
- package/demo/node_modules/abort-controller/README.md +98 -0
- package/demo/node_modules/abort-controller/browser.js +13 -0
- package/demo/node_modules/abort-controller/browser.mjs +11 -0
- package/demo/node_modules/abort-controller/package.json +97 -0
- package/demo/node_modules/abort-controller/polyfill.js +21 -0
- package/demo/node_modules/abort-controller/polyfill.mjs +19 -0
- package/demo/node_modules/agentkeepalive/History.md +268 -0
- package/demo/node_modules/agentkeepalive/LICENSE +23 -0
- package/demo/node_modules/agentkeepalive/README.md +256 -0
- package/demo/node_modules/agentkeepalive/browser.js +5 -0
- package/demo/node_modules/agentkeepalive/index.d.ts +65 -0
- package/demo/node_modules/agentkeepalive/index.js +5 -0
- package/demo/node_modules/agentkeepalive/lib/agent.js +402 -0
- package/demo/node_modules/agentkeepalive/lib/constants.js +14 -0
- package/demo/node_modules/agentkeepalive/lib/https_agent.js +51 -0
- package/demo/node_modules/agentkeepalive/package.json +56 -0
- package/demo/node_modules/asynckit/LICENSE +21 -0
- package/demo/node_modules/asynckit/README.md +233 -0
- package/demo/node_modules/asynckit/bench.js +76 -0
- package/demo/node_modules/asynckit/index.js +6 -0
- package/demo/node_modules/asynckit/lib/abort.js +29 -0
- package/demo/node_modules/asynckit/lib/async.js +34 -0
- package/demo/node_modules/asynckit/lib/defer.js +26 -0
- package/demo/node_modules/asynckit/lib/iterate.js +75 -0
- package/demo/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/demo/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/demo/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/demo/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/demo/node_modules/asynckit/lib/state.js +37 -0
- package/demo/node_modules/asynckit/lib/streamify.js +141 -0
- package/demo/node_modules/asynckit/lib/terminator.js +29 -0
- package/demo/node_modules/asynckit/package.json +63 -0
- package/demo/node_modules/asynckit/parallel.js +43 -0
- package/demo/node_modules/asynckit/serial.js +17 -0
- package/demo/node_modules/asynckit/serialOrdered.js +75 -0
- package/demo/node_modules/asynckit/stream.js +21 -0
- package/demo/node_modules/combined-stream/License +19 -0
- package/demo/node_modules/combined-stream/Readme.md +138 -0
- package/demo/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/demo/node_modules/combined-stream/package.json +25 -0
- package/demo/node_modules/combined-stream/yarn.lock +17 -0
- package/demo/node_modules/delayed-stream/License +19 -0
- package/demo/node_modules/delayed-stream/Makefile +7 -0
- package/demo/node_modules/delayed-stream/Readme.md +141 -0
- package/demo/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/demo/node_modules/delayed-stream/package.json +27 -0
- package/demo/node_modules/dotenv/CHANGELOG.md +475 -0
- package/demo/node_modules/dotenv/LICENSE +23 -0
- package/demo/node_modules/dotenv/README-es.md +448 -0
- package/demo/node_modules/dotenv/README.md +728 -0
- package/demo/node_modules/dotenv/config.d.ts +1 -0
- package/demo/node_modules/dotenv/config.js +9 -0
- package/demo/node_modules/dotenv/lib/cli-options.js +11 -0
- package/demo/node_modules/dotenv/lib/env-options.js +24 -0
- package/demo/node_modules/dotenv/lib/main.d.ts +153 -0
- package/demo/node_modules/dotenv/lib/main.js +361 -0
- package/demo/node_modules/dotenv/package.json +65 -0
- package/demo/node_modules/event-target-shim/LICENSE +22 -0
- package/demo/node_modules/event-target-shim/README.md +293 -0
- package/demo/node_modules/event-target-shim/index.d.ts +399 -0
- package/demo/node_modules/event-target-shim/package.json +82 -0
- package/demo/node_modules/form-data/License +19 -0
- package/demo/node_modules/form-data/README.md.bak +358 -0
- package/demo/node_modules/form-data/Readme.md +358 -0
- package/demo/node_modules/form-data/index.d.ts +62 -0
- package/demo/node_modules/form-data/lib/browser.js +2 -0
- package/demo/node_modules/form-data/lib/form_data.js +501 -0
- package/demo/node_modules/form-data/lib/populate.js +10 -0
- package/demo/node_modules/form-data/package.json +68 -0
- package/demo/node_modules/form-data-encoder/@type/FileLike.d.ts +23 -0
- package/demo/node_modules/form-data-encoder/@type/FormDataEncoder.d.ts +160 -0
- package/demo/node_modules/form-data-encoder/@type/FormDataLike.d.ts +40 -0
- package/demo/node_modules/form-data-encoder/@type/index.d.ts +5 -0
- package/demo/node_modules/form-data-encoder/@type/util/createBoundary.d.ts +13 -0
- package/demo/node_modules/form-data-encoder/@type/util/escapeName.d.ts +11 -0
- package/demo/node_modules/form-data-encoder/@type/util/isFileLike.d.ts +28 -0
- package/demo/node_modules/form-data-encoder/@type/util/isFormData.d.ts +15 -0
- package/demo/node_modules/form-data-encoder/@type/util/isFunction.d.ts +7 -0
- package/demo/node_modules/form-data-encoder/@type/util/isPlainObject.d.ts +2 -0
- package/demo/node_modules/form-data-encoder/@type/util/normalizeValue.d.ts +11 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/FileLike.js +2 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/FormDataEncoder.js +126 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/FormDataLike.js +2 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/index.js +17 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/package.json +3 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/createBoundary.js +12 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/escapeName.js +7 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/isFileLike.js +16 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/isFormData.js +16 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/isFunction.js +4 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/isPlainObject.js +15 -0
- package/demo/node_modules/form-data-encoder/lib/cjs/util/normalizeValue.js +11 -0
- package/demo/node_modules/form-data-encoder/lib/esm/FileLike.js +1 -0
- package/demo/node_modules/form-data-encoder/lib/esm/FormDataEncoder.js +119 -0
- package/demo/node_modules/form-data-encoder/lib/esm/FormDataLike.js +1 -0
- package/demo/node_modules/form-data-encoder/lib/esm/index.js +5 -0
- package/demo/node_modules/form-data-encoder/lib/esm/package.json +3 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/createBoundary.js +10 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/escapeName.js +5 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/isFileLike.js +9 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/isFormData.js +9 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/isFunction.js +2 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/isPlainObject.js +13 -0
- package/demo/node_modules/form-data-encoder/lib/esm/util/normalizeValue.js +9 -0
- package/demo/node_modules/form-data-encoder/license +21 -0
- package/demo/node_modules/form-data-encoder/package.json +63 -0
- package/demo/node_modules/form-data-encoder/readme.md +366 -0
- package/demo/node_modules/formdata-node/@type/Blob.d.ts +66 -0
- package/demo/node_modules/formdata-node/@type/BlobPart.d.ts +2 -0
- package/demo/node_modules/formdata-node/@type/File.d.ts +53 -0
- package/demo/node_modules/formdata-node/@type/FormData.d.ts +105 -0
- package/demo/node_modules/formdata-node/@type/blobHelpers.d.ts +9 -0
- package/demo/node_modules/formdata-node/@type/browser.d.ts +10 -0
- package/demo/node_modules/formdata-node/@type/deprecateConstructorEntries.d.ts +1 -0
- package/demo/node_modules/formdata-node/@type/fileFromPath.d.ts +55 -0
- package/demo/node_modules/formdata-node/@type/index.d.ts +3 -0
- package/demo/node_modules/formdata-node/@type/isBlob.d.ts +2 -0
- package/demo/node_modules/formdata-node/@type/isFile.d.ts +7 -0
- package/demo/node_modules/formdata-node/@type/isFunction.d.ts +1 -0
- package/demo/node_modules/formdata-node/@type/isPlainObject.d.ts +2 -0
- package/demo/node_modules/formdata-node/lib/cjs/Blob.js +122 -0
- package/demo/node_modules/formdata-node/lib/cjs/BlobPart.js +2 -0
- package/demo/node_modules/formdata-node/lib/cjs/File.js +52 -0
- package/demo/node_modules/formdata-node/lib/cjs/FormData.js +148 -0
- package/demo/node_modules/formdata-node/lib/cjs/blobHelpers.js +80 -0
- package/demo/node_modules/formdata-node/lib/cjs/browser.js +13 -0
- package/demo/node_modules/formdata-node/lib/cjs/deprecateConstructorEntries.js +6 -0
- package/demo/node_modules/formdata-node/lib/cjs/fileFromPath.js +97 -0
- package/demo/node_modules/formdata-node/lib/cjs/index.js +15 -0
- package/demo/node_modules/formdata-node/lib/cjs/isBlob.js +6 -0
- package/demo/node_modules/formdata-node/lib/cjs/isFile.js +6 -0
- package/demo/node_modules/formdata-node/lib/cjs/isFunction.js +5 -0
- package/demo/node_modules/formdata-node/lib/cjs/isPlainObject.js +15 -0
- package/demo/node_modules/formdata-node/lib/cjs/package.json +3 -0
- package/demo/node_modules/formdata-node/lib/esm/Blob.js +118 -0
- package/demo/node_modules/formdata-node/lib/esm/BlobPart.js +1 -0
- package/demo/node_modules/formdata-node/lib/esm/File.js +48 -0
- package/demo/node_modules/formdata-node/lib/esm/FormData.js +144 -0
- package/demo/node_modules/formdata-node/lib/esm/blobHelpers.js +75 -0
- package/demo/node_modules/formdata-node/lib/esm/browser.js +10 -0
- package/demo/node_modules/formdata-node/lib/esm/deprecateConstructorEntries.js +3 -0
- package/demo/node_modules/formdata-node/lib/esm/fileFromPath.js +79 -0
- package/demo/node_modules/formdata-node/lib/esm/index.js +3 -0
- package/demo/node_modules/formdata-node/lib/esm/isBlob.js +2 -0
- package/demo/node_modules/formdata-node/lib/esm/isFile.js +2 -0
- package/demo/node_modules/formdata-node/lib/esm/isFunction.js +1 -0
- package/demo/node_modules/formdata-node/lib/esm/isPlainObject.js +13 -0
- package/demo/node_modules/formdata-node/lib/esm/package.json +3 -0
- package/demo/node_modules/formdata-node/lib/node-domexception.d.ts +5 -0
- package/demo/node_modules/formdata-node/license +21 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/LICENSE +22 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/README.md +135 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/es5/package.json +6 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/package.json +101 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/polyfill/es5/package.json +5 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/polyfill/package.json +5 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/polyfill.d.ts +62 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/ponyfill.d.ts +775 -0
- package/demo/node_modules/formdata-node/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +11 -0
- package/demo/node_modules/formdata-node/package.json +94 -0
- package/demo/node_modules/formdata-node/readme.md +444 -0
- package/demo/node_modules/humanize-ms/History.md +25 -0
- package/demo/node_modules/humanize-ms/LICENSE +17 -0
- package/demo/node_modules/humanize-ms/README.md +40 -0
- package/demo/node_modules/humanize-ms/index.js +24 -0
- package/demo/node_modules/humanize-ms/package.json +37 -0
- package/demo/node_modules/mime-db/HISTORY.md +507 -0
- package/demo/node_modules/mime-db/LICENSE +23 -0
- package/demo/node_modules/mime-db/README.md +100 -0
- package/demo/node_modules/mime-db/db.json +8519 -0
- package/demo/node_modules/mime-db/index.js +12 -0
- package/demo/node_modules/mime-db/package.json +60 -0
- package/demo/node_modules/mime-types/HISTORY.md +397 -0
- package/demo/node_modules/mime-types/LICENSE +23 -0
- package/demo/node_modules/mime-types/README.md +113 -0
- package/demo/node_modules/mime-types/index.js +188 -0
- package/demo/node_modules/mime-types/package.json +44 -0
- package/demo/node_modules/ms/index.js +162 -0
- package/demo/node_modules/ms/license.md +21 -0
- package/demo/node_modules/ms/package.json +38 -0
- package/demo/node_modules/ms/readme.md +59 -0
- package/demo/node_modules/node-domexception/.history/README_20210527203617.md +2 -0
- package/demo/node_modules/node-domexception/.history/README_20210527212714.md +41 -0
- package/demo/node_modules/node-domexception/.history/README_20210527213345.md +36 -0
- package/demo/node_modules/node-domexception/.history/README_20210527213411.md +36 -0
- package/demo/node_modules/node-domexception/.history/README_20210527213803.md +36 -0
- package/demo/node_modules/node-domexception/.history/README_20210527214323.md +38 -0
- package/demo/node_modules/node-domexception/.history/README_20210527214408.md +38 -0
- package/demo/node_modules/node-domexception/.history/index_20210527203842.js +0 -0
- package/demo/node_modules/node-domexception/.history/index_20210527203947.js +8 -0
- package/demo/node_modules/node-domexception/.history/index_20210527204259.js +9 -0
- package/demo/node_modules/node-domexception/.history/index_20210527204418.js +9 -0
- package/demo/node_modules/node-domexception/.history/index_20210527204756.js +11 -0
- package/demo/node_modules/node-domexception/.history/index_20210527204833.js +11 -0
- package/demo/node_modules/node-domexception/.history/index_20210527211208.js +15 -0
- package/demo/node_modules/node-domexception/.history/index_20210527211248.js +15 -0
- package/demo/node_modules/node-domexception/.history/index_20210527212722.js +23 -0
- package/demo/node_modules/node-domexception/.history/index_20210527212731.js +23 -0
- package/demo/node_modules/node-domexception/.history/index_20210527212746.js +15 -0
- package/demo/node_modules/node-domexception/.history/index_20210527212900.js +16 -0
- package/demo/node_modules/node-domexception/.history/index_20210527213022.js +16 -0
- package/demo/node_modules/node-domexception/.history/index_20210527213822.js +16 -0
- package/demo/node_modules/node-domexception/.history/index_20210527213843.js +17 -0
- package/demo/node_modules/node-domexception/.history/index_20210527213852.js +17 -0
- package/demo/node_modules/node-domexception/.history/index_20210527213910.js +16 -0
- package/demo/node_modules/node-domexception/.history/index_20210527214034.js +16 -0
- package/demo/node_modules/node-domexception/.history/index_20210527214643.js +41 -0
- package/demo/node_modules/node-domexception/.history/index_20210527214654.js +41 -0
- package/demo/node_modules/node-domexception/.history/index_20210527214700.js +16 -0
- package/demo/node_modules/node-domexception/.history/package_20210527203733.json +19 -0
- package/demo/node_modules/node-domexception/.history/package_20210527203825.json +16 -0
- package/demo/node_modules/node-domexception/.history/package_20210527204621.json +19 -0
- package/demo/node_modules/node-domexception/.history/package_20210527204913.json +25 -0
- package/demo/node_modules/node-domexception/.history/package_20210527204925.json +25 -0
- package/demo/node_modules/node-domexception/.history/package_20210527205145.json +29 -0
- package/demo/node_modules/node-domexception/.history/package_20210527205156.json +29 -0
- package/demo/node_modules/node-domexception/.history/test_20210527205603.js +0 -0
- package/demo/node_modules/node-domexception/.history/test_20210527205957.js +3 -0
- package/demo/node_modules/node-domexception/.history/test_20210527210021.js +3 -0
- package/demo/node_modules/node-domexception/LICENSE +21 -0
- package/demo/node_modules/node-domexception/README.md +46 -0
- package/demo/node_modules/node-domexception/index.js +16 -0
- package/demo/node_modules/node-domexception/package.json +29 -0
- package/demo/node_modules/node-fetch/LICENSE.md +22 -0
- package/demo/node_modules/node-fetch/README.md +634 -0
- package/demo/node_modules/node-fetch/browser.js +25 -0
- package/demo/node_modules/node-fetch/lib/index.es.js +1777 -0
- package/demo/node_modules/node-fetch/lib/index.js +1787 -0
- package/demo/node_modules/node-fetch/lib/index.mjs +1775 -0
- package/demo/node_modules/node-fetch/package.json +89 -0
- package/demo/node_modules/tr46/index.js +193 -0
- package/demo/node_modules/tr46/lib/.gitkeep +0 -0
- package/demo/node_modules/tr46/lib/mappingTable.json +1 -0
- package/demo/node_modules/tr46/package.json +31 -0
- package/demo/node_modules/undici-types/README.md +6 -0
- package/demo/node_modules/undici-types/agent.d.ts +31 -0
- package/demo/node_modules/undici-types/api.d.ts +43 -0
- package/demo/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/demo/node_modules/undici-types/cache.d.ts +36 -0
- package/demo/node_modules/undici-types/client.d.ts +97 -0
- package/demo/node_modules/undici-types/connector.d.ts +34 -0
- package/demo/node_modules/undici-types/content-type.d.ts +21 -0
- package/demo/node_modules/undici-types/cookies.d.ts +28 -0
- package/demo/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/demo/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/demo/node_modules/undici-types/errors.d.ts +128 -0
- package/demo/node_modules/undici-types/fetch.d.ts +209 -0
- package/demo/node_modules/undici-types/file.d.ts +39 -0
- package/demo/node_modules/undici-types/filereader.d.ts +54 -0
- package/demo/node_modules/undici-types/formdata.d.ts +108 -0
- package/demo/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/demo/node_modules/undici-types/global-origin.d.ts +7 -0
- package/demo/node_modules/undici-types/handlers.d.ts +9 -0
- package/demo/node_modules/undici-types/header.d.ts +4 -0
- package/demo/node_modules/undici-types/index.d.ts +63 -0
- package/demo/node_modules/undici-types/interceptors.d.ts +5 -0
- package/demo/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/demo/node_modules/undici-types/mock-client.d.ts +25 -0
- package/demo/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/demo/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/demo/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/demo/node_modules/undici-types/package.json +55 -0
- package/demo/node_modules/undici-types/patch.d.ts +71 -0
- package/demo/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/demo/node_modules/undici-types/pool.d.ts +28 -0
- package/demo/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/demo/node_modules/undici-types/readable.d.ts +61 -0
- package/demo/node_modules/undici-types/webidl.d.ts +220 -0
- package/demo/node_modules/undici-types/websocket.d.ts +131 -0
- package/demo/node_modules/web-streams-polyfill/LICENSE +22 -0
- package/demo/node_modules/web-streams-polyfill/README.md +110 -0
- package/demo/node_modules/web-streams-polyfill/es2018/package.json +14 -0
- package/demo/node_modules/web-streams-polyfill/es6/package.json +14 -0
- package/demo/node_modules/web-streams-polyfill/package.json +83 -0
- package/demo/node_modules/web-streams-polyfill/ponyfill/es2018/package.json +13 -0
- package/demo/node_modules/web-streams-polyfill/ponyfill/es6/package.json +13 -0
- package/demo/node_modules/web-streams-polyfill/ponyfill/package.json +13 -0
- package/demo/node_modules/webidl-conversions/LICENSE.md +12 -0
- package/demo/node_modules/webidl-conversions/README.md +53 -0
- package/demo/node_modules/webidl-conversions/lib/index.js +189 -0
- package/demo/node_modules/webidl-conversions/package.json +23 -0
- package/demo/node_modules/whatwg-url/LICENSE.txt +21 -0
- package/demo/node_modules/whatwg-url/README.md +67 -0
- package/demo/node_modules/whatwg-url/lib/URL-impl.js +200 -0
- package/demo/node_modules/whatwg-url/lib/URL.js +196 -0
- package/demo/node_modules/whatwg-url/lib/public-api.js +11 -0
- package/demo/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
- package/demo/node_modules/whatwg-url/lib/utils.js +20 -0
- package/demo/node_modules/whatwg-url/package.json +32 -0
- package/demo/prompt.md +25 -0
- package/index.js +83 -1
- package/package.json +4 -3
- package/demo/watson.jpg +0 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIPromise } from "../core";
|
|
5
|
+
import { APIResource } from "../resource";
|
|
6
|
+
import { MessageStream } from "../lib/MessageStream";
|
|
7
|
+
export { MessageStream } from "../lib/MessageStream";
|
|
8
|
+
import * as MessagesAPI from "./messages";
|
|
9
|
+
import { Stream } from "../streaming";
|
|
10
|
+
|
|
11
|
+
export class Messages extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Create a Message.
|
|
14
|
+
*
|
|
15
|
+
* Send a structured list of input messages with text and/or image content, and the
|
|
16
|
+
* model will generate the next message in the conversation.
|
|
17
|
+
*
|
|
18
|
+
* The Messages API can be used for for either single queries or stateless
|
|
19
|
+
* multi-turn conversations.
|
|
20
|
+
*/
|
|
21
|
+
create(body: MessageCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Message>;
|
|
22
|
+
create(
|
|
23
|
+
body: MessageCreateParamsStreaming,
|
|
24
|
+
options?: Core.RequestOptions,
|
|
25
|
+
): APIPromise<Stream<MessageStreamEvent>>;
|
|
26
|
+
create(
|
|
27
|
+
body: MessageCreateParamsBase,
|
|
28
|
+
options?: Core.RequestOptions,
|
|
29
|
+
): APIPromise<Stream<MessageStreamEvent> | Message>;
|
|
30
|
+
create(
|
|
31
|
+
body: MessageCreateParams,
|
|
32
|
+
options?: Core.RequestOptions,
|
|
33
|
+
): APIPromise<Message> | APIPromise<Stream<MessageStreamEvent>> {
|
|
34
|
+
return this._client.post('/v1/messages', {
|
|
35
|
+
body,
|
|
36
|
+
timeout: 600000,
|
|
37
|
+
...options,
|
|
38
|
+
stream: body.stream ?? false,
|
|
39
|
+
}) as APIPromise<Message> | APIPromise<Stream<MessageStreamEvent>>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Create a Message stream
|
|
44
|
+
*/
|
|
45
|
+
stream(body: MessageStreamParams, options?: Core.RequestOptions): MessageStream {
|
|
46
|
+
return MessageStream.createMessage(this, body, options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ContentBlock = TextBlock;
|
|
51
|
+
|
|
52
|
+
export interface ContentBlockDeltaEvent {
|
|
53
|
+
delta: TextDelta;
|
|
54
|
+
|
|
55
|
+
index: number;
|
|
56
|
+
|
|
57
|
+
type: 'content_block_delta';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ContentBlockStartEvent {
|
|
61
|
+
content_block: TextBlock;
|
|
62
|
+
|
|
63
|
+
index: number;
|
|
64
|
+
|
|
65
|
+
type: 'content_block_start';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface ContentBlockStopEvent {
|
|
69
|
+
index: number;
|
|
70
|
+
|
|
71
|
+
type: 'content_block_stop';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ImageBlockParam {
|
|
75
|
+
source: ImageBlockParam.Source;
|
|
76
|
+
|
|
77
|
+
type: 'image';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export namespace ImageBlockParam {
|
|
81
|
+
export interface Source {
|
|
82
|
+
data: string;
|
|
83
|
+
|
|
84
|
+
media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
|
|
85
|
+
|
|
86
|
+
type: 'base64';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface Message {
|
|
91
|
+
/**
|
|
92
|
+
* Unique object identifier.
|
|
93
|
+
*
|
|
94
|
+
* The format and length of IDs may change over time.
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Content generated by the model.
|
|
100
|
+
*
|
|
101
|
+
* This is an array of content blocks, each of which has a `type` that determines
|
|
102
|
+
* its shape. Currently, the only `type` in responses is `"text"`.
|
|
103
|
+
*
|
|
104
|
+
* Example:
|
|
105
|
+
*
|
|
106
|
+
* ```json
|
|
107
|
+
* [{ "type": "text", "text": "Hi, I'm Claude." }]
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* If the request input `messages` ended with an `assistant` turn, then the
|
|
111
|
+
* response `content` will continue directly from that last turn. You can use this
|
|
112
|
+
* to constrain the model's output.
|
|
113
|
+
*
|
|
114
|
+
* For example, if the input `messages` were:
|
|
115
|
+
*
|
|
116
|
+
* ```json
|
|
117
|
+
* [
|
|
118
|
+
* {
|
|
119
|
+
* "role": "user",
|
|
120
|
+
* "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
|
121
|
+
* },
|
|
122
|
+
* { "role": "assistant", "content": "The best answer is (" }
|
|
123
|
+
* ]
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* Then the response `content` might be:
|
|
127
|
+
*
|
|
128
|
+
* ```json
|
|
129
|
+
* [{ "type": "text", "text": "B)" }]
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
content: Array<TextBlock>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The model that handled the request.
|
|
136
|
+
*/
|
|
137
|
+
model: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Conversational role of the generated message.
|
|
141
|
+
*
|
|
142
|
+
* This will always be `"assistant"`.
|
|
143
|
+
*/
|
|
144
|
+
role: 'assistant';
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The reason that we stopped.
|
|
148
|
+
*
|
|
149
|
+
* This may be one the following values:
|
|
150
|
+
*
|
|
151
|
+
* - `"end_turn"`: the model reached a natural stopping point
|
|
152
|
+
* - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum
|
|
153
|
+
* - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated
|
|
154
|
+
*
|
|
155
|
+
* In non-streaming mode this value is always non-null. In streaming mode, it is
|
|
156
|
+
* null in the `message_start` event and non-null otherwise.
|
|
157
|
+
*/
|
|
158
|
+
stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Which custom stop sequence was generated, if any.
|
|
162
|
+
*
|
|
163
|
+
* This value will be a non-null string if one of your custom stop sequences was
|
|
164
|
+
* generated.
|
|
165
|
+
*/
|
|
166
|
+
stop_sequence: string | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Object type.
|
|
170
|
+
*
|
|
171
|
+
* For Messages, this is always `"message"`.
|
|
172
|
+
*/
|
|
173
|
+
type: 'message';
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Billing and rate-limit usage.
|
|
177
|
+
*
|
|
178
|
+
* Anthropic's API bills and rate-limits by token counts, as tokens represent the
|
|
179
|
+
* underlying cost to our systems.
|
|
180
|
+
*
|
|
181
|
+
* Under the hood, the API transforms requests into a format suitable for the
|
|
182
|
+
* model. The model's output then goes through a parsing stage before becoming an
|
|
183
|
+
* API response. As a result, the token counts in `usage` will not match one-to-one
|
|
184
|
+
* with the exact visible content of an API request or response.
|
|
185
|
+
*
|
|
186
|
+
* For example, `output_tokens` will be non-zero, even for an empty string response
|
|
187
|
+
* from Claude.
|
|
188
|
+
*/
|
|
189
|
+
usage: Usage;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface MessageDeltaEvent {
|
|
193
|
+
delta: MessageDeltaEvent.Delta;
|
|
194
|
+
|
|
195
|
+
type: 'message_delta';
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Billing and rate-limit usage.
|
|
199
|
+
*
|
|
200
|
+
* Anthropic's API bills and rate-limits by token counts, as tokens represent the
|
|
201
|
+
* underlying cost to our systems.
|
|
202
|
+
*
|
|
203
|
+
* Under the hood, the API transforms requests into a format suitable for the
|
|
204
|
+
* model. The model's output then goes through a parsing stage before becoming an
|
|
205
|
+
* API response. As a result, the token counts in `usage` will not match one-to-one
|
|
206
|
+
* with the exact visible content of an API request or response.
|
|
207
|
+
*
|
|
208
|
+
* For example, `output_tokens` will be non-zero, even for an empty string response
|
|
209
|
+
* from Claude.
|
|
210
|
+
*/
|
|
211
|
+
usage: MessageDeltaUsage;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export namespace MessageDeltaEvent {
|
|
215
|
+
export interface Delta {
|
|
216
|
+
stop_reason: 'end_turn' | 'max_tokens' | 'stop_sequence' | null;
|
|
217
|
+
|
|
218
|
+
stop_sequence: string | null;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface MessageDeltaUsage {
|
|
223
|
+
/**
|
|
224
|
+
* The cumulative number of output tokens which were used.
|
|
225
|
+
*/
|
|
226
|
+
output_tokens: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface MessageParam {
|
|
230
|
+
content: string | Array<TextBlockParam | ImageBlockParam>;
|
|
231
|
+
|
|
232
|
+
role: 'user' | 'assistant';
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface MessageStartEvent {
|
|
236
|
+
message: Message;
|
|
237
|
+
|
|
238
|
+
type: 'message_start';
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface MessageStopEvent {
|
|
242
|
+
type: 'message_stop';
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export type MessageStreamEvent =
|
|
246
|
+
| MessageStartEvent
|
|
247
|
+
| MessageDeltaEvent
|
|
248
|
+
| MessageStopEvent
|
|
249
|
+
| ContentBlockStartEvent
|
|
250
|
+
| ContentBlockDeltaEvent
|
|
251
|
+
| ContentBlockStopEvent;
|
|
252
|
+
|
|
253
|
+
export interface TextBlock {
|
|
254
|
+
text: string;
|
|
255
|
+
|
|
256
|
+
type: 'text';
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface TextBlockParam {
|
|
260
|
+
text: string;
|
|
261
|
+
|
|
262
|
+
type: 'text';
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface TextDelta {
|
|
266
|
+
text: string;
|
|
267
|
+
|
|
268
|
+
type: 'text_delta';
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface Usage {
|
|
272
|
+
/**
|
|
273
|
+
* The number of input tokens which were used.
|
|
274
|
+
*/
|
|
275
|
+
input_tokens: number;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The number of output tokens which were used.
|
|
279
|
+
*/
|
|
280
|
+
output_tokens: number;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
|
|
284
|
+
|
|
285
|
+
export interface MessageCreateParamsBase {
|
|
286
|
+
/**
|
|
287
|
+
* The maximum number of tokens to generate before stopping.
|
|
288
|
+
*
|
|
289
|
+
* Note that our models may stop _before_ reaching this maximum. This parameter
|
|
290
|
+
* only specifies the absolute maximum number of tokens to generate.
|
|
291
|
+
*
|
|
292
|
+
* Different models have different maximum values for this parameter. See
|
|
293
|
+
* [models](https://docs.anthropic.com/claude/docs/models-overview) for details.
|
|
294
|
+
*/
|
|
295
|
+
max_tokens: number;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Input messages.
|
|
299
|
+
*
|
|
300
|
+
* Our models are trained to operate on alternating `user` and `assistant`
|
|
301
|
+
* conversational turns. When creating a new `Message`, you specify the prior
|
|
302
|
+
* conversational turns with the `messages` parameter, and the model then generates
|
|
303
|
+
* the next `Message` in the conversation.
|
|
304
|
+
*
|
|
305
|
+
* Each input message must be an object with a `role` and `content`. You can
|
|
306
|
+
* specify a single `user`-role message, or you can include multiple `user` and
|
|
307
|
+
* `assistant` messages. The first message must always use the `user` role.
|
|
308
|
+
*
|
|
309
|
+
* If the final message uses the `assistant` role, the response content will
|
|
310
|
+
* continue immediately from the content in that message. This can be used to
|
|
311
|
+
* constrain part of the model's response.
|
|
312
|
+
*
|
|
313
|
+
* Example with a single `user` message:
|
|
314
|
+
*
|
|
315
|
+
* ```json
|
|
316
|
+
* [{ "role": "user", "content": "Hello, Claude" }]
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* Example with multiple conversational turns:
|
|
320
|
+
*
|
|
321
|
+
* ```json
|
|
322
|
+
* [
|
|
323
|
+
* { "role": "user", "content": "Hello there." },
|
|
324
|
+
* { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
|
|
325
|
+
* { "role": "user", "content": "Can you explain LLMs in plain English?" }
|
|
326
|
+
* ]
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* Example with a partially-filled response from Claude:
|
|
330
|
+
*
|
|
331
|
+
* ```json
|
|
332
|
+
* [
|
|
333
|
+
* {
|
|
334
|
+
* "role": "user",
|
|
335
|
+
* "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
|
336
|
+
* },
|
|
337
|
+
* { "role": "assistant", "content": "The best answer is (" }
|
|
338
|
+
* ]
|
|
339
|
+
* ```
|
|
340
|
+
*
|
|
341
|
+
* Each input message `content` may be either a single `string` or an array of
|
|
342
|
+
* content blocks, where each block has a specific `type`. Using a `string` for
|
|
343
|
+
* `content` is shorthand for an array of one content block of type `"text"`. The
|
|
344
|
+
* following input messages are equivalent:
|
|
345
|
+
*
|
|
346
|
+
* ```json
|
|
347
|
+
* { "role": "user", "content": "Hello, Claude" }
|
|
348
|
+
* ```
|
|
349
|
+
*
|
|
350
|
+
* ```json
|
|
351
|
+
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
352
|
+
* ```
|
|
353
|
+
*
|
|
354
|
+
* Starting with Claude 3 models, you can also send image content blocks:
|
|
355
|
+
*
|
|
356
|
+
* ```json
|
|
357
|
+
* {
|
|
358
|
+
* "role": "user",
|
|
359
|
+
* "content": [
|
|
360
|
+
* {
|
|
361
|
+
* "type": "image",
|
|
362
|
+
* "source": {
|
|
363
|
+
* "type": "base64",
|
|
364
|
+
* "media_type": "image/jpeg",
|
|
365
|
+
* "data": "/9j/4AAQSkZJRg..."
|
|
366
|
+
* }
|
|
367
|
+
* },
|
|
368
|
+
* { "type": "text", "text": "What is in this image?" }
|
|
369
|
+
* ]
|
|
370
|
+
* }
|
|
371
|
+
* ```
|
|
372
|
+
*
|
|
373
|
+
* We currently support the `base64` source type for images, and the `image/jpeg`,
|
|
374
|
+
* `image/png`, `image/gif`, and `image/webp` media types.
|
|
375
|
+
*
|
|
376
|
+
* See [examples](https://docs.anthropic.com/claude/reference/messages-examples)
|
|
377
|
+
* for more input examples.
|
|
378
|
+
*
|
|
379
|
+
* Note that if you want to include a
|
|
380
|
+
* [system prompt](https://docs.anthropic.com/claude/docs/system-prompts), you can
|
|
381
|
+
* use the top-level `system` parameter — there is no `"system"` role for input
|
|
382
|
+
* messages in the Messages API.
|
|
383
|
+
*/
|
|
384
|
+
messages: Array<MessageParam>;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* The model that will complete your prompt.
|
|
388
|
+
*
|
|
389
|
+
* See [models](https://docs.anthropic.com/claude/docs/models-overview) for
|
|
390
|
+
* additional details and options.
|
|
391
|
+
*/
|
|
392
|
+
model:
|
|
393
|
+
| (string & {})
|
|
394
|
+
| 'claude-3-opus-20240229'
|
|
395
|
+
| 'claude-3-sonnet-20240229'
|
|
396
|
+
| 'claude-3-haiku-20240307'
|
|
397
|
+
| 'claude-2.1'
|
|
398
|
+
| 'claude-2.0'
|
|
399
|
+
| 'claude-instant-1.2';
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* An object describing metadata about the request.
|
|
403
|
+
*/
|
|
404
|
+
metadata?: MessageCreateParams.Metadata;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Custom text sequences that will cause the model to stop generating.
|
|
408
|
+
*
|
|
409
|
+
* Our models will normally stop when they have naturally completed their turn,
|
|
410
|
+
* which will result in a response `stop_reason` of `"end_turn"`.
|
|
411
|
+
*
|
|
412
|
+
* If you want the model to stop generating when it encounters custom strings of
|
|
413
|
+
* text, you can use the `stop_sequences` parameter. If the model encounters one of
|
|
414
|
+
* the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
|
|
415
|
+
* and the response `stop_sequence` value will contain the matched stop sequence.
|
|
416
|
+
*/
|
|
417
|
+
stop_sequences?: Array<string>;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Whether to incrementally stream the response using server-sent events.
|
|
421
|
+
*
|
|
422
|
+
* See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
|
|
423
|
+
* for details.
|
|
424
|
+
*/
|
|
425
|
+
stream?: boolean;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* System prompt.
|
|
429
|
+
*
|
|
430
|
+
* A system prompt is a way of providing context and instructions to Claude, such
|
|
431
|
+
* as specifying a particular goal or role. See our
|
|
432
|
+
* [guide to system prompts](https://docs.anthropic.com/claude/docs/system-prompts).
|
|
433
|
+
*/
|
|
434
|
+
system?: string;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Amount of randomness injected into the response.
|
|
438
|
+
*
|
|
439
|
+
* Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
|
|
440
|
+
* for analytical / multiple choice, and closer to `1.0` for creative and
|
|
441
|
+
* generative tasks.
|
|
442
|
+
*
|
|
443
|
+
* Note that even with `temperature` of `0.0`, the results will not be fully
|
|
444
|
+
* deterministic.
|
|
445
|
+
*/
|
|
446
|
+
temperature?: number;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Only sample from the top K options for each subsequent token.
|
|
450
|
+
*
|
|
451
|
+
* Used to remove "long tail" low probability responses.
|
|
452
|
+
* [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
453
|
+
*
|
|
454
|
+
* Recommended for advanced use cases only. You usually only need to use
|
|
455
|
+
* `temperature`.
|
|
456
|
+
*/
|
|
457
|
+
top_k?: number;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Use nucleus sampling.
|
|
461
|
+
*
|
|
462
|
+
* In nucleus sampling, we compute the cumulative distribution over all the options
|
|
463
|
+
* for each subsequent token in decreasing probability order and cut it off once it
|
|
464
|
+
* reaches a particular probability specified by `top_p`. You should either alter
|
|
465
|
+
* `temperature` or `top_p`, but not both.
|
|
466
|
+
*
|
|
467
|
+
* Recommended for advanced use cases only. You usually only need to use
|
|
468
|
+
* `temperature`.
|
|
469
|
+
*/
|
|
470
|
+
top_p?: number;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export namespace MessageCreateParams {
|
|
474
|
+
/**
|
|
475
|
+
* An object describing metadata about the request.
|
|
476
|
+
*/
|
|
477
|
+
export interface Metadata {
|
|
478
|
+
/**
|
|
479
|
+
* An external identifier for the user who is associated with the request.
|
|
480
|
+
*
|
|
481
|
+
* This should be a uuid, hash value, or other opaque identifier. Anthropic may use
|
|
482
|
+
* this id to help detect abuse. Do not include any identifying information such as
|
|
483
|
+
* name, email address, or phone number.
|
|
484
|
+
*/
|
|
485
|
+
user_id?: string | null;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
|
|
489
|
+
export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
|
|
493
|
+
/**
|
|
494
|
+
* Whether to incrementally stream the response using server-sent events.
|
|
495
|
+
*
|
|
496
|
+
* See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
|
|
497
|
+
* for details.
|
|
498
|
+
*/
|
|
499
|
+
stream?: false;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
503
|
+
/**
|
|
504
|
+
* Whether to incrementally stream the response using server-sent events.
|
|
505
|
+
*
|
|
506
|
+
* See [streaming](https://docs.anthropic.com/claude/reference/messages-streaming)
|
|
507
|
+
* for details.
|
|
508
|
+
*/
|
|
509
|
+
stream: true;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export interface MessageStreamParams {
|
|
513
|
+
/**
|
|
514
|
+
* The maximum number of tokens to generate before stopping.
|
|
515
|
+
*
|
|
516
|
+
* Note that our models may stop _before_ reaching this maximum. This parameter
|
|
517
|
+
* only specifies the absolute maximum number of tokens to generate.
|
|
518
|
+
*
|
|
519
|
+
* Different models have different maximum values for this parameter. See
|
|
520
|
+
* [models](https://docs.anthropic.com/claude/docs/models-overview) for details.
|
|
521
|
+
*/
|
|
522
|
+
max_tokens: number;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Input messages.
|
|
526
|
+
*
|
|
527
|
+
* Our models are trained to operate on alternating `user` and `assistant`
|
|
528
|
+
* conversational turns. When creating a new `Message`, you specify the prior
|
|
529
|
+
* conversational turns with the `messages` parameter, and the model then generates
|
|
530
|
+
* the next `Message` in the conversation.
|
|
531
|
+
*
|
|
532
|
+
* Each input message must be an object with a `role` and `content`. You can
|
|
533
|
+
* specify a single `user`-role message, or you can include multiple `user` and
|
|
534
|
+
* `assistant` messages. The first message must always use the `user` role.
|
|
535
|
+
*
|
|
536
|
+
* If the final message uses the `assistant` role, the response content will
|
|
537
|
+
* continue immediately from the content in that message. This can be used to
|
|
538
|
+
* constrain part of the model's response.
|
|
539
|
+
*
|
|
540
|
+
* Example with a single `user` message:
|
|
541
|
+
*
|
|
542
|
+
* ```json
|
|
543
|
+
* [{ "role": "user", "content": "Hello, Claude" }]
|
|
544
|
+
* ```
|
|
545
|
+
*
|
|
546
|
+
* Example with multiple conversational turns:
|
|
547
|
+
*
|
|
548
|
+
* ```json
|
|
549
|
+
* [
|
|
550
|
+
* { "role": "user", "content": "Hello there." },
|
|
551
|
+
* { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
|
|
552
|
+
* { "role": "user", "content": "Can you explain LLMs in plain English?" }
|
|
553
|
+
* ]
|
|
554
|
+
* ```
|
|
555
|
+
*
|
|
556
|
+
* Example with a partially-filled response from Claude:
|
|
557
|
+
*
|
|
558
|
+
* ```json
|
|
559
|
+
* [
|
|
560
|
+
* {
|
|
561
|
+
* "role": "user",
|
|
562
|
+
* "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
|
|
563
|
+
* },
|
|
564
|
+
* { "role": "assistant", "content": "The best answer is (" }
|
|
565
|
+
* ]
|
|
566
|
+
* ```
|
|
567
|
+
*
|
|
568
|
+
* Each input message `content` may be either a single `string` or an array of
|
|
569
|
+
* content blocks, where each block has a specific `type`. Using a `string` for
|
|
570
|
+
* `content` is shorthand for an array of one content block of type `"text"`. The
|
|
571
|
+
* following input messages are equivalent:
|
|
572
|
+
*
|
|
573
|
+
* ```json
|
|
574
|
+
* { "role": "user", "content": "Hello, Claude" }
|
|
575
|
+
* ```
|
|
576
|
+
*
|
|
577
|
+
* ```json
|
|
578
|
+
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
579
|
+
* ```
|
|
580
|
+
*
|
|
581
|
+
* Starting with Claude 3 models, you can also send image content blocks:
|
|
582
|
+
*
|
|
583
|
+
* ```json
|
|
584
|
+
* {
|
|
585
|
+
* "role": "user",
|
|
586
|
+
* "content": [
|
|
587
|
+
* {
|
|
588
|
+
* "type": "image",
|
|
589
|
+
* "source": {
|
|
590
|
+
* "type": "base64",
|
|
591
|
+
* "media_type": "image/jpeg",
|
|
592
|
+
* "data": "/9j/4AAQSkZJRg..."
|
|
593
|
+
* }
|
|
594
|
+
* },
|
|
595
|
+
* { "type": "text", "text": "What is in this image?" }
|
|
596
|
+
* ]
|
|
597
|
+
* }
|
|
598
|
+
* ```
|
|
599
|
+
*
|
|
600
|
+
* We currently support the `base64` source type for images, and the `image/jpeg`,
|
|
601
|
+
* `image/png`, `image/gif`, and `image/webp` media types.
|
|
602
|
+
*
|
|
603
|
+
* See [examples](https://docs.anthropic.com/claude/reference/messages-examples)
|
|
604
|
+
* for more input examples.
|
|
605
|
+
*
|
|
606
|
+
* Note that if you want to include a
|
|
607
|
+
* [system prompt](https://docs.anthropic.com/claude/docs/system-prompts), you can
|
|
608
|
+
* use the top-level `system` parameter — there is no `"system"` role for input
|
|
609
|
+
* messages in the Messages API.
|
|
610
|
+
*/
|
|
611
|
+
messages: Array<MessageParam>;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* The model that will complete your prompt.
|
|
615
|
+
*
|
|
616
|
+
* See [models](https://docs.anthropic.com/claude/docs/models-overview) for
|
|
617
|
+
* additional details and options.
|
|
618
|
+
*/
|
|
619
|
+
model:
|
|
620
|
+
| (string & {})
|
|
621
|
+
| 'claude-3-opus-20240229'
|
|
622
|
+
| 'claude-3-sonnet-20240229'
|
|
623
|
+
| 'claude-3-haiku-20240307'
|
|
624
|
+
| 'claude-2.1'
|
|
625
|
+
| 'claude-2.0'
|
|
626
|
+
| 'claude-instant-1.2';
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* An object describing metadata about the request.
|
|
630
|
+
*/
|
|
631
|
+
metadata?: MessageStreamParams.Metadata;
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Custom text sequences that will cause the model to stop generating.
|
|
635
|
+
*
|
|
636
|
+
* Our models will normally stop when they have naturally completed their turn,
|
|
637
|
+
* which will result in a response `stop_reason` of `"end_turn"`.
|
|
638
|
+
*
|
|
639
|
+
* If you want the model to stop generating when it encounters custom strings of
|
|
640
|
+
* text, you can use the `stop_sequences` parameter. If the model encounters one of
|
|
641
|
+
* the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
|
|
642
|
+
* and the response `stop_sequence` value will contain the matched stop sequence.
|
|
643
|
+
*/
|
|
644
|
+
stop_sequences?: Array<string>;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* System prompt.
|
|
648
|
+
*
|
|
649
|
+
* A system prompt is a way of providing context and instructions to Claude, such
|
|
650
|
+
* as specifying a particular goal or role. See our
|
|
651
|
+
* [guide to system prompts](https://docs.anthropic.com/claude/docs/system-prompts).
|
|
652
|
+
*/
|
|
653
|
+
system?: string;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Amount of randomness injected into the response.
|
|
657
|
+
*
|
|
658
|
+
* Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
|
|
659
|
+
* for analytical / multiple choice, and closer to `1.0` for creative and
|
|
660
|
+
* generative tasks.
|
|
661
|
+
*
|
|
662
|
+
* Note that even with `temperature` of `0.0`, the results will not be fully
|
|
663
|
+
* deterministic.
|
|
664
|
+
*/
|
|
665
|
+
temperature?: number;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Only sample from the top K options for each subsequent token.
|
|
669
|
+
*
|
|
670
|
+
* Used to remove "long tail" low probability responses.
|
|
671
|
+
* [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
|
|
672
|
+
*
|
|
673
|
+
* Recommended for advanced use cases only. You usually only need to use
|
|
674
|
+
* `temperature`.
|
|
675
|
+
*/
|
|
676
|
+
top_k?: number;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Use nucleus sampling.
|
|
680
|
+
*
|
|
681
|
+
* In nucleus sampling, we compute the cumulative distribution over all the options
|
|
682
|
+
* for each subsequent token in decreasing probability order and cut it off once it
|
|
683
|
+
* reaches a particular probability specified by `top_p`. You should either alter
|
|
684
|
+
* `temperature` or `top_p`, but not both.
|
|
685
|
+
*
|
|
686
|
+
* Recommended for advanced use cases only. You usually only need to use
|
|
687
|
+
* `temperature`.
|
|
688
|
+
*/
|
|
689
|
+
top_p?: number;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export namespace MessageStreamParams {
|
|
693
|
+
/**
|
|
694
|
+
* An object describing metadata about the request.
|
|
695
|
+
*/
|
|
696
|
+
export interface Metadata {
|
|
697
|
+
/**
|
|
698
|
+
* An external identifier for the user who is associated with the request.
|
|
699
|
+
*
|
|
700
|
+
* This should be a uuid, hash value, or other opaque identifier. Anthropic may use
|
|
701
|
+
* this id to help detect abuse. Do not include any identifying information such as
|
|
702
|
+
* name, email address, or phone number.
|
|
703
|
+
*/
|
|
704
|
+
user_id?: string | null;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export namespace Messages {
|
|
709
|
+
export import ContentBlock = MessagesAPI.ContentBlock;
|
|
710
|
+
export import ContentBlockDeltaEvent = MessagesAPI.ContentBlockDeltaEvent;
|
|
711
|
+
export import ContentBlockStartEvent = MessagesAPI.ContentBlockStartEvent;
|
|
712
|
+
export import ContentBlockStopEvent = MessagesAPI.ContentBlockStopEvent;
|
|
713
|
+
export import ImageBlockParam = MessagesAPI.ImageBlockParam;
|
|
714
|
+
export import Message = MessagesAPI.Message;
|
|
715
|
+
export import MessageDeltaEvent = MessagesAPI.MessageDeltaEvent;
|
|
716
|
+
export import MessageDeltaUsage = MessagesAPI.MessageDeltaUsage;
|
|
717
|
+
export import MessageParam = MessagesAPI.MessageParam;
|
|
718
|
+
export import MessageStartEvent = MessagesAPI.MessageStartEvent;
|
|
719
|
+
export import MessageStopEvent = MessagesAPI.MessageStopEvent;
|
|
720
|
+
export import MessageStreamEvent = MessagesAPI.MessageStreamEvent;
|
|
721
|
+
export import TextBlock = MessagesAPI.TextBlock;
|
|
722
|
+
export import TextBlockParam = MessagesAPI.TextBlockParam;
|
|
723
|
+
export import TextDelta = MessagesAPI.TextDelta;
|
|
724
|
+
export import Usage = MessagesAPI.Usage;
|
|
725
|
+
export import MessageCreateParams = MessagesAPI.MessageCreateParams;
|
|
726
|
+
export import MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
|
|
727
|
+
export import MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
|
|
728
|
+
export import MessageStreamParams = MessagesAPI.MessageStreamParams;
|
|
729
|
+
}
|