together-ai 0.20.0 → 0.21.0
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/CHANGELOG.md +15 -0
- package/README.md +112 -46
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +53 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +237 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +237 -0
- package/client.d.ts.map +1 -0
- package/client.js +517 -0
- package/client.js.map +1 -0
- package/client.mjs +513 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +277 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +272 -0
- package/core/streaming.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +6 -170
- package/index.d.mts.map +1 -0
- package/index.d.ts +5 -169
- package/index.d.ts.map +1 -1
- package/index.js +12 -164
- package/index.js.map +1 -1
- package/index.mjs +5 -137
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +1 -5
- package/internal/decoders/line.d.ts.map +1 -1
- package/internal/decoders/line.js +24 -61
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +14 -51
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +45 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +42 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +77 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +77 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +85 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/AbstractChatCompletionRunner.d.mts +113 -0
- package/lib/AbstractChatCompletionRunner.d.mts.map +1 -0
- package/lib/AbstractChatCompletionRunner.d.ts +7 -8
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +48 -58
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +2 -12
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/lib/ChatCompletionRunner.d.mts +19 -0
- package/lib/ChatCompletionRunner.d.mts.map +1 -0
- package/lib/ChatCompletionRunner.d.ts +1 -1
- package/lib/ChatCompletionRunner.d.ts.map +1 -1
- package/lib/ChatCompletionRunner.js.map +1 -1
- package/lib/ChatCompletionRunner.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.mts +149 -0
- package/lib/ChatCompletionStream.d.mts.map +1 -0
- package/lib/ChatCompletionStream.d.ts +6 -7
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +17 -27
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +3 -13
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.mts +21 -0
- package/lib/ChatCompletionStreamingRunner.d.mts.map +1 -0
- package/lib/ChatCompletionStreamingRunner.d.ts +1 -2
- package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.js.map +1 -1
- package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
- package/lib/RunnableFunction.d.mts +95 -0
- package/lib/RunnableFunction.d.mts.map +1 -0
- package/lib/RunnableFunction.d.ts.map +1 -1
- package/lib/RunnableFunction.js +2 -2
- package/lib/RunnableFunction.js.map +1 -1
- package/lib/chatCompletionUtils.d.mts +6 -0
- package/lib/chatCompletionUtils.d.mts.map +1 -0
- package/lib/chatCompletionUtils.d.ts +1 -1
- package/lib/chatCompletionUtils.d.ts.map +1 -1
- package/lib/chatCompletionUtils.js +2 -2
- package/lib/chatCompletionUtils.js.map +1 -1
- package/lib/jsonschema.d.mts +106 -0
- package/lib/jsonschema.d.mts.map +1 -0
- package/lib/upload.d.mts +22 -0
- package/lib/upload.d.mts.map +1 -0
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +19 -50
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +7 -12
- package/lib/upload.mjs.map +1 -1
- package/package.json +123 -66
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/audio/audio.d.mts +114 -0
- package/resources/audio/audio.d.mts.map +1 -0
- package/resources/audio/audio.d.ts +7 -8
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js +6 -27
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs +3 -2
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.mts +4 -0
- package/resources/audio/index.d.mts.map +1 -0
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +124 -0
- package/resources/audio/transcriptions.d.mts.map +1 -0
- package/resources/audio/transcriptions.d.ts +9 -6
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js +3 -26
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs +3 -3
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.mts +123 -0
- package/resources/audio/translations.d.mts.map +1 -0
- package/resources/audio/translations.d.ts +9 -6
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js +3 -26
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs +3 -3
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/audio.d.mts +2 -0
- package/resources/audio.d.mts.map +1 -0
- package/resources/audio.d.ts.map +1 -1
- package/resources/audio.js +2 -15
- package/resources/audio.js.map +1 -1
- package/resources/batches.d.mts +156 -0
- package/resources/batches.d.mts.map +1 -0
- package/resources/batches.d.ts +6 -5
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +3 -2
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +3 -2
- package/resources/batches.mjs.map +1 -1
- package/resources/chat/chat.d.mts +10 -0
- package/resources/chat/chat.d.mts.map +1 -0
- package/resources/chat/chat.d.ts +3 -3
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +3 -25
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +1 -1
- package/resources/chat/completions.d.mts +440 -0
- package/resources/chat/completions.d.mts.map +1 -0
- package/resources/chat/completions.d.ts +18 -10
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +2 -2
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +2 -2
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.mts +3 -0
- package/resources/chat/index.d.mts.map +1 -0
- package/resources/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/chat.d.mts +2 -0
- package/resources/chat.d.mts.map +1 -0
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +2 -15
- package/resources/chat.js.map +1 -1
- package/resources/code-interpreter/code-interpreter.d.mts +140 -0
- package/resources/code-interpreter/code-interpreter.d.mts.map +1 -0
- package/resources/code-interpreter/code-interpreter.d.ts +4 -3
- package/resources/code-interpreter/code-interpreter.d.ts.map +1 -1
- package/resources/code-interpreter/code-interpreter.js +3 -25
- package/resources/code-interpreter/code-interpreter.js.map +1 -1
- package/resources/code-interpreter/code-interpreter.mjs +1 -1
- package/resources/code-interpreter/code-interpreter.mjs.map +1 -1
- package/resources/code-interpreter/index.d.mts +3 -0
- package/resources/code-interpreter/index.d.mts.map +1 -0
- package/resources/code-interpreter/index.d.ts.map +1 -1
- package/resources/code-interpreter/sessions.d.mts +42 -0
- package/resources/code-interpreter/sessions.d.mts.map +1 -0
- package/resources/code-interpreter/sessions.d.ts +4 -3
- package/resources/code-interpreter/sessions.d.ts.map +1 -1
- package/resources/code-interpreter/sessions.js +1 -1
- package/resources/code-interpreter/sessions.js.map +1 -1
- package/resources/code-interpreter/sessions.mjs +1 -1
- package/resources/code-interpreter/sessions.mjs.map +1 -1
- package/resources/code-interpreter.d.mts +2 -0
- package/resources/code-interpreter.d.mts.map +1 -0
- package/resources/code-interpreter.d.ts.map +1 -1
- package/resources/code-interpreter.js +2 -15
- package/resources/code-interpreter.js.map +1 -1
- package/resources/completions.d.mts +256 -0
- package/resources/completions.d.mts.map +1 -0
- package/resources/completions.d.ts +7 -7
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +1 -1
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +1 -1
- package/resources/completions.mjs.map +1 -1
- package/resources/embeddings.d.mts +46 -0
- package/resources/embeddings.d.mts.map +1 -0
- package/resources/embeddings.d.ts +4 -3
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +1 -1
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +1 -1
- package/resources/embeddings.mjs.map +1 -1
- package/resources/endpoints.d.mts +333 -0
- package/resources/endpoints.d.mts.map +1 -0
- package/resources/endpoints.d.ts +8 -8
- package/resources/endpoints.d.ts.map +1 -1
- package/resources/endpoints.js +19 -12
- package/resources/endpoints.js.map +1 -1
- package/resources/endpoints.mjs +19 -12
- package/resources/endpoints.mjs.map +1 -1
- package/resources/files.d.mts +146 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +9 -8
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +7 -5
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +7 -5
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tune.d.mts +666 -0
- package/resources/fine-tune.d.mts.map +1 -0
- package/resources/fine-tune.d.ts +10 -9
- package/resources/fine-tune.d.ts.map +1 -1
- package/resources/fine-tune.js +6 -5
- package/resources/fine-tune.js.map +1 -1
- package/resources/fine-tune.mjs +6 -5
- package/resources/fine-tune.mjs.map +1 -1
- package/resources/hardware.d.mts +95 -0
- package/resources/hardware.d.mts.map +1 -0
- package/resources/hardware.d.ts +4 -4
- package/resources/hardware.d.ts.map +1 -1
- package/resources/hardware.js +6 -5
- package/resources/hardware.js.map +1 -1
- package/resources/hardware.mjs +6 -5
- package/resources/hardware.mjs.map +1 -1
- package/resources/images.d.mts +114 -0
- package/resources/images.d.mts.map +1 -0
- package/resources/images.d.ts +4 -3
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +1 -1
- package/resources/images.mjs.map +1 -1
- package/resources/index.d.mts +15 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/jobs.d.mts +76 -0
- package/resources/jobs.d.mts.map +1 -0
- package/resources/jobs.d.ts +5 -4
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +4 -3
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +4 -3
- package/resources/jobs.mjs.map +1 -1
- package/resources/models.d.mts +98 -0
- package/resources/models.d.mts.map +1 -0
- package/resources/models.d.ts +5 -4
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +1 -1
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +1 -1
- package/resources/models.mjs.map +1 -1
- package/resources/top-level.d.mts +64 -0
- package/resources/top-level.d.mts.map +1 -0
- package/resources/top-level.d.ts.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +964 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/streaming.ts +334 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +5 -421
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/decoders/line.ts +12 -53
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +64 -0
- package/src/internal/request-options.ts +93 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/AbstractChatCompletionRunner.ts +7 -7
- package/src/lib/ChatCompletionRunner.ts +1 -1
- package/src/lib/ChatCompletionStream.ts +8 -9
- package/src/lib/ChatCompletionStreamingRunner.ts +1 -2
- package/src/lib/chatCompletionUtils.ts +1 -1
- package/src/lib/upload.ts +7 -12
- package/src/resource.ts +2 -11
- package/src/resources/audio/audio.ts +10 -10
- package/src/resources/audio/transcriptions.ts +14 -10
- package/src/resources/audio/translations.ts +14 -10
- package/src/resources/batches.ts +8 -6
- package/src/resources/chat/chat.ts +3 -3
- package/src/resources/chat/completions.ts +23 -11
- package/src/resources/chat/index.ts +1 -0
- package/src/resources/code-interpreter/code-interpreter.ts +4 -6
- package/src/resources/code-interpreter/sessions.ts +4 -3
- package/src/resources/completions.ts +8 -8
- package/src/resources/embeddings.ts +4 -3
- package/src/resources/endpoints.ts +18 -21
- package/src/resources/files.ts +15 -12
- package/src/resources/fine-tune.ts +15 -19
- package/src/resources/hardware.ts +6 -11
- package/src/resources/images.ts +4 -3
- package/src/resources/jobs.ts +7 -5
- package/src/resources/models.ts +5 -4
- package/src/streaming.ts +2 -311
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/streaming.d.mts +2 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +1 -31
- package/streaming.d.ts.map +1 -1
- package/streaming.js +3 -264
- package/streaming.js.map +1 -1
- package/streaming.mjs +1 -261
- package/streaming.mjs.map +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -257
- package/core.d.ts.map +0 -1
- package/core.js +0 -935
- package/core.js.map +0 -1
- package/core.mjs +0 -903
- package/core.mjs.map +0 -1
- package/internal/stream-utils.d.ts +0 -8
- package/internal/stream-utils.d.ts.map +0 -1
- package/internal/stream-utils.js +0 -39
- package/internal/stream-utils.js.map +0 -1
- package/internal/stream-utils.mjs +0 -35
- package/internal/stream-utils.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1252
- package/src/internal/stream-utils.ts +0 -32
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.0 (2025-07-24)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.20.0...v0.21.0](https://github.com/togethercomputer/together-typescript/compare/v0.20.0...v0.21.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([628189f](https://github.com/togethercomputer/together-typescript/commit/628189f9e751e0ec8eeae733aecd210dbd901793))
|
|
10
|
+
* **api:** api update ([ef03895](https://github.com/togethercomputer/together-typescript/commit/ef03895d2f6f299939c8bec0bb0c6da0543fb8f2))
|
|
11
|
+
* **api:** api update ([35c3a4e](https://github.com/togethercomputer/together-typescript/commit/35c3a4e77ed9bab9708465a3d2da22519814fbc0))
|
|
12
|
+
* **api:** api update ([03aed33](https://github.com/togethercomputer/together-typescript/commit/03aed3300c951b08ef446b099406ab2a5299ea6b))
|
|
13
|
+
* **api:** manual updates ([96dff27](https://github.com/togethercomputer/together-typescript/commit/96dff2779d938435fed7ff05c10ceb585a9d7a97))
|
|
14
|
+
* **api:** manual updates ([bdf705c](https://github.com/togethercomputer/together-typescript/commit/bdf705c5ee169120e7f44f7e5f18b2be38edf8c3))
|
|
15
|
+
* **api:** Update stainless sdk ([9fb6846](https://github.com/togethercomputer/together-typescript/commit/9fb68467529945ccbc40c66a477815ac5a09545c))
|
|
16
|
+
* **api:** Upgrade Stainless sdk ([8c6dc1c](https://github.com/togethercomputer/together-typescript/commit/8c6dc1c700964cb299da982b07e4b8ee7fbe1abb))
|
|
17
|
+
|
|
3
18
|
## 0.20.0 (2025-07-10)
|
|
4
19
|
|
|
5
20
|
Full Changelog: [v0.19.0...v0.20.0](https://github.com/togethercomputer/together-typescript/compare/v0.19.0...v0.20.0)
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Together
|
|
1
|
+
# Together TypeScript API Library
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.org/package/together-ai) 
|
|
3
|
+
[>)](https://npmjs.org/package/together-ai) 
|
|
4
4
|
|
|
5
5
|
This library provides convenient access to the Together REST API from server-side TypeScript or JavaScript.
|
|
6
6
|
|
|
@@ -88,7 +88,6 @@ Request parameters that correspond to file uploads can be passed in many differe
|
|
|
88
88
|
|
|
89
89
|
```ts
|
|
90
90
|
import fs from 'fs';
|
|
91
|
-
import fetch from 'node-fetch';
|
|
92
91
|
import Together, { toFile } from 'together-ai';
|
|
93
92
|
|
|
94
93
|
const client = new Together();
|
|
@@ -211,8 +210,10 @@ Note that requests which time out will be [retried twice by default](#retries).
|
|
|
211
210
|
### Accessing raw Response data (e.g., headers)
|
|
212
211
|
|
|
213
212
|
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
213
|
+
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
214
214
|
|
|
215
215
|
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
216
|
+
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
216
217
|
|
|
217
218
|
<!-- prettier-ignore -->
|
|
218
219
|
```ts
|
|
@@ -237,6 +238,59 @@ console.log(raw.headers.get('X-My-Header'));
|
|
|
237
238
|
console.log(chatCompletion.choices);
|
|
238
239
|
```
|
|
239
240
|
|
|
241
|
+
### Logging
|
|
242
|
+
|
|
243
|
+
> [!IMPORTANT]
|
|
244
|
+
> All log messages are intended for debugging only. The format and content of log messages
|
|
245
|
+
> may change between releases.
|
|
246
|
+
|
|
247
|
+
#### Log levels
|
|
248
|
+
|
|
249
|
+
The log level can be configured in two ways:
|
|
250
|
+
|
|
251
|
+
1. Via the `TOGETHER_LOG` environment variable
|
|
252
|
+
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
import Together from 'together-ai';
|
|
256
|
+
|
|
257
|
+
const client = new Together({
|
|
258
|
+
logLevel: 'debug', // Show all log messages
|
|
259
|
+
});
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Available log levels, from most to least verbose:
|
|
263
|
+
|
|
264
|
+
- `'debug'` - Show debug messages, info, warnings, and errors
|
|
265
|
+
- `'info'` - Show info messages, warnings, and errors
|
|
266
|
+
- `'warn'` - Show warnings and errors (default)
|
|
267
|
+
- `'error'` - Show only errors
|
|
268
|
+
- `'off'` - Disable all logging
|
|
269
|
+
|
|
270
|
+
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
271
|
+
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
272
|
+
may still be visible.
|
|
273
|
+
|
|
274
|
+
#### Custom logger
|
|
275
|
+
|
|
276
|
+
By default, this library logs to `globalThis.console`. You can also provide a custom logger.
|
|
277
|
+
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
278
|
+
|
|
279
|
+
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
280
|
+
below the configured level will not be sent to your logger.
|
|
281
|
+
|
|
282
|
+
```ts
|
|
283
|
+
import Together from 'together-ai';
|
|
284
|
+
import pino from 'pino';
|
|
285
|
+
|
|
286
|
+
const logger = pino();
|
|
287
|
+
|
|
288
|
+
const client = new Together({
|
|
289
|
+
logger: logger.child({ name: 'Together' }),
|
|
290
|
+
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
291
|
+
});
|
|
292
|
+
```
|
|
293
|
+
|
|
240
294
|
### Making custom/undocumented requests
|
|
241
295
|
|
|
242
296
|
This library is typed for convenient access to the documented API. If you need to access undocumented
|
|
@@ -261,9 +315,8 @@ parameter. This library doesn't validate at runtime that the request matches the
|
|
|
261
315
|
send will be sent as-is.
|
|
262
316
|
|
|
263
317
|
```ts
|
|
264
|
-
client.
|
|
265
|
-
|
|
266
|
-
bar: 12,
|
|
318
|
+
client.chat.completions.create({
|
|
319
|
+
// ...
|
|
267
320
|
// @ts-expect-error baz is not yet public
|
|
268
321
|
baz: 'undocumented option',
|
|
269
322
|
});
|
|
@@ -283,72 +336,85 @@ validate or strip extra properties from the response from the API.
|
|
|
283
336
|
|
|
284
337
|
### Customizing the fetch client
|
|
285
338
|
|
|
286
|
-
By default, this library
|
|
339
|
+
By default, this library expects a global `fetch` function is defined.
|
|
287
340
|
|
|
288
|
-
If you
|
|
289
|
-
(for example, if you are running Node with `--experimental-fetch` or using NextJS which polyfills with `undici`),
|
|
290
|
-
add the following import before your first import `from "Together"`:
|
|
341
|
+
If you want to use a different `fetch` function, you can either polyfill the global:
|
|
291
342
|
|
|
292
343
|
```ts
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
import Together from 'together-ai';
|
|
344
|
+
import fetch from 'my-fetch';
|
|
345
|
+
|
|
346
|
+
globalThis.fetch = fetch;
|
|
297
347
|
```
|
|
298
348
|
|
|
299
|
-
|
|
300
|
-
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/togethercomputer/together-typescript/tree/main/src/_shims#readme)).
|
|
349
|
+
Or pass it to the client:
|
|
301
350
|
|
|
302
|
-
|
|
351
|
+
```ts
|
|
352
|
+
import Together from 'together-ai';
|
|
353
|
+
import fetch from 'my-fetch';
|
|
354
|
+
|
|
355
|
+
const client = new Together({ fetch });
|
|
356
|
+
```
|
|
303
357
|
|
|
304
|
-
|
|
305
|
-
|
|
358
|
+
### Fetch options
|
|
359
|
+
|
|
360
|
+
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
306
361
|
|
|
307
362
|
```ts
|
|
308
|
-
import { fetch } from 'undici'; // as one example
|
|
309
363
|
import Together from 'together-ai';
|
|
310
364
|
|
|
311
365
|
const client = new Together({
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
const response = await fetch(url, init);
|
|
315
|
-
console.log('Got response', response);
|
|
316
|
-
return response;
|
|
366
|
+
fetchOptions: {
|
|
367
|
+
// `RequestInit` options
|
|
317
368
|
},
|
|
318
369
|
});
|
|
319
370
|
```
|
|
320
371
|
|
|
321
|
-
|
|
322
|
-
This is intended for debugging purposes only and may change in the future without notice.
|
|
323
|
-
|
|
324
|
-
### Configuring an HTTP(S) Agent (e.g., for proxies)
|
|
372
|
+
#### Configuring proxies
|
|
325
373
|
|
|
326
|
-
|
|
374
|
+
To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
|
|
375
|
+
options to requests:
|
|
327
376
|
|
|
328
|
-
|
|
377
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
|
|
329
378
|
|
|
330
|
-
<!-- prettier-ignore -->
|
|
331
379
|
```ts
|
|
332
|
-
import
|
|
333
|
-
import
|
|
380
|
+
import Together from 'together-ai';
|
|
381
|
+
import * as undici from 'undici';
|
|
334
382
|
|
|
335
|
-
|
|
383
|
+
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
336
384
|
const client = new Together({
|
|
337
|
-
|
|
385
|
+
fetchOptions: {
|
|
386
|
+
dispatcher: proxyAgent,
|
|
387
|
+
},
|
|
338
388
|
});
|
|
389
|
+
```
|
|
339
390
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
391
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
|
|
392
|
+
|
|
393
|
+
```ts
|
|
394
|
+
import Together from 'together-ai';
|
|
395
|
+
|
|
396
|
+
const client = new Together({
|
|
397
|
+
fetchOptions: {
|
|
398
|
+
proxy: 'http://localhost:8888',
|
|
345
399
|
},
|
|
346
|
-
|
|
347
|
-
|
|
400
|
+
});
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
404
|
+
|
|
405
|
+
```ts
|
|
406
|
+
import Together from 'npm:together-ai';
|
|
407
|
+
|
|
408
|
+
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
|
|
409
|
+
const client = new Together({
|
|
410
|
+
fetchOptions: {
|
|
411
|
+
client: httpClient,
|
|
348
412
|
},
|
|
349
|
-
);
|
|
413
|
+
});
|
|
350
414
|
```
|
|
351
415
|
|
|
416
|
+
## Frequently Asked Questions
|
|
417
|
+
|
|
352
418
|
## Semantic versioning
|
|
353
419
|
|
|
354
420
|
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
@@ -363,12 +429,12 @@ We are keen for your feedback; please open an [issue](https://www.github.com/tog
|
|
|
363
429
|
|
|
364
430
|
## Requirements
|
|
365
431
|
|
|
366
|
-
TypeScript >= 4.
|
|
432
|
+
TypeScript >= 4.9 is supported.
|
|
367
433
|
|
|
368
434
|
The following runtimes are supported:
|
|
369
435
|
|
|
370
436
|
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
371
|
-
- Node.js
|
|
437
|
+
- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
372
438
|
- Deno v1.28.0 or higher.
|
|
373
439
|
- Bun 1.0 or later.
|
|
374
440
|
- Cloudflare Workers.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/api-promise.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/api-promise.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
/** @deprecated Import from ./core/api-promise instead */
|
|
5
|
+
tslib_1.__exportStar(require("./core/api-promise.js"), exports);
|
|
6
|
+
//# sourceMappingURL=api-promise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
|
package/api-promise.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
package/bin/cli
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
const commands = {
|
|
6
|
+
migrate: {
|
|
7
|
+
description:
|
|
8
|
+
'Run migrations to update your code using together-ai@0.20.0 to be compatible with together-ai@0.21.0',
|
|
9
|
+
fn: () => {
|
|
10
|
+
const result = spawnSync(
|
|
11
|
+
'npx',
|
|
12
|
+
[
|
|
13
|
+
'-y',
|
|
14
|
+
'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz',
|
|
15
|
+
'--migrationConfig',
|
|
16
|
+
require.resolve('./migration-config.json'),
|
|
17
|
+
...process.argv.slice(3),
|
|
18
|
+
],
|
|
19
|
+
{ stdio: 'inherit' },
|
|
20
|
+
);
|
|
21
|
+
if (result.status !== 0) {
|
|
22
|
+
process.exit(result.status);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function exitWithHelp() {
|
|
29
|
+
console.log(`Usage: together-ai <subcommand>`);
|
|
30
|
+
console.log();
|
|
31
|
+
console.log('Subcommands:');
|
|
32
|
+
|
|
33
|
+
for (const [name, info] of Object.entries(commands)) {
|
|
34
|
+
console.log(` ${name} ${info.description}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
console.log();
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (process.argv.length < 3) {
|
|
42
|
+
exitWithHelp();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const commandName = process.argv[2];
|
|
46
|
+
|
|
47
|
+
const command = commands[commandName];
|
|
48
|
+
if (!command) {
|
|
49
|
+
console.log(`Unknown subcommand ${commandName}.`);
|
|
50
|
+
exitWithHelp();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
command.fn();
|
package/client.d.mts
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import type { RequestInit, RequestInfo } from "./internal/builtin-types.mjs";
|
|
2
|
+
import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.mjs";
|
|
3
|
+
export type { Logger, LogLevel } from "./internal/utils/log.mjs";
|
|
4
|
+
import * as Opts from "./internal/request-options.mjs";
|
|
5
|
+
import * as Errors from "./core/error.mjs";
|
|
6
|
+
import * as Uploads from "./core/uploads.mjs";
|
|
7
|
+
import * as API from "./resources/index.mjs";
|
|
8
|
+
import * as TopLevelAPI from "./resources/top-level.mjs";
|
|
9
|
+
import { RerankParams, RerankResponse } from "./resources/top-level.mjs";
|
|
10
|
+
import { APIPromise } from "./core/api-promise.mjs";
|
|
11
|
+
import { BatchCreateParams, BatchCreateResponse, BatchListResponse, BatchRetrieveResponse, Batches } from "./resources/batches.mjs";
|
|
12
|
+
import { Completion, CompletionChunk, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions, LogProbs, ToolChoice, Tools } from "./resources/completions.mjs";
|
|
13
|
+
import { Embedding, EmbeddingCreateParams, Embeddings } from "./resources/embeddings.mjs";
|
|
14
|
+
import { Autoscaling, EndpointCreateParams, EndpointCreateResponse, EndpointListParams, EndpointListResponse, EndpointRetrieveResponse, EndpointUpdateParams, EndpointUpdateResponse, Endpoints } from "./resources/endpoints.mjs";
|
|
15
|
+
import { FileDeleteResponse, FileListResponse, FileObject, FilePurpose, FileRetrieveResponse, FileType, FileUploadParams, FileUploadResponse, Files } from "./resources/files.mjs";
|
|
16
|
+
import { CosineLrSchedulerArgs, FineTune, FineTuneCancelResponse, FineTuneCreateParams, FineTuneCreateResponse, FineTuneDownloadParams, FineTuneDownloadResponse, FineTuneEvent, FineTuneListEventsResponse, FineTuneListResponse, FineTuneResource, FineTuneRetrieveCheckpointsResponse, FullTrainingType, LinearLrSchedulerArgs, LoRaTrainingType, LrScheduler, TrainingMethodDpo, TrainingMethodSft } from "./resources/fine-tune.mjs";
|
|
17
|
+
import { Hardware, HardwareListParams, HardwareListResponse } from "./resources/hardware.mjs";
|
|
18
|
+
import { ImageCreateParams, ImageDataB64, ImageDataURL, ImageFile, Images } from "./resources/images.mjs";
|
|
19
|
+
import { JobListResponse, JobRetrieveResponse, Jobs } from "./resources/jobs.mjs";
|
|
20
|
+
import { ModelListResponse, ModelUploadParams, ModelUploadResponse, Models } from "./resources/models.mjs";
|
|
21
|
+
import { Audio, AudioCreateParams, AudioCreateParamsNonStreaming, AudioCreateParamsStreaming, AudioFile, AudioSpeechStreamChunk } from "./resources/audio/audio.mjs";
|
|
22
|
+
import { Chat } from "./resources/chat/chat.mjs";
|
|
23
|
+
import { CodeInterpreter, CodeInterpreterExecuteParams, ExecuteResponse } from "./resources/code-interpreter/code-interpreter.mjs";
|
|
24
|
+
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
25
|
+
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
26
|
+
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
|
27
|
+
import { type LogLevel, type Logger } from "./internal/utils/log.mjs";
|
|
28
|
+
export interface ClientOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Defaults to process.env['TOGETHER_API_KEY'].
|
|
31
|
+
*/
|
|
32
|
+
apiKey?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
35
|
+
*
|
|
36
|
+
* Defaults to process.env['TOGETHER_BASE_URL'].
|
|
37
|
+
*/
|
|
38
|
+
baseURL?: string | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
|
41
|
+
* from the server before timing out a single request.
|
|
42
|
+
*
|
|
43
|
+
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
44
|
+
* much longer than this timeout before the promise succeeds or fails.
|
|
45
|
+
*
|
|
46
|
+
* @unit milliseconds
|
|
47
|
+
*/
|
|
48
|
+
timeout?: number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Additional `RequestInit` options to be passed to `fetch` calls.
|
|
51
|
+
* Properties will be overridden by per-request `fetchOptions`.
|
|
52
|
+
*/
|
|
53
|
+
fetchOptions?: MergedRequestInit | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Specify a custom `fetch` function implementation.
|
|
56
|
+
*
|
|
57
|
+
* If not provided, we expect that `fetch` is defined globally.
|
|
58
|
+
*/
|
|
59
|
+
fetch?: Fetch | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The maximum number of times that the client will retry a request in case of a
|
|
62
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
|
63
|
+
*
|
|
64
|
+
* @default 5
|
|
65
|
+
*/
|
|
66
|
+
maxRetries?: number | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Default headers to include with every request to the API.
|
|
69
|
+
*
|
|
70
|
+
* These can be removed in individual requests by explicitly setting the
|
|
71
|
+
* header to `null` in request options.
|
|
72
|
+
*/
|
|
73
|
+
defaultHeaders?: HeadersLike | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Default query parameters to include with every request to the API.
|
|
76
|
+
*
|
|
77
|
+
* These can be removed in individual requests by explicitly setting the
|
|
78
|
+
* param to `undefined` in request options.
|
|
79
|
+
*/
|
|
80
|
+
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Set the log level.
|
|
83
|
+
*
|
|
84
|
+
* Defaults to process.env['TOGETHER_LOG'] or 'warn' if it isn't set.
|
|
85
|
+
*/
|
|
86
|
+
logLevel?: LogLevel | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Set the logger.
|
|
89
|
+
*
|
|
90
|
+
* Defaults to globalThis.console.
|
|
91
|
+
*/
|
|
92
|
+
logger?: Logger | undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* API Client for interfacing with the Together API.
|
|
96
|
+
*/
|
|
97
|
+
export declare class Together {
|
|
98
|
+
#private;
|
|
99
|
+
apiKey: string;
|
|
100
|
+
baseURL: string;
|
|
101
|
+
maxRetries: number;
|
|
102
|
+
timeout: number;
|
|
103
|
+
logger: Logger | undefined;
|
|
104
|
+
logLevel: LogLevel | undefined;
|
|
105
|
+
fetchOptions: MergedRequestInit | undefined;
|
|
106
|
+
private fetch;
|
|
107
|
+
protected idempotencyHeader?: string;
|
|
108
|
+
private _options;
|
|
109
|
+
/**
|
|
110
|
+
* API Client for interfacing with the Together API.
|
|
111
|
+
*
|
|
112
|
+
* @param {string | undefined} [opts.apiKey=process.env['TOGETHER_API_KEY'] ?? undefined]
|
|
113
|
+
* @param {string} [opts.baseURL=process.env['TOGETHER_BASE_URL'] ?? https://api.together.xyz/v1] - Override the default base URL for the API.
|
|
114
|
+
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
115
|
+
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
116
|
+
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
117
|
+
* @param {number} [opts.maxRetries=5] - The maximum number of times the client will retry a request.
|
|
118
|
+
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
119
|
+
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
120
|
+
*/
|
|
121
|
+
constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
|
|
122
|
+
/**
|
|
123
|
+
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
124
|
+
*/
|
|
125
|
+
withOptions(options: Partial<ClientOptions>): this;
|
|
126
|
+
/**
|
|
127
|
+
* Query a reranker model
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const response = await client.rerank({
|
|
132
|
+
* documents: [
|
|
133
|
+
* { title: 'bar', text: 'bar' },
|
|
134
|
+
* { title: 'bar', text: 'bar' },
|
|
135
|
+
* { title: 'bar', text: 'bar' },
|
|
136
|
+
* { title: 'bar', text: 'bar' },
|
|
137
|
+
* ],
|
|
138
|
+
* model: 'Salesforce/Llama-Rank-V1',
|
|
139
|
+
* query: 'What animals can I find near Peru?',
|
|
140
|
+
* });
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
|
|
144
|
+
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
145
|
+
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
146
|
+
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
147
|
+
/**
|
|
148
|
+
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
149
|
+
*/
|
|
150
|
+
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
151
|
+
private getUserAgent;
|
|
152
|
+
protected defaultIdempotencyKey(): string;
|
|
153
|
+
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
154
|
+
buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
|
|
155
|
+
/**
|
|
156
|
+
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
157
|
+
*/
|
|
158
|
+
protected prepareOptions(options: FinalRequestOptions): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Used as a callback for mutating the given `RequestInit` object.
|
|
161
|
+
*
|
|
162
|
+
* This is useful for cases where you want to add certain headers based off of
|
|
163
|
+
* the request properties, e.g. `method` or `url`.
|
|
164
|
+
*/
|
|
165
|
+
protected prepareRequest(request: RequestInit, { url, options }: {
|
|
166
|
+
url: string;
|
|
167
|
+
options: FinalRequestOptions;
|
|
168
|
+
}): Promise<void>;
|
|
169
|
+
get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
170
|
+
post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
171
|
+
patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
172
|
+
put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
173
|
+
delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
|
|
174
|
+
private methodRequest;
|
|
175
|
+
request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
|
|
176
|
+
private makeRequest;
|
|
177
|
+
fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
|
|
178
|
+
private shouldRetry;
|
|
179
|
+
private retryRequest;
|
|
180
|
+
private calculateDefaultRetryTimeoutMillis;
|
|
181
|
+
buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
|
|
182
|
+
retryCount?: number;
|
|
183
|
+
}): Promise<{
|
|
184
|
+
req: FinalizedRequestInit;
|
|
185
|
+
url: string;
|
|
186
|
+
timeout: number;
|
|
187
|
+
}>;
|
|
188
|
+
private buildHeaders;
|
|
189
|
+
private buildBody;
|
|
190
|
+
static Together: typeof Together;
|
|
191
|
+
static DEFAULT_TIMEOUT: number;
|
|
192
|
+
static TogetherError: typeof Errors.TogetherError;
|
|
193
|
+
static APIError: typeof Errors.APIError;
|
|
194
|
+
static APIConnectionError: typeof Errors.APIConnectionError;
|
|
195
|
+
static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
|
|
196
|
+
static APIUserAbortError: typeof Errors.APIUserAbortError;
|
|
197
|
+
static NotFoundError: typeof Errors.NotFoundError;
|
|
198
|
+
static ConflictError: typeof Errors.ConflictError;
|
|
199
|
+
static RateLimitError: typeof Errors.RateLimitError;
|
|
200
|
+
static BadRequestError: typeof Errors.BadRequestError;
|
|
201
|
+
static AuthenticationError: typeof Errors.AuthenticationError;
|
|
202
|
+
static InternalServerError: typeof Errors.InternalServerError;
|
|
203
|
+
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
204
|
+
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
205
|
+
static toFile: typeof Uploads.toFile;
|
|
206
|
+
chat: API.Chat;
|
|
207
|
+
completions: API.Completions;
|
|
208
|
+
embeddings: API.Embeddings;
|
|
209
|
+
files: API.Files;
|
|
210
|
+
fineTune: API.FineTuneResource;
|
|
211
|
+
codeInterpreter: API.CodeInterpreter;
|
|
212
|
+
images: API.Images;
|
|
213
|
+
audio: API.Audio;
|
|
214
|
+
models: API.Models;
|
|
215
|
+
jobs: API.Jobs;
|
|
216
|
+
endpoints: API.Endpoints;
|
|
217
|
+
hardware: API.Hardware;
|
|
218
|
+
batches: API.Batches;
|
|
219
|
+
}
|
|
220
|
+
export declare namespace Together {
|
|
221
|
+
export type RequestOptions = Opts.RequestOptions;
|
|
222
|
+
export { type RerankResponse as RerankResponse, type RerankParams as RerankParams };
|
|
223
|
+
export { Chat as Chat };
|
|
224
|
+
export { Completions as Completions, type Completion as Completion, type CompletionChunk as CompletionChunk, type LogProbs as LogProbs, type ToolChoice as ToolChoice, type Tools as Tools, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, };
|
|
225
|
+
export { Embeddings as Embeddings, type Embedding as Embedding, type EmbeddingCreateParams as EmbeddingCreateParams, };
|
|
226
|
+
export { Files as Files, type FileObject as FileObject, type FilePurpose as FilePurpose, type FileType as FileType, type FileRetrieveResponse as FileRetrieveResponse, type FileListResponse as FileListResponse, type FileDeleteResponse as FileDeleteResponse, type FileUploadResponse as FileUploadResponse, type FileUploadParams as FileUploadParams, };
|
|
227
|
+
export { FineTuneResource as FineTuneResource, type CosineLrSchedulerArgs as CosineLrSchedulerArgs, type FineTune as FineTune, type FineTuneEvent as FineTuneEvent, type FullTrainingType as FullTrainingType, type LinearLrSchedulerArgs as LinearLrSchedulerArgs, type LoRaTrainingType as LoRaTrainingType, type LrScheduler as LrScheduler, type TrainingMethodDpo as TrainingMethodDpo, type TrainingMethodSft as TrainingMethodSft, type FineTuneCreateResponse as FineTuneCreateResponse, type FineTuneListResponse as FineTuneListResponse, type FineTuneCancelResponse as FineTuneCancelResponse, type FineTuneDownloadResponse as FineTuneDownloadResponse, type FineTuneListEventsResponse as FineTuneListEventsResponse, type FineTuneRetrieveCheckpointsResponse as FineTuneRetrieveCheckpointsResponse, type FineTuneCreateParams as FineTuneCreateParams, type FineTuneDownloadParams as FineTuneDownloadParams, };
|
|
228
|
+
export { CodeInterpreter as CodeInterpreter, type ExecuteResponse as ExecuteResponse, type CodeInterpreterExecuteParams as CodeInterpreterExecuteParams, };
|
|
229
|
+
export { Images as Images, type ImageDataB64 as ImageDataB64, type ImageDataURL as ImageDataURL, type ImageFile as ImageFile, type ImageCreateParams as ImageCreateParams, };
|
|
230
|
+
export { Audio as Audio, type AudioFile as AudioFile, type AudioSpeechStreamChunk as AudioSpeechStreamChunk, type AudioCreateParams as AudioCreateParams, type AudioCreateParamsNonStreaming as AudioCreateParamsNonStreaming, type AudioCreateParamsStreaming as AudioCreateParamsStreaming, };
|
|
231
|
+
export { Models as Models, type ModelListResponse as ModelListResponse, type ModelUploadResponse as ModelUploadResponse, type ModelUploadParams as ModelUploadParams, };
|
|
232
|
+
export { Jobs as Jobs, type JobRetrieveResponse as JobRetrieveResponse, type JobListResponse as JobListResponse, };
|
|
233
|
+
export { Endpoints as Endpoints, type Autoscaling as Autoscaling, type EndpointCreateResponse as EndpointCreateResponse, type EndpointRetrieveResponse as EndpointRetrieveResponse, type EndpointUpdateResponse as EndpointUpdateResponse, type EndpointListResponse as EndpointListResponse, type EndpointCreateParams as EndpointCreateParams, type EndpointUpdateParams as EndpointUpdateParams, type EndpointListParams as EndpointListParams, };
|
|
234
|
+
export { Hardware as Hardware, type HardwareListResponse as HardwareListResponse, type HardwareListParams as HardwareListParams, };
|
|
235
|
+
export { Batches as Batches, type BatchCreateResponse as BatchCreateResponse, type BatchRetrieveResponse as BatchRetrieveResponse, type BatchListResponse as BatchListResponse, type BatchCreateParams as BatchCreateParams, };
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,KAAK,WAAW;OAChB,EAAE,YAAY,EAAE,cAAc,EAAE;OAChC,EAAE,UAAU,EAAE;OACd,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,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