@superinterface/react 5.1.2 → 5.2.0-beta.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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/package.json +8 -6
- package/types/index.d.ts +4 -0
- package/types/node_modules/openai/LICENSE +201 -0
- package/types/node_modules/openai/_vendor/partial-json-parser/parser.d.mts +7 -0
- package/types/node_modules/openai/_vendor/partial-json-parser/parser.d.ts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/Options.d.mts +32 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/Options.d.ts +32 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.mts +21 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/Refs.d.ts +21 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.mts +12 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/errorMessages.d.ts +12 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/index.d.mts +38 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/index.d.ts +38 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.mts +38 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parseDef.d.ts +38 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/any.d.mts +3 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/any.d.ts +3 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.d.mts +13 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/array.d.ts +13 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.d.mts +15 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/bigint.d.ts +15 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/boolean.d.mts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/boolean.d.ts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.mts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/branded.d.ts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.mts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/catch.d.ts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.d.mts +16 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/date.d.ts +16 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.d.mts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/default.d.ts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/effects.d.mts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/effects.d.ts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/enum.d.mts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/enum.d.ts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.d.mts +9 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/intersection.d.ts +9 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.d.mts +10 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/literal.d.ts +10 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/map.d.mts +16 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/map.d.ts +16 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.d.mts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nativeEnum.d.ts +7 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/never.d.mts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/never.d.ts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.d.mts +6 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/null.d.ts +6 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.d.mts +11 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/nullable.d.ts +11 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.d.mts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/number.d.ts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.d.mts +11 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/object.d.ts +11 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.d.mts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/optional.d.ts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.d.mts +6 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/pipeline.d.ts +6 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.d.mts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/promise.d.ts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.mts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/readonly.d.ts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.d.mts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/record.d.ts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/set.d.mts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/set.d.ts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.d.mts +70 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/string.d.ts +70 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.d.mts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/tuple.d.ts +14 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/undefined.d.mts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/undefined.d.ts +5 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.d.mts +24 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/union.d.ts +24 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/unknown.d.mts +3 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/parsers/unknown.d.ts +3 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/util.d.mts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/util.d.ts +4 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.d.mts +11 -0
- package/types/node_modules/openai/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts +11 -0
- package/types/node_modules/openai/api-promise.d.mts +2 -0
- package/types/node_modules/openai/api-promise.d.ts +2 -0
- package/types/node_modules/openai/azure.d.mts +63 -0
- package/types/node_modules/openai/azure.d.ts +63 -0
- package/types/node_modules/openai/beta/realtime/index.d.mts +2 -0
- package/types/node_modules/openai/beta/realtime/index.d.ts +2 -0
- package/types/node_modules/openai/beta/realtime/internal-base.d.mts +45 -0
- package/types/node_modules/openai/beta/realtime/internal-base.d.ts +45 -0
- package/types/node_modules/openai/beta/realtime/websocket.d.mts +36 -0
- package/types/node_modules/openai/beta/realtime/websocket.d.ts +36 -0
- package/types/node_modules/openai/beta/realtime/ws.d.mts +27 -0
- package/types/node_modules/openai/beta/realtime/ws.d.ts +27 -0
- package/types/node_modules/openai/client.d.mts +297 -0
- package/types/node_modules/openai/client.d.ts +297 -0
- package/types/node_modules/openai/core/api-promise.d.mts +49 -0
- package/types/node_modules/openai/core/api-promise.d.ts +49 -0
- package/types/node_modules/openai/core/error.d.mts +59 -0
- package/types/node_modules/openai/core/error.d.ts +59 -0
- package/types/node_modules/openai/core/pagination.d.mts +89 -0
- package/types/node_modules/openai/core/pagination.d.ts +89 -0
- package/types/node_modules/openai/core/resource.d.mts +6 -0
- package/types/node_modules/openai/core/resource.d.ts +6 -0
- package/types/node_modules/openai/core/streaming.d.mts +33 -0
- package/types/node_modules/openai/core/streaming.d.ts +33 -0
- package/types/node_modules/openai/core/uploads.d.mts +3 -0
- package/types/node_modules/openai/core/uploads.d.ts +3 -0
- package/types/node_modules/openai/error.d.mts +2 -0
- package/types/node_modules/openai/error.d.ts +2 -0
- package/types/node_modules/openai/helpers/audio.d.mts +9 -0
- package/types/node_modules/openai/helpers/audio.d.ts +9 -0
- package/types/node_modules/openai/helpers/zod.d.mts +70 -0
- package/types/node_modules/openai/helpers/zod.d.ts +70 -0
- package/types/node_modules/openai/index.d.mts +8 -0
- package/types/node_modules/openai/index.d.ts +8 -0
- package/types/node_modules/openai/internal/builtin-types.d.mts +73 -0
- package/types/node_modules/openai/internal/builtin-types.d.ts +73 -0
- package/types/node_modules/openai/internal/decoders/line.d.mts +17 -0
- package/types/node_modules/openai/internal/decoders/line.d.ts +17 -0
- package/types/node_modules/openai/internal/detect-platform.d.mts +15 -0
- package/types/node_modules/openai/internal/detect-platform.d.ts +15 -0
- package/types/node_modules/openai/internal/errors.d.mts +3 -0
- package/types/node_modules/openai/internal/errors.d.ts +3 -0
- package/types/node_modules/openai/internal/headers.d.mts +20 -0
- package/types/node_modules/openai/internal/headers.d.ts +20 -0
- package/types/node_modules/openai/internal/parse.d.mts +17 -0
- package/types/node_modules/openai/internal/parse.d.ts +17 -0
- package/types/node_modules/openai/internal/qs/formats.d.mts +7 -0
- package/types/node_modules/openai/internal/qs/formats.d.ts +7 -0
- package/types/node_modules/openai/internal/qs/index.d.mts +10 -0
- package/types/node_modules/openai/internal/qs/index.d.ts +10 -0
- package/types/node_modules/openai/internal/qs/stringify.d.mts +3 -0
- package/types/node_modules/openai/internal/qs/stringify.d.ts +3 -0
- package/types/node_modules/openai/internal/qs/types.d.mts +57 -0
- package/types/node_modules/openai/internal/qs/types.d.ts +57 -0
- package/types/node_modules/openai/internal/qs/utils.d.mts +15 -0
- package/types/node_modules/openai/internal/qs/utils.d.ts +15 -0
- package/types/node_modules/openai/internal/request-options.d.mts +78 -0
- package/types/node_modules/openai/internal/request-options.d.ts +78 -0
- package/types/node_modules/openai/internal/shim-types.d.mts +17 -0
- package/types/node_modules/openai/internal/shim-types.d.ts +17 -0
- package/types/node_modules/openai/internal/shims.d.mts +20 -0
- package/types/node_modules/openai/internal/shims.d.ts +20 -0
- package/types/node_modules/openai/internal/stream-utils.d.mts +8 -0
- package/types/node_modules/openai/internal/stream-utils.d.ts +8 -0
- package/types/node_modules/openai/internal/to-file.d.mts +45 -0
- package/types/node_modules/openai/internal/to-file.d.ts +45 -0
- package/types/node_modules/openai/internal/types.d.mts +69 -0
- package/types/node_modules/openai/internal/types.d.ts +69 -0
- package/types/node_modules/openai/internal/uploads.d.mts +42 -0
- package/types/node_modules/openai/internal/uploads.d.ts +42 -0
- package/types/node_modules/openai/internal/utils/base64.d.mts +9 -0
- package/types/node_modules/openai/internal/utils/base64.d.ts +9 -0
- package/types/node_modules/openai/internal/utils/bytes.d.mts +4 -0
- package/types/node_modules/openai/internal/utils/bytes.d.ts +4 -0
- package/types/node_modules/openai/internal/utils/env.d.mts +9 -0
- package/types/node_modules/openai/internal/utils/env.d.ts +9 -0
- package/types/node_modules/openai/internal/utils/log.d.mts +37 -0
- package/types/node_modules/openai/internal/utils/log.d.ts +37 -0
- package/types/node_modules/openai/internal/utils/path.d.mts +15 -0
- package/types/node_modules/openai/internal/utils/path.d.ts +15 -0
- package/types/node_modules/openai/internal/utils/sleep.d.mts +2 -0
- package/types/node_modules/openai/internal/utils/sleep.d.ts +2 -0
- package/types/node_modules/openai/internal/utils/uuid.d.mts +5 -0
- package/types/node_modules/openai/internal/utils/uuid.d.ts +5 -0
- package/types/node_modules/openai/internal/utils/values.d.mts +18 -0
- package/types/node_modules/openai/internal/utils/values.d.ts +18 -0
- package/types/node_modules/openai/internal/utils.d.mts +7 -0
- package/types/node_modules/openai/internal/utils.d.ts +7 -0
- package/types/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts +59 -0
- package/types/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts +59 -0
- package/types/node_modules/openai/lib/AssistantStream.d.mts +60 -0
- package/types/node_modules/openai/lib/AssistantStream.d.ts +60 -0
- package/types/node_modules/openai/lib/ChatCompletionRunner.d.mts +16 -0
- package/types/node_modules/openai/lib/ChatCompletionRunner.d.ts +16 -0
- package/types/node_modules/openai/lib/ChatCompletionStream.d.mts +208 -0
- package/types/node_modules/openai/lib/ChatCompletionStream.d.ts +208 -0
- package/types/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts +19 -0
- package/types/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts +19 -0
- package/types/node_modules/openai/lib/EventEmitter.d.mts +45 -0
- package/types/node_modules/openai/lib/EventEmitter.d.ts +45 -0
- package/types/node_modules/openai/lib/EventStream.d.mts +62 -0
- package/types/node_modules/openai/lib/EventStream.d.ts +62 -0
- package/types/node_modules/openai/lib/ResponsesParser.d.mts +36 -0
- package/types/node_modules/openai/lib/ResponsesParser.d.ts +36 -0
- package/types/node_modules/openai/lib/RunnableFunction.d.mts +83 -0
- package/types/node_modules/openai/lib/RunnableFunction.d.ts +83 -0
- package/types/node_modules/openai/lib/Util.d.mts +5 -0
- package/types/node_modules/openai/lib/Util.d.ts +5 -0
- package/types/node_modules/openai/lib/chatCompletionUtils.d.mts +5 -0
- package/types/node_modules/openai/lib/chatCompletionUtils.d.ts +5 -0
- package/types/node_modules/openai/lib/jsonschema.d.mts +106 -0
- package/types/node_modules/openai/lib/jsonschema.d.ts +106 -0
- package/types/node_modules/openai/lib/parser.d.mts +47 -0
- package/types/node_modules/openai/lib/parser.d.ts +47 -0
- package/types/node_modules/openai/lib/responses/EventTypes.d.mts +9 -0
- package/types/node_modules/openai/lib/responses/EventTypes.d.ts +9 -0
- package/types/node_modules/openai/lib/responses/ResponseStream.d.mts +59 -0
- package/types/node_modules/openai/lib/responses/ResponseStream.d.ts +59 -0
- package/types/node_modules/openai/package.json +233 -0
- package/types/node_modules/openai/pagination.d.mts +2 -0
- package/types/node_modules/openai/pagination.d.ts +2 -0
- package/types/node_modules/openai/realtime/index.d.mts +2 -0
- package/types/node_modules/openai/realtime/index.d.ts +2 -0
- package/types/node_modules/openai/realtime/internal-base.d.mts +45 -0
- package/types/node_modules/openai/realtime/internal-base.d.ts +45 -0
- package/types/node_modules/openai/realtime/websocket.d.mts +36 -0
- package/types/node_modules/openai/realtime/websocket.d.ts +36 -0
- package/types/node_modules/openai/realtime/ws.d.mts +27 -0
- package/types/node_modules/openai/realtime/ws.d.ts +27 -0
- package/types/node_modules/openai/resource.d.mts +2 -0
- package/types/node_modules/openai/resource.d.ts +2 -0
- package/types/node_modules/openai/resources/audio/audio.d.mts +26 -0
- package/types/node_modules/openai/resources/audio/audio.d.ts +26 -0
- package/types/node_modules/openai/resources/audio/index.d.mts +5 -0
- package/types/node_modules/openai/resources/audio/index.d.ts +5 -0
- package/types/node_modules/openai/resources/audio/speech.d.mts +64 -0
- package/types/node_modules/openai/resources/audio/speech.d.ts +64 -0
- package/types/node_modules/openai/resources/audio/transcriptions.d.mts +485 -0
- package/types/node_modules/openai/resources/audio/transcriptions.d.ts +485 -0
- package/types/node_modules/openai/resources/audio/translations.d.mts +81 -0
- package/types/node_modules/openai/resources/audio/translations.d.ts +81 -0
- package/types/node_modules/openai/resources/audio.d.mts +2 -0
- package/types/node_modules/openai/resources/audio.d.ts +2 -0
- package/types/node_modules/openai/resources/batches.d.mts +279 -0
- package/types/node_modules/openai/resources/batches.d.ts +279 -0
- package/types/node_modules/openai/resources/beta/assistants.d.mts +1232 -0
- package/types/node_modules/openai/resources/beta/assistants.d.ts +1232 -0
- package/types/node_modules/openai/resources/beta/beta.d.mts +18 -0
- package/types/node_modules/openai/resources/beta/beta.d.ts +18 -0
- package/types/node_modules/openai/resources/beta/index.d.mts +5 -0
- package/types/node_modules/openai/resources/beta/index.d.ts +5 -0
- package/types/node_modules/openai/resources/beta/realtime/index.d.mts +4 -0
- package/types/node_modules/openai/resources/beta/realtime/index.d.ts +4 -0
- package/types/node_modules/openai/resources/beta/realtime/realtime.d.mts +2332 -0
- package/types/node_modules/openai/resources/beta/realtime/realtime.d.ts +2332 -0
- package/types/node_modules/openai/resources/beta/realtime/sessions.d.mts +744 -0
- package/types/node_modules/openai/resources/beta/realtime/sessions.d.ts +744 -0
- package/types/node_modules/openai/resources/beta/realtime/transcription-sessions.d.mts +299 -0
- package/types/node_modules/openai/resources/beta/realtime/transcription-sessions.d.ts +299 -0
- package/types/node_modules/openai/resources/beta/realtime.d.mts +2 -0
- package/types/node_modules/openai/resources/beta/realtime.d.ts +2 -0
- package/types/node_modules/openai/resources/beta/threads/index.d.mts +4 -0
- package/types/node_modules/openai/resources/beta/threads/index.d.ts +4 -0
- package/types/node_modules/openai/resources/beta/threads/messages.d.mts +594 -0
- package/types/node_modules/openai/resources/beta/threads/messages.d.ts +594 -0
- package/types/node_modules/openai/resources/beta/threads/runs/index.d.mts +3 -0
- package/types/node_modules/openai/resources/beta/threads/runs/index.d.ts +3 -0
- package/types/node_modules/openai/resources/beta/threads/runs/runs.d.mts +733 -0
- package/types/node_modules/openai/resources/beta/threads/runs/runs.d.ts +733 -0
- package/types/node_modules/openai/resources/beta/threads/runs/steps.d.mts +615 -0
- package/types/node_modules/openai/resources/beta/threads/runs/steps.d.ts +615 -0
- package/types/node_modules/openai/resources/beta/threads/runs.d.mts +2 -0
- package/types/node_modules/openai/resources/beta/threads/runs.d.ts +2 -0
- package/types/node_modules/openai/resources/beta/threads/threads.d.mts +1044 -0
- package/types/node_modules/openai/resources/beta/threads/threads.d.ts +1044 -0
- package/types/node_modules/openai/resources/beta/threads.d.mts +2 -0
- package/types/node_modules/openai/resources/beta/threads.d.ts +2 -0
- package/types/node_modules/openai/resources/beta.d.mts +2 -0
- package/types/node_modules/openai/resources/beta.d.ts +2 -0
- package/types/node_modules/openai/resources/chat/chat.d.mts +13 -0
- package/types/node_modules/openai/resources/chat/chat.d.ts +13 -0
- package/types/node_modules/openai/resources/chat/completions/completions.d.mts +1627 -0
- package/types/node_modules/openai/resources/chat/completions/completions.d.ts +1627 -0
- package/types/node_modules/openai/resources/chat/completions/index.d.mts +4 -0
- package/types/node_modules/openai/resources/chat/completions/index.d.ts +4 -0
- package/types/node_modules/openai/resources/chat/completions/messages.d.mts +34 -0
- package/types/node_modules/openai/resources/chat/completions/messages.d.ts +34 -0
- package/types/node_modules/openai/resources/chat/completions.d.mts +2 -0
- package/types/node_modules/openai/resources/chat/completions.d.ts +2 -0
- package/types/node_modules/openai/resources/chat/index.d.mts +3 -0
- package/types/node_modules/openai/resources/chat/index.d.ts +3 -0
- package/types/node_modules/openai/resources/chat.d.mts +2 -0
- package/types/node_modules/openai/resources/chat.d.ts +2 -0
- package/types/node_modules/openai/resources/completions.d.mts +329 -0
- package/types/node_modules/openai/resources/completions.d.ts +329 -0
- package/types/node_modules/openai/resources/containers/containers.d.mts +200 -0
- package/types/node_modules/openai/resources/containers/containers.d.ts +200 -0
- package/types/node_modules/openai/resources/containers/files/content.d.mts +16 -0
- package/types/node_modules/openai/resources/containers/files/content.d.ts +16 -0
- package/types/node_modules/openai/resources/containers/files/files.d.mts +148 -0
- package/types/node_modules/openai/resources/containers/files/files.d.ts +148 -0
- package/types/node_modules/openai/resources/containers/files/index.d.mts +3 -0
- package/types/node_modules/openai/resources/containers/files/index.d.ts +3 -0
- package/types/node_modules/openai/resources/containers/files.d.mts +2 -0
- package/types/node_modules/openai/resources/containers/files.d.ts +2 -0
- package/types/node_modules/openai/resources/containers/index.d.mts +3 -0
- package/types/node_modules/openai/resources/containers/index.d.ts +3 -0
- package/types/node_modules/openai/resources/containers.d.mts +2 -0
- package/types/node_modules/openai/resources/containers.d.ts +2 -0
- package/types/node_modules/openai/resources/conversations/conversations.d.mts +176 -0
- package/types/node_modules/openai/resources/conversations/conversations.d.ts +176 -0
- package/types/node_modules/openai/resources/conversations/index.d.mts +3 -0
- package/types/node_modules/openai/resources/conversations/index.d.ts +3 -0
- package/types/node_modules/openai/resources/conversations/items.d.mts +367 -0
- package/types/node_modules/openai/resources/conversations/items.d.ts +367 -0
- package/types/node_modules/openai/resources/conversations.d.mts +2 -0
- package/types/node_modules/openai/resources/conversations.d.ts +2 -0
- package/types/node_modules/openai/resources/embeddings.d.mts +113 -0
- package/types/node_modules/openai/resources/embeddings.d.ts +113 -0
- package/types/node_modules/openai/resources/evals/evals.d.mts +735 -0
- package/types/node_modules/openai/resources/evals/evals.d.ts +735 -0
- package/types/node_modules/openai/resources/evals/index.d.mts +3 -0
- package/types/node_modules/openai/resources/evals/index.d.ts +3 -0
- package/types/node_modules/openai/resources/evals/runs/index.d.mts +3 -0
- package/types/node_modules/openai/resources/evals/runs/index.d.ts +3 -0
- package/types/node_modules/openai/resources/evals/runs/output-items.d.mts +382 -0
- package/types/node_modules/openai/resources/evals/runs/output-items.d.ts +382 -0
- package/types/node_modules/openai/resources/evals/runs/runs.d.mts +2290 -0
- package/types/node_modules/openai/resources/evals/runs/runs.d.ts +2290 -0
- package/types/node_modules/openai/resources/evals/runs.d.mts +2 -0
- package/types/node_modules/openai/resources/evals/runs.d.ts +2 -0
- package/types/node_modules/openai/resources/evals.d.mts +2 -0
- package/types/node_modules/openai/resources/evals.d.ts +2 -0
- package/types/node_modules/openai/resources/files.d.mts +164 -0
- package/types/node_modules/openai/resources/files.d.ts +164 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha/alpha.d.mts +10 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha/alpha.d.ts +10 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha/graders.d.mts +119 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha/graders.d.ts +119 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha/index.d.mts +3 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha/index.d.ts +3 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha.d.mts +2 -0
- package/types/node_modules/openai/resources/fine-tuning/alpha.d.ts +2 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.mts +10 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.d.ts +10 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints/index.d.mts +3 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints/index.d.ts +3 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.mts +160 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints/permissions.d.ts +160 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints.d.mts +2 -0
- package/types/node_modules/openai/resources/fine-tuning/checkpoints.d.ts +2 -0
- package/types/node_modules/openai/resources/fine-tuning/fine-tuning.d.mts +22 -0
- package/types/node_modules/openai/resources/fine-tuning/fine-tuning.d.ts +22 -0
- package/types/node_modules/openai/resources/fine-tuning/index.d.mts +6 -0
- package/types/node_modules/openai/resources/fine-tuning/index.d.ts +6 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.mts +74 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs/checkpoints.d.ts +74 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs/index.d.mts +3 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs/index.d.ts +3 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs/jobs.d.mts +528 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs/jobs.d.ts +528 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs.d.mts +2 -0
- package/types/node_modules/openai/resources/fine-tuning/jobs.d.ts +2 -0
- package/types/node_modules/openai/resources/fine-tuning/methods.d.mts +120 -0
- package/types/node_modules/openai/resources/fine-tuning/methods.d.ts +120 -0
- package/types/node_modules/openai/resources/fine-tuning.d.mts +2 -0
- package/types/node_modules/openai/resources/fine-tuning.d.ts +2 -0
- package/types/node_modules/openai/resources/graders/grader-models.d.mts +304 -0
- package/types/node_modules/openai/resources/graders/grader-models.d.ts +304 -0
- package/types/node_modules/openai/resources/graders/graders.d.mts +10 -0
- package/types/node_modules/openai/resources/graders/graders.d.ts +10 -0
- package/types/node_modules/openai/resources/graders/index.d.mts +3 -0
- package/types/node_modules/openai/resources/graders/index.d.ts +3 -0
- package/types/node_modules/openai/resources/graders.d.mts +2 -0
- package/types/node_modules/openai/resources/graders.d.ts +2 -0
- package/types/node_modules/openai/resources/images.d.mts +653 -0
- package/types/node_modules/openai/resources/images.d.ts +653 -0
- package/types/node_modules/openai/resources/index.d.mts +22 -0
- package/types/node_modules/openai/resources/index.d.ts +22 -0
- package/types/node_modules/openai/resources/models.d.mts +52 -0
- package/types/node_modules/openai/resources/models.d.ts +52 -0
- package/types/node_modules/openai/resources/moderations.d.mts +295 -0
- package/types/node_modules/openai/resources/moderations.d.ts +295 -0
- package/types/node_modules/openai/resources/realtime/client-secrets.d.mts +594 -0
- package/types/node_modules/openai/resources/realtime/client-secrets.d.ts +594 -0
- package/types/node_modules/openai/resources/realtime/index.d.mts +3 -0
- package/types/node_modules/openai/resources/realtime/index.d.ts +3 -0
- package/types/node_modules/openai/resources/realtime/realtime.d.mts +3828 -0
- package/types/node_modules/openai/resources/realtime/realtime.d.ts +3828 -0
- package/types/node_modules/openai/resources/realtime.d.mts +2 -0
- package/types/node_modules/openai/resources/realtime.d.ts +2 -0
- package/types/node_modules/openai/resources/responses/index.d.mts +3 -0
- package/types/node_modules/openai/resources/responses/index.d.ts +3 -0
- package/types/node_modules/openai/resources/responses/input-items.d.mts +65 -0
- package/types/node_modules/openai/resources/responses/input-items.d.ts +65 -0
- package/types/node_modules/openai/resources/responses/responses.d.mts +4705 -0
- package/types/node_modules/openai/resources/responses/responses.d.ts +4705 -0
- package/types/node_modules/openai/resources/responses.d.mts +2 -0
- package/types/node_modules/openai/resources/responses.d.ts +2 -0
- package/types/node_modules/openai/resources/shared.d.mts +265 -0
- package/types/node_modules/openai/resources/shared.d.ts +265 -0
- package/types/node_modules/openai/resources/uploads/index.d.mts +3 -0
- package/types/node_modules/openai/resources/uploads/index.d.ts +3 -0
- package/types/node_modules/openai/resources/uploads/parts.d.mts +51 -0
- package/types/node_modules/openai/resources/uploads/parts.d.ts +51 -0
- package/types/node_modules/openai/resources/uploads/uploads.d.mts +157 -0
- package/types/node_modules/openai/resources/uploads/uploads.d.ts +157 -0
- package/types/node_modules/openai/resources/uploads.d.mts +2 -0
- package/types/node_modules/openai/resources/uploads.d.ts +2 -0
- package/types/node_modules/openai/resources/vector-stores/file-batches.d.mts +172 -0
- package/types/node_modules/openai/resources/vector-stores/file-batches.d.ts +172 -0
- package/types/node_modules/openai/resources/vector-stores/files.d.mts +231 -0
- package/types/node_modules/openai/resources/vector-stores/files.d.ts +231 -0
- package/types/node_modules/openai/resources/vector-stores/index.d.mts +4 -0
- package/types/node_modules/openai/resources/vector-stores/index.d.ts +4 -0
- package/types/node_modules/openai/resources/vector-stores/vector-stores.d.mts +373 -0
- package/types/node_modules/openai/resources/vector-stores/vector-stores.d.ts +373 -0
- package/types/node_modules/openai/resources/vector-stores.d.mts +2 -0
- package/types/node_modules/openai/resources/vector-stores.d.ts +2 -0
- package/types/node_modules/openai/resources/webhooks.d.mts +587 -0
- package/types/node_modules/openai/resources/webhooks.d.ts +587 -0
- package/types/node_modules/openai/resources.d.mts +2 -0
- package/types/node_modules/openai/resources.d.ts +2 -0
- package/types/node_modules/openai/src/_vendor/zod-to-json-schema/LICENSE +15 -0
- package/types/node_modules/openai/streaming.d.mts +2 -0
- package/types/node_modules/openai/streaming.d.ts +2 -0
- package/types/node_modules/openai/uploads.d.mts +2 -0
- package/types/node_modules/openai/uploads.d.ts +2 -0
- package/types/node_modules/openai/version.d.mts +2 -0
- package/types/node_modules/openai/version.d.ts +2 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as BatchesAPI from "./batches.mjs";
|
|
3
|
+
import * as Shared from "./shared.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
export declare class Batches extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates and executes a batch from an uploaded file of requests
|
|
10
|
+
*/
|
|
11
|
+
create(body: BatchCreateParams, options?: RequestOptions): APIPromise<Batch>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a batch.
|
|
14
|
+
*/
|
|
15
|
+
retrieve(batchID: string, options?: RequestOptions): APIPromise<Batch>;
|
|
16
|
+
/**
|
|
17
|
+
* List your organization's batches.
|
|
18
|
+
*/
|
|
19
|
+
list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise<BatchesPage, Batch>;
|
|
20
|
+
/**
|
|
21
|
+
* Cancels an in-progress batch. The batch will be in status `cancelling` for up to
|
|
22
|
+
* 10 minutes, before changing to `cancelled`, where it will have partial results
|
|
23
|
+
* (if any) available in the output file.
|
|
24
|
+
*/
|
|
25
|
+
cancel(batchID: string, options?: RequestOptions): APIPromise<Batch>;
|
|
26
|
+
}
|
|
27
|
+
export type BatchesPage = CursorPage<Batch>;
|
|
28
|
+
export interface Batch {
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* The time frame within which the batch should be processed.
|
|
32
|
+
*/
|
|
33
|
+
completion_window: string;
|
|
34
|
+
/**
|
|
35
|
+
* The Unix timestamp (in seconds) for when the batch was created.
|
|
36
|
+
*/
|
|
37
|
+
created_at: number;
|
|
38
|
+
/**
|
|
39
|
+
* The OpenAI API endpoint used by the batch.
|
|
40
|
+
*/
|
|
41
|
+
endpoint: string;
|
|
42
|
+
/**
|
|
43
|
+
* The ID of the input file for the batch.
|
|
44
|
+
*/
|
|
45
|
+
input_file_id: string;
|
|
46
|
+
/**
|
|
47
|
+
* The object type, which is always `batch`.
|
|
48
|
+
*/
|
|
49
|
+
object: 'batch';
|
|
50
|
+
/**
|
|
51
|
+
* The current status of the batch.
|
|
52
|
+
*/
|
|
53
|
+
status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';
|
|
54
|
+
/**
|
|
55
|
+
* The Unix timestamp (in seconds) for when the batch was cancelled.
|
|
56
|
+
*/
|
|
57
|
+
cancelled_at?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The Unix timestamp (in seconds) for when the batch started cancelling.
|
|
60
|
+
*/
|
|
61
|
+
cancelling_at?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The Unix timestamp (in seconds) for when the batch was completed.
|
|
64
|
+
*/
|
|
65
|
+
completed_at?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the file containing the outputs of requests with errors.
|
|
68
|
+
*/
|
|
69
|
+
error_file_id?: string;
|
|
70
|
+
errors?: Batch.Errors;
|
|
71
|
+
/**
|
|
72
|
+
* The Unix timestamp (in seconds) for when the batch expired.
|
|
73
|
+
*/
|
|
74
|
+
expired_at?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The Unix timestamp (in seconds) for when the batch will expire.
|
|
77
|
+
*/
|
|
78
|
+
expires_at?: number;
|
|
79
|
+
/**
|
|
80
|
+
* The Unix timestamp (in seconds) for when the batch failed.
|
|
81
|
+
*/
|
|
82
|
+
failed_at?: number;
|
|
83
|
+
/**
|
|
84
|
+
* The Unix timestamp (in seconds) for when the batch started finalizing.
|
|
85
|
+
*/
|
|
86
|
+
finalizing_at?: number;
|
|
87
|
+
/**
|
|
88
|
+
* The Unix timestamp (in seconds) for when the batch started processing.
|
|
89
|
+
*/
|
|
90
|
+
in_progress_at?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
93
|
+
* for storing additional information about the object in a structured format, and
|
|
94
|
+
* querying for objects via API or the dashboard.
|
|
95
|
+
*
|
|
96
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
97
|
+
* a maximum length of 512 characters.
|
|
98
|
+
*/
|
|
99
|
+
metadata?: Shared.Metadata | null;
|
|
100
|
+
/**
|
|
101
|
+
* Model ID used to process the batch, like `gpt-5-2025-08-07`. OpenAI offers a
|
|
102
|
+
* wide range of models with different capabilities, performance characteristics,
|
|
103
|
+
* and price points. Refer to the
|
|
104
|
+
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
105
|
+
* available models.
|
|
106
|
+
*/
|
|
107
|
+
model?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The ID of the file containing the outputs of successfully executed requests.
|
|
110
|
+
*/
|
|
111
|
+
output_file_id?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The request counts for different statuses within the batch.
|
|
114
|
+
*/
|
|
115
|
+
request_counts?: BatchRequestCounts;
|
|
116
|
+
/**
|
|
117
|
+
* Represents token usage details including input tokens, output tokens, a
|
|
118
|
+
* breakdown of output tokens, and the total tokens used. Only populated on batches
|
|
119
|
+
* created after September 7, 2025.
|
|
120
|
+
*/
|
|
121
|
+
usage?: BatchUsage;
|
|
122
|
+
}
|
|
123
|
+
export declare namespace Batch {
|
|
124
|
+
interface Errors {
|
|
125
|
+
data?: Array<BatchesAPI.BatchError>;
|
|
126
|
+
/**
|
|
127
|
+
* The object type, which is always `list`.
|
|
128
|
+
*/
|
|
129
|
+
object?: string;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export interface BatchError {
|
|
133
|
+
/**
|
|
134
|
+
* An error code identifying the error type.
|
|
135
|
+
*/
|
|
136
|
+
code?: string;
|
|
137
|
+
/**
|
|
138
|
+
* The line number of the input file where the error occurred, if applicable.
|
|
139
|
+
*/
|
|
140
|
+
line?: number | null;
|
|
141
|
+
/**
|
|
142
|
+
* A human-readable message providing more details about the error.
|
|
143
|
+
*/
|
|
144
|
+
message?: string;
|
|
145
|
+
/**
|
|
146
|
+
* The name of the parameter that caused the error, if applicable.
|
|
147
|
+
*/
|
|
148
|
+
param?: string | null;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The request counts for different statuses within the batch.
|
|
152
|
+
*/
|
|
153
|
+
export interface BatchRequestCounts {
|
|
154
|
+
/**
|
|
155
|
+
* Number of requests that have been completed successfully.
|
|
156
|
+
*/
|
|
157
|
+
completed: number;
|
|
158
|
+
/**
|
|
159
|
+
* Number of requests that have failed.
|
|
160
|
+
*/
|
|
161
|
+
failed: number;
|
|
162
|
+
/**
|
|
163
|
+
* Total number of requests in the batch.
|
|
164
|
+
*/
|
|
165
|
+
total: number;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Represents token usage details including input tokens, output tokens, a
|
|
169
|
+
* breakdown of output tokens, and the total tokens used. Only populated on batches
|
|
170
|
+
* created after September 7, 2025.
|
|
171
|
+
*/
|
|
172
|
+
export interface BatchUsage {
|
|
173
|
+
/**
|
|
174
|
+
* The number of input tokens.
|
|
175
|
+
*/
|
|
176
|
+
input_tokens: number;
|
|
177
|
+
/**
|
|
178
|
+
* A detailed breakdown of the input tokens.
|
|
179
|
+
*/
|
|
180
|
+
input_tokens_details: BatchUsage.InputTokensDetails;
|
|
181
|
+
/**
|
|
182
|
+
* The number of output tokens.
|
|
183
|
+
*/
|
|
184
|
+
output_tokens: number;
|
|
185
|
+
/**
|
|
186
|
+
* A detailed breakdown of the output tokens.
|
|
187
|
+
*/
|
|
188
|
+
output_tokens_details: BatchUsage.OutputTokensDetails;
|
|
189
|
+
/**
|
|
190
|
+
* The total number of tokens used.
|
|
191
|
+
*/
|
|
192
|
+
total_tokens: number;
|
|
193
|
+
}
|
|
194
|
+
export declare namespace BatchUsage {
|
|
195
|
+
/**
|
|
196
|
+
* A detailed breakdown of the input tokens.
|
|
197
|
+
*/
|
|
198
|
+
interface InputTokensDetails {
|
|
199
|
+
/**
|
|
200
|
+
* The number of tokens that were retrieved from the cache.
|
|
201
|
+
* [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
|
|
202
|
+
*/
|
|
203
|
+
cached_tokens: number;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* A detailed breakdown of the output tokens.
|
|
207
|
+
*/
|
|
208
|
+
interface OutputTokensDetails {
|
|
209
|
+
/**
|
|
210
|
+
* The number of reasoning tokens.
|
|
211
|
+
*/
|
|
212
|
+
reasoning_tokens: number;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export interface BatchCreateParams {
|
|
216
|
+
/**
|
|
217
|
+
* The time frame within which the batch should be processed. Currently only `24h`
|
|
218
|
+
* is supported.
|
|
219
|
+
*/
|
|
220
|
+
completion_window: '24h';
|
|
221
|
+
/**
|
|
222
|
+
* The endpoint to be used for all requests in the batch. Currently
|
|
223
|
+
* `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions`
|
|
224
|
+
* are supported. Note that `/v1/embeddings` batches are also restricted to a
|
|
225
|
+
* maximum of 50,000 embedding inputs across all requests in the batch.
|
|
226
|
+
*/
|
|
227
|
+
endpoint: '/v1/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';
|
|
228
|
+
/**
|
|
229
|
+
* The ID of an uploaded file that contains requests for the new batch.
|
|
230
|
+
*
|
|
231
|
+
* See [upload file](https://platform.openai.com/docs/api-reference/files/create)
|
|
232
|
+
* for how to upload a file.
|
|
233
|
+
*
|
|
234
|
+
* Your input file must be formatted as a
|
|
235
|
+
* [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input),
|
|
236
|
+
* and must be uploaded with the purpose `batch`. The file can contain up to 50,000
|
|
237
|
+
* requests, and can be up to 200 MB in size.
|
|
238
|
+
*/
|
|
239
|
+
input_file_id: string;
|
|
240
|
+
/**
|
|
241
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
242
|
+
* for storing additional information about the object in a structured format, and
|
|
243
|
+
* querying for objects via API or the dashboard.
|
|
244
|
+
*
|
|
245
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
246
|
+
* a maximum length of 512 characters.
|
|
247
|
+
*/
|
|
248
|
+
metadata?: Shared.Metadata | null;
|
|
249
|
+
/**
|
|
250
|
+
* The expiration policy for the output and/or error file that are generated for a
|
|
251
|
+
* batch.
|
|
252
|
+
*/
|
|
253
|
+
output_expires_after?: BatchCreateParams.OutputExpiresAfter;
|
|
254
|
+
}
|
|
255
|
+
export declare namespace BatchCreateParams {
|
|
256
|
+
/**
|
|
257
|
+
* The expiration policy for the output and/or error file that are generated for a
|
|
258
|
+
* batch.
|
|
259
|
+
*/
|
|
260
|
+
interface OutputExpiresAfter {
|
|
261
|
+
/**
|
|
262
|
+
* Anchor timestamp after which the expiration policy applies. Supported anchors:
|
|
263
|
+
* `created_at`. Note that the anchor is the file creation time, not the time the
|
|
264
|
+
* batch is created.
|
|
265
|
+
*/
|
|
266
|
+
anchor: 'created_at';
|
|
267
|
+
/**
|
|
268
|
+
* The number of seconds after the anchor time that the file will expire. Must be
|
|
269
|
+
* between 3600 (1 hour) and 2592000 (30 days).
|
|
270
|
+
*/
|
|
271
|
+
seconds: number;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
export interface BatchListParams extends CursorPageParams {
|
|
275
|
+
}
|
|
276
|
+
export declare namespace Batches {
|
|
277
|
+
export { type Batch as Batch, type BatchError as BatchError, type BatchRequestCounts as BatchRequestCounts, type BatchUsage as BatchUsage, type BatchesPage as BatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=batches.d.mts.map
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as BatchesAPI from "./batches.js";
|
|
3
|
+
import * as Shared from "./shared.js";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
7
|
+
export declare class Batches extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates and executes a batch from an uploaded file of requests
|
|
10
|
+
*/
|
|
11
|
+
create(body: BatchCreateParams, options?: RequestOptions): APIPromise<Batch>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a batch.
|
|
14
|
+
*/
|
|
15
|
+
retrieve(batchID: string, options?: RequestOptions): APIPromise<Batch>;
|
|
16
|
+
/**
|
|
17
|
+
* List your organization's batches.
|
|
18
|
+
*/
|
|
19
|
+
list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise<BatchesPage, Batch>;
|
|
20
|
+
/**
|
|
21
|
+
* Cancels an in-progress batch. The batch will be in status `cancelling` for up to
|
|
22
|
+
* 10 minutes, before changing to `cancelled`, where it will have partial results
|
|
23
|
+
* (if any) available in the output file.
|
|
24
|
+
*/
|
|
25
|
+
cancel(batchID: string, options?: RequestOptions): APIPromise<Batch>;
|
|
26
|
+
}
|
|
27
|
+
export type BatchesPage = CursorPage<Batch>;
|
|
28
|
+
export interface Batch {
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* The time frame within which the batch should be processed.
|
|
32
|
+
*/
|
|
33
|
+
completion_window: string;
|
|
34
|
+
/**
|
|
35
|
+
* The Unix timestamp (in seconds) for when the batch was created.
|
|
36
|
+
*/
|
|
37
|
+
created_at: number;
|
|
38
|
+
/**
|
|
39
|
+
* The OpenAI API endpoint used by the batch.
|
|
40
|
+
*/
|
|
41
|
+
endpoint: string;
|
|
42
|
+
/**
|
|
43
|
+
* The ID of the input file for the batch.
|
|
44
|
+
*/
|
|
45
|
+
input_file_id: string;
|
|
46
|
+
/**
|
|
47
|
+
* The object type, which is always `batch`.
|
|
48
|
+
*/
|
|
49
|
+
object: 'batch';
|
|
50
|
+
/**
|
|
51
|
+
* The current status of the batch.
|
|
52
|
+
*/
|
|
53
|
+
status: 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled';
|
|
54
|
+
/**
|
|
55
|
+
* The Unix timestamp (in seconds) for when the batch was cancelled.
|
|
56
|
+
*/
|
|
57
|
+
cancelled_at?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The Unix timestamp (in seconds) for when the batch started cancelling.
|
|
60
|
+
*/
|
|
61
|
+
cancelling_at?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The Unix timestamp (in seconds) for when the batch was completed.
|
|
64
|
+
*/
|
|
65
|
+
completed_at?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the file containing the outputs of requests with errors.
|
|
68
|
+
*/
|
|
69
|
+
error_file_id?: string;
|
|
70
|
+
errors?: Batch.Errors;
|
|
71
|
+
/**
|
|
72
|
+
* The Unix timestamp (in seconds) for when the batch expired.
|
|
73
|
+
*/
|
|
74
|
+
expired_at?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The Unix timestamp (in seconds) for when the batch will expire.
|
|
77
|
+
*/
|
|
78
|
+
expires_at?: number;
|
|
79
|
+
/**
|
|
80
|
+
* The Unix timestamp (in seconds) for when the batch failed.
|
|
81
|
+
*/
|
|
82
|
+
failed_at?: number;
|
|
83
|
+
/**
|
|
84
|
+
* The Unix timestamp (in seconds) for when the batch started finalizing.
|
|
85
|
+
*/
|
|
86
|
+
finalizing_at?: number;
|
|
87
|
+
/**
|
|
88
|
+
* The Unix timestamp (in seconds) for when the batch started processing.
|
|
89
|
+
*/
|
|
90
|
+
in_progress_at?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
93
|
+
* for storing additional information about the object in a structured format, and
|
|
94
|
+
* querying for objects via API or the dashboard.
|
|
95
|
+
*
|
|
96
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
97
|
+
* a maximum length of 512 characters.
|
|
98
|
+
*/
|
|
99
|
+
metadata?: Shared.Metadata | null;
|
|
100
|
+
/**
|
|
101
|
+
* Model ID used to process the batch, like `gpt-5-2025-08-07`. OpenAI offers a
|
|
102
|
+
* wide range of models with different capabilities, performance characteristics,
|
|
103
|
+
* and price points. Refer to the
|
|
104
|
+
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
105
|
+
* available models.
|
|
106
|
+
*/
|
|
107
|
+
model?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The ID of the file containing the outputs of successfully executed requests.
|
|
110
|
+
*/
|
|
111
|
+
output_file_id?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The request counts for different statuses within the batch.
|
|
114
|
+
*/
|
|
115
|
+
request_counts?: BatchRequestCounts;
|
|
116
|
+
/**
|
|
117
|
+
* Represents token usage details including input tokens, output tokens, a
|
|
118
|
+
* breakdown of output tokens, and the total tokens used. Only populated on batches
|
|
119
|
+
* created after September 7, 2025.
|
|
120
|
+
*/
|
|
121
|
+
usage?: BatchUsage;
|
|
122
|
+
}
|
|
123
|
+
export declare namespace Batch {
|
|
124
|
+
interface Errors {
|
|
125
|
+
data?: Array<BatchesAPI.BatchError>;
|
|
126
|
+
/**
|
|
127
|
+
* The object type, which is always `list`.
|
|
128
|
+
*/
|
|
129
|
+
object?: string;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export interface BatchError {
|
|
133
|
+
/**
|
|
134
|
+
* An error code identifying the error type.
|
|
135
|
+
*/
|
|
136
|
+
code?: string;
|
|
137
|
+
/**
|
|
138
|
+
* The line number of the input file where the error occurred, if applicable.
|
|
139
|
+
*/
|
|
140
|
+
line?: number | null;
|
|
141
|
+
/**
|
|
142
|
+
* A human-readable message providing more details about the error.
|
|
143
|
+
*/
|
|
144
|
+
message?: string;
|
|
145
|
+
/**
|
|
146
|
+
* The name of the parameter that caused the error, if applicable.
|
|
147
|
+
*/
|
|
148
|
+
param?: string | null;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The request counts for different statuses within the batch.
|
|
152
|
+
*/
|
|
153
|
+
export interface BatchRequestCounts {
|
|
154
|
+
/**
|
|
155
|
+
* Number of requests that have been completed successfully.
|
|
156
|
+
*/
|
|
157
|
+
completed: number;
|
|
158
|
+
/**
|
|
159
|
+
* Number of requests that have failed.
|
|
160
|
+
*/
|
|
161
|
+
failed: number;
|
|
162
|
+
/**
|
|
163
|
+
* Total number of requests in the batch.
|
|
164
|
+
*/
|
|
165
|
+
total: number;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Represents token usage details including input tokens, output tokens, a
|
|
169
|
+
* breakdown of output tokens, and the total tokens used. Only populated on batches
|
|
170
|
+
* created after September 7, 2025.
|
|
171
|
+
*/
|
|
172
|
+
export interface BatchUsage {
|
|
173
|
+
/**
|
|
174
|
+
* The number of input tokens.
|
|
175
|
+
*/
|
|
176
|
+
input_tokens: number;
|
|
177
|
+
/**
|
|
178
|
+
* A detailed breakdown of the input tokens.
|
|
179
|
+
*/
|
|
180
|
+
input_tokens_details: BatchUsage.InputTokensDetails;
|
|
181
|
+
/**
|
|
182
|
+
* The number of output tokens.
|
|
183
|
+
*/
|
|
184
|
+
output_tokens: number;
|
|
185
|
+
/**
|
|
186
|
+
* A detailed breakdown of the output tokens.
|
|
187
|
+
*/
|
|
188
|
+
output_tokens_details: BatchUsage.OutputTokensDetails;
|
|
189
|
+
/**
|
|
190
|
+
* The total number of tokens used.
|
|
191
|
+
*/
|
|
192
|
+
total_tokens: number;
|
|
193
|
+
}
|
|
194
|
+
export declare namespace BatchUsage {
|
|
195
|
+
/**
|
|
196
|
+
* A detailed breakdown of the input tokens.
|
|
197
|
+
*/
|
|
198
|
+
interface InputTokensDetails {
|
|
199
|
+
/**
|
|
200
|
+
* The number of tokens that were retrieved from the cache.
|
|
201
|
+
* [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
|
|
202
|
+
*/
|
|
203
|
+
cached_tokens: number;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* A detailed breakdown of the output tokens.
|
|
207
|
+
*/
|
|
208
|
+
interface OutputTokensDetails {
|
|
209
|
+
/**
|
|
210
|
+
* The number of reasoning tokens.
|
|
211
|
+
*/
|
|
212
|
+
reasoning_tokens: number;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export interface BatchCreateParams {
|
|
216
|
+
/**
|
|
217
|
+
* The time frame within which the batch should be processed. Currently only `24h`
|
|
218
|
+
* is supported.
|
|
219
|
+
*/
|
|
220
|
+
completion_window: '24h';
|
|
221
|
+
/**
|
|
222
|
+
* The endpoint to be used for all requests in the batch. Currently
|
|
223
|
+
* `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions`
|
|
224
|
+
* are supported. Note that `/v1/embeddings` batches are also restricted to a
|
|
225
|
+
* maximum of 50,000 embedding inputs across all requests in the batch.
|
|
226
|
+
*/
|
|
227
|
+
endpoint: '/v1/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';
|
|
228
|
+
/**
|
|
229
|
+
* The ID of an uploaded file that contains requests for the new batch.
|
|
230
|
+
*
|
|
231
|
+
* See [upload file](https://platform.openai.com/docs/api-reference/files/create)
|
|
232
|
+
* for how to upload a file.
|
|
233
|
+
*
|
|
234
|
+
* Your input file must be formatted as a
|
|
235
|
+
* [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input),
|
|
236
|
+
* and must be uploaded with the purpose `batch`. The file can contain up to 50,000
|
|
237
|
+
* requests, and can be up to 200 MB in size.
|
|
238
|
+
*/
|
|
239
|
+
input_file_id: string;
|
|
240
|
+
/**
|
|
241
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
242
|
+
* for storing additional information about the object in a structured format, and
|
|
243
|
+
* querying for objects via API or the dashboard.
|
|
244
|
+
*
|
|
245
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
246
|
+
* a maximum length of 512 characters.
|
|
247
|
+
*/
|
|
248
|
+
metadata?: Shared.Metadata | null;
|
|
249
|
+
/**
|
|
250
|
+
* The expiration policy for the output and/or error file that are generated for a
|
|
251
|
+
* batch.
|
|
252
|
+
*/
|
|
253
|
+
output_expires_after?: BatchCreateParams.OutputExpiresAfter;
|
|
254
|
+
}
|
|
255
|
+
export declare namespace BatchCreateParams {
|
|
256
|
+
/**
|
|
257
|
+
* The expiration policy for the output and/or error file that are generated for a
|
|
258
|
+
* batch.
|
|
259
|
+
*/
|
|
260
|
+
interface OutputExpiresAfter {
|
|
261
|
+
/**
|
|
262
|
+
* Anchor timestamp after which the expiration policy applies. Supported anchors:
|
|
263
|
+
* `created_at`. Note that the anchor is the file creation time, not the time the
|
|
264
|
+
* batch is created.
|
|
265
|
+
*/
|
|
266
|
+
anchor: 'created_at';
|
|
267
|
+
/**
|
|
268
|
+
* The number of seconds after the anchor time that the file will expire. Must be
|
|
269
|
+
* between 3600 (1 hour) and 2592000 (30 days).
|
|
270
|
+
*/
|
|
271
|
+
seconds: number;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
export interface BatchListParams extends CursorPageParams {
|
|
275
|
+
}
|
|
276
|
+
export declare namespace Batches {
|
|
277
|
+
export { type Batch as Batch, type BatchError as BatchError, type BatchRequestCounts as BatchRequestCounts, type BatchUsage as BatchUsage, type BatchesPage as BatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=batches.d.ts.map
|