openai 7.10.0 → 7.13.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 +203 -0
- package/README.md +7 -5
- package/_vendor/partial-json-parser/parser.d.mts.map +1 -1
- package/_vendor/partial-json-parser/parser.d.ts.map +1 -1
- package/_vendor/partial-json-parser/parser.js +4 -3
- package/_vendor/partial-json-parser/parser.js.map +1 -1
- package/_vendor/partial-json-parser/parser.mjs +4 -3
- package/_vendor/partial-json-parser/parser.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.js +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.js.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.mjs +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.d.mts.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.js +19 -12
- package/_vendor/zod-to-json-schema/parsers/tuple.js.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs +19 -12
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.mts.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js +6 -2
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +6 -2
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs.map +1 -1
- package/auth/subject-token-providers.d.mts.map +1 -1
- package/auth/subject-token-providers.d.ts.map +1 -1
- package/auth/subject-token-providers.js +10 -5
- package/auth/subject-token-providers.js.map +1 -1
- package/auth/subject-token-providers.mjs +10 -5
- package/auth/subject-token-providers.mjs.map +1 -1
- package/auth/workload-identity-auth.d.mts.map +1 -1
- package/auth/workload-identity-auth.d.ts.map +1 -1
- package/auth/workload-identity-auth.js +21 -11
- package/auth/workload-identity-auth.js.map +1 -1
- package/auth/workload-identity-auth.mjs +21 -11
- package/auth/workload-identity-auth.mjs.map +1 -1
- package/azure.d.mts.map +1 -1
- package/azure.d.ts.map +1 -1
- package/azure.js +31 -2
- package/azure.js.map +1 -1
- package/azure.mjs +32 -3
- package/azure.mjs.map +1 -1
- package/beta/realtime/internal-base.d.mts.map +1 -1
- package/beta/realtime/internal-base.d.ts.map +1 -1
- package/beta/realtime/internal-base.js +3 -2
- package/beta/realtime/internal-base.js.map +1 -1
- package/beta/realtime/internal-base.mjs +3 -2
- package/beta/realtime/internal-base.mjs.map +1 -1
- package/beta/realtime/websocket.d.mts +2 -0
- package/beta/realtime/websocket.d.mts.map +1 -1
- package/beta/realtime/websocket.d.ts +2 -0
- package/beta/realtime/websocket.d.ts.map +1 -1
- package/beta/realtime/websocket.js +12 -7
- package/beta/realtime/websocket.js.map +1 -1
- package/beta/realtime/websocket.mjs +12 -7
- package/beta/realtime/websocket.mjs.map +1 -1
- package/beta/realtime/ws.d.mts +2 -0
- package/beta/realtime/ws.d.mts.map +1 -1
- package/beta/realtime/ws.d.ts +2 -0
- package/beta/realtime/ws.d.ts.map +1 -1
- package/beta/realtime/ws.js +7 -5
- package/beta/realtime/ws.js.map +1 -1
- package/beta/realtime/ws.mjs +7 -5
- package/beta/realtime/ws.mjs.map +1 -1
- package/client.d.mts +9 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -1
- package/client.d.ts.map +1 -1
- package/client.js +17 -4
- package/client.js.map +1 -1
- package/client.mjs +17 -4
- package/client.mjs.map +1 -1
- package/core/EventEmitter.d.mts +2 -1
- package/core/EventEmitter.d.mts.map +1 -1
- package/core/EventEmitter.d.ts +2 -1
- package/core/EventEmitter.d.ts.map +1 -1
- package/core/EventEmitter.js +2 -1
- package/core/EventEmitter.js.map +1 -1
- package/core/EventEmitter.mjs +2 -1
- package/core/EventEmitter.mjs.map +1 -1
- package/core/pagination.js +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.d.mts +8 -0
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts +8 -0
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +68 -15
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +68 -15
- package/core/streaming.mjs.map +1 -1
- package/helpers/audio.d.mts +1 -1
- package/helpers/audio.d.mts.map +1 -1
- package/helpers/audio.d.ts +1 -1
- package/helpers/audio.d.ts.map +1 -1
- package/helpers/audio.js +25 -5
- package/helpers/audio.js.map +1 -1
- package/helpers/audio.mjs +25 -5
- package/helpers/audio.mjs.map +1 -1
- package/helpers/zod.d.mts +28 -15
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts +28 -15
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +30 -23
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +30 -23
- package/helpers/zod.mjs.map +1 -1
- package/index.js +4 -5
- package/internal/bedrock.d.mts +11 -0
- package/internal/bedrock.d.mts.map +1 -1
- package/internal/bedrock.d.ts +11 -0
- package/internal/bedrock.d.ts.map +1 -1
- package/internal/bedrock.js +71 -55
- package/internal/bedrock.js.map +1 -1
- package/internal/bedrock.mjs +70 -55
- package/internal/bedrock.mjs.map +1 -1
- package/internal/detect-platform.js +2 -2
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +2 -2
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +3 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +3 -2
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -5
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -5
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.js +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/realtime-credentials.d.mts +15 -0
- package/internal/realtime-credentials.d.mts.map +1 -0
- package/internal/realtime-credentials.d.ts +15 -0
- package/internal/realtime-credentials.d.ts.map +1 -0
- package/internal/realtime-credentials.js +23 -0
- package/internal/realtime-credentials.js.map +1 -0
- package/internal/realtime-credentials.mjs +19 -0
- package/internal/realtime-credentials.mjs.map +1 -0
- package/internal/responses/response-accumulator.d.mts.map +1 -1
- package/internal/responses/response-accumulator.d.ts.map +1 -1
- package/internal/responses/response-accumulator.js +2 -1
- package/internal/responses/response-accumulator.js.map +1 -1
- package/internal/responses/response-accumulator.mjs +2 -1
- package/internal/responses/response-accumulator.mjs.map +1 -1
- package/internal/to-file.d.mts +2 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +2 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +5 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +6 -5
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +3 -3
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +3 -3
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +2 -0
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +2 -0
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +12 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +11 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +3 -0
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -0
- package/internal/utils/base64.mjs.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.mts +1 -1
- package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +31 -9
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +31 -9
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/lib/AssistantStream.d.mts +4 -1
- package/lib/AssistantStream.d.mts.map +1 -1
- package/lib/AssistantStream.d.ts +4 -1
- package/lib/AssistantStream.d.ts.map +1 -1
- package/lib/AssistantStream.js +23 -8
- package/lib/AssistantStream.js.map +1 -1
- package/lib/AssistantStream.mjs +24 -9
- package/lib/AssistantStream.mjs.map +1 -1
- package/lib/ChatCompletionRunner.d.mts +6 -3
- package/lib/ChatCompletionRunner.d.mts.map +1 -1
- package/lib/ChatCompletionRunner.d.ts +6 -3
- package/lib/ChatCompletionRunner.d.ts.map +1 -1
- package/lib/ChatCompletionRunner.js +7 -4
- package/lib/ChatCompletionRunner.js.map +1 -1
- package/lib/ChatCompletionRunner.mjs +7 -4
- package/lib/ChatCompletionRunner.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.mts.map +1 -1
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +6 -0
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +7 -1
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.mts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.js +1 -0
- package/lib/ChatCompletionStreamingRunner.js.map +1 -1
- package/lib/ChatCompletionStreamingRunner.mjs +1 -0
- package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
- package/lib/EventEmitter.d.mts +3 -1
- package/lib/EventEmitter.d.mts.map +1 -1
- package/lib/EventEmitter.d.ts +3 -1
- package/lib/EventEmitter.d.ts.map +1 -1
- package/lib/EventEmitter.js +2 -1
- package/lib/EventEmitter.js.map +1 -1
- package/lib/EventEmitter.mjs +2 -1
- package/lib/EventEmitter.mjs.map +1 -1
- package/lib/EventStream.d.mts +2 -1
- package/lib/EventStream.d.mts.map +1 -1
- package/lib/EventStream.d.ts +2 -1
- package/lib/EventStream.d.ts.map +1 -1
- package/lib/EventStream.js +99 -46
- package/lib/EventStream.js.map +1 -1
- package/lib/EventStream.mjs +99 -46
- package/lib/EventStream.mjs.map +1 -1
- package/lib/ResponsesParser.d.mts +5 -4
- package/lib/ResponsesParser.d.mts.map +1 -1
- package/lib/ResponsesParser.d.ts +5 -4
- package/lib/ResponsesParser.d.ts.map +1 -1
- package/lib/ResponsesParser.js +21 -7
- package/lib/ResponsesParser.js.map +1 -1
- package/lib/ResponsesParser.mjs +21 -7
- package/lib/ResponsesParser.mjs.map +1 -1
- package/lib/RunnableFunction.d.mts +2 -2
- package/lib/RunnableFunction.d.mts.map +1 -1
- package/lib/RunnableFunction.d.ts +2 -2
- package/lib/RunnableFunction.d.ts.map +1 -1
- package/lib/embeddings.d.mts.map +1 -1
- package/lib/embeddings.d.ts.map +1 -1
- package/lib/embeddings.js +18 -12
- package/lib/embeddings.js.map +1 -1
- package/lib/embeddings.mjs +18 -12
- package/lib/embeddings.mjs.map +1 -1
- package/lib/file-processing.d.mts +3 -2
- package/lib/file-processing.d.mts.map +1 -1
- package/lib/file-processing.d.ts +3 -2
- package/lib/file-processing.d.ts.map +1 -1
- package/lib/file-processing.js +5 -4
- package/lib/file-processing.js.map +1 -1
- package/lib/file-processing.mjs +5 -4
- package/lib/file-processing.mjs.map +1 -1
- package/lib/parser.d.mts +16 -4
- package/lib/parser.d.mts.map +1 -1
- package/lib/parser.d.ts +16 -4
- package/lib/parser.d.ts.map +1 -1
- package/lib/parser.js +1 -1
- package/lib/parser.js.map +1 -1
- package/lib/parser.mjs +1 -1
- package/lib/parser.mjs.map +1 -1
- package/lib/polling.d.mts +2 -2
- package/lib/polling.d.mts.map +1 -1
- package/lib/polling.d.ts +2 -2
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +5 -4
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs +5 -4
- package/lib/polling.mjs.map +1 -1
- package/lib/responses/EventTypes.d.mts +2 -2
- package/lib/responses/EventTypes.d.mts.map +1 -1
- package/lib/responses/EventTypes.d.ts +2 -2
- package/lib/responses/EventTypes.d.ts.map +1 -1
- package/lib/responses/ResponseInputItems.d.mts +3 -2
- package/lib/responses/ResponseInputItems.d.mts.map +1 -1
- package/lib/responses/ResponseInputItems.d.ts +3 -2
- package/lib/responses/ResponseInputItems.d.ts.map +1 -1
- package/lib/responses/ResponseInputItems.js +27 -4
- package/lib/responses/ResponseInputItems.js.map +1 -1
- package/lib/responses/ResponseInputItems.mjs +27 -4
- package/lib/responses/ResponseInputItems.mjs.map +1 -1
- package/lib/transform.d.mts.map +1 -1
- package/lib/transform.d.ts.map +1 -1
- package/lib/transform.js +1 -0
- package/lib/transform.js.map +1 -1
- package/lib/transform.mjs +1 -0
- package/lib/transform.mjs.map +1 -1
- package/lib/vector-store-polling.d.mts +2 -2
- package/lib/vector-store-polling.d.ts +2 -2
- package/lib/vector-store-polling.js +3 -3
- package/lib/vector-store-polling.js.map +1 -1
- package/lib/vector-store-polling.mjs +3 -3
- package/lib/vector-store-polling.mjs.map +1 -1
- package/lib/vector-store-upload.d.mts +2 -1
- package/lib/vector-store-upload.d.mts.map +1 -1
- package/lib/vector-store-upload.d.ts +2 -1
- package/lib/vector-store-upload.d.ts.map +1 -1
- package/lib/vector-store-upload.js +5 -1
- package/lib/vector-store-upload.js.map +1 -1
- package/lib/vector-store-upload.mjs +5 -1
- package/lib/vector-store-upload.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/bedrock/aws.d.mts.map +1 -1
- package/providers/bedrock/aws.d.ts.map +1 -1
- package/providers/bedrock/aws.js +14 -16
- package/providers/bedrock/aws.js.map +1 -1
- package/providers/bedrock/aws.mjs +15 -17
- package/providers/bedrock/aws.mjs.map +1 -1
- package/realtime/internal-base.d.mts.map +1 -1
- package/realtime/internal-base.d.ts.map +1 -1
- package/realtime/internal-base.js +3 -5
- package/realtime/internal-base.js.map +1 -1
- package/realtime/internal-base.mjs +3 -5
- package/realtime/internal-base.mjs.map +1 -1
- package/realtime/websocket.d.mts +2 -0
- package/realtime/websocket.d.mts.map +1 -1
- package/realtime/websocket.d.ts +2 -0
- package/realtime/websocket.d.ts.map +1 -1
- package/realtime/websocket.js +12 -6
- package/realtime/websocket.js.map +1 -1
- package/realtime/websocket.mjs +12 -6
- package/realtime/websocket.mjs.map +1 -1
- package/realtime/ws.d.mts +2 -0
- package/realtime/ws.d.mts.map +1 -1
- package/realtime/ws.d.ts +2 -0
- package/realtime/ws.d.ts.map +1 -1
- package/realtime/ws.js +7 -4
- package/realtime/ws.js.map +1 -1
- package/realtime/ws.mjs +7 -4
- package/realtime/ws.mjs.map +1 -1
- package/resources/admin/organization/audit-logs.d.mts +1 -1
- package/resources/admin/organization/audit-logs.d.ts +1 -1
- package/resources/admin/organization/projects/api-keys.d.mts +5 -0
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts +5 -0
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/projects.d.mts +2 -2
- package/resources/admin/organization/projects/projects.d.ts +2 -2
- package/resources/admin/organization/projects/service-accounts/api-keys.d.mts +9 -0
- package/resources/admin/organization/projects/service-accounts/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts +9 -0
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/audio/speech.d.mts +3 -2
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +3 -2
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +10 -10
- package/resources/audio/transcriptions.d.ts +10 -10
- package/resources/audio/translations.d.mts +1 -1
- package/resources/audio/translations.d.ts +1 -1
- package/resources/batches.d.mts +6 -5
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +6 -5
- package/resources/batches.d.ts.map +1 -1
- package/resources/beta/assistants.d.mts +143 -147
- package/resources/beta/assistants.d.mts.map +1 -1
- package/resources/beta/assistants.d.ts +143 -147
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/responses/input-tokens.d.mts +11 -11
- package/resources/beta/responses/input-tokens.d.ts +11 -11
- package/resources/beta/responses/responses.d.mts +284 -194
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +284 -194
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js +3 -3
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs +3 -3
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts +29 -23
- package/resources/beta/threads/messages.d.mts.map +1 -1
- package/resources/beta/threads/messages.d.ts +29 -23
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.d.mts +39 -35
- package/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +39 -35
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.mts +14 -15
- package/resources/beta/threads/runs/steps.d.mts.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +14 -15
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/threads.d.mts +53 -50
- package/resources/beta/threads/threads.d.mts.map +1 -1
- package/resources/beta/threads/threads.d.ts +53 -50
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +89 -81
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +89 -81
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/completions.d.mts +15 -14
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +15 -14
- package/resources/completions.d.ts.map +1 -1
- package/resources/content-provenance-checks.d.mts +1 -1
- package/resources/content-provenance-checks.d.ts +1 -1
- package/resources/content-provenance-checks.js +1 -1
- package/resources/content-provenance-checks.mjs +1 -1
- package/resources/conversations/items.d.mts +12 -3
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts +12 -3
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/embeddings.d.mts +6 -6
- package/resources/embeddings.d.ts +6 -6
- package/resources/evals/evals.d.mts +1 -1
- package/resources/evals/evals.d.ts +1 -1
- package/resources/evals/evals.js +1 -1
- package/resources/evals/evals.mjs +1 -1
- package/resources/evals/runs/runs.d.mts +62 -57
- package/resources/evals/runs/runs.d.mts.map +1 -1
- package/resources/evals/runs/runs.d.ts +62 -57
- package/resources/evals/runs/runs.d.ts.map +1 -1
- package/resources/evals/runs/runs.js.map +1 -1
- package/resources/evals/runs/runs.mjs.map +1 -1
- package/resources/files.d.mts +5 -5
- package/resources/files.d.ts +5 -5
- package/resources/files.js +5 -5
- package/resources/files.mjs +5 -5
- package/resources/fine-tuning/alpha/graders.d.mts +5 -4
- package/resources/fine-tuning/alpha/graders.d.mts.map +1 -1
- package/resources/fine-tuning/alpha/graders.d.ts +5 -4
- package/resources/fine-tuning/alpha/graders.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.mts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.ts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.js +8 -4
- package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.mjs +8 -4
- package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.mts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +2 -2
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +2 -2
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/graders/grader-models.d.mts +1 -1
- package/resources/graders/grader-models.d.ts +1 -1
- package/resources/images.d.mts +83 -68
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +83 -68
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs.map +1 -1
- package/resources/moderations.d.mts +5 -4
- package/resources/moderations.d.mts.map +1 -1
- package/resources/moderations.d.ts +5 -4
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +2 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +2 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/realtime/calls.d.mts +1 -1
- package/resources/realtime/calls.d.ts +1 -1
- package/resources/realtime/client-secrets.d.mts +4 -4
- package/resources/realtime/client-secrets.d.ts +4 -4
- package/resources/realtime/client-secrets.js +1 -1
- package/resources/realtime/client-secrets.mjs +1 -1
- package/resources/realtime/realtime.d.mts +16 -16
- package/resources/realtime/realtime.d.ts +16 -16
- package/resources/responses/input-tokens.d.mts +9 -9
- package/resources/responses/input-tokens.d.ts +9 -9
- package/resources/responses/responses.d.mts +278 -187
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +278 -187
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +3 -3
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +3 -3
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +12 -12
- package/resources/shared.d.ts +12 -12
- package/resources/uploads/parts.d.mts +5 -4
- package/resources/uploads/parts.d.mts.map +1 -1
- package/resources/uploads/parts.d.ts +5 -4
- package/resources/uploads/parts.d.ts.map +1 -1
- package/resources/uploads/parts.js +5 -4
- package/resources/uploads/parts.js.map +1 -1
- package/resources/uploads/parts.mjs +5 -4
- package/resources/uploads/parts.mjs.map +1 -1
- package/resources/uploads/uploads.d.mts +11 -11
- package/resources/uploads/uploads.d.ts +11 -11
- package/resources/uploads/uploads.js +9 -9
- package/resources/uploads/uploads.mjs +9 -9
- package/resources/vector-stores/file-batches.d.mts +11 -11
- package/resources/vector-stores/file-batches.d.ts +11 -11
- package/resources/vector-stores/files.d.mts +8 -8
- package/resources/vector-stores/files.d.ts +8 -8
- package/resources/vector-stores/files.js +3 -3
- package/resources/vector-stores/files.mjs +3 -3
- package/resources/vector-stores/vector-stores.d.mts +3 -3
- package/resources/vector-stores/vector-stores.d.ts +3 -3
- package/resources/webhooks/webhooks.d.mts +12 -6
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +12 -6
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/_vendor/partial-json-parser/parser.ts +4 -3
- package/src/_vendor/zod-to-json-schema/parsers/string.ts +1 -1
- package/src/_vendor/zod-to-json-schema/parsers/tuple.ts +23 -16
- package/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +11 -6
- package/src/auth/subject-token-providers.ts +12 -7
- package/src/auth/workload-identity-auth.ts +27 -12
- package/src/azure.ts +34 -3
- package/src/beta/realtime/internal-base.ts +3 -2
- package/src/beta/realtime/websocket.ts +17 -7
- package/src/beta/realtime/ws.ts +9 -5
- package/src/client.ts +19 -4
- package/src/core/EventEmitter.ts +5 -8
- package/src/core/pagination.ts +1 -1
- package/src/core/streaming.ts +69 -13
- package/src/helpers/audio.ts +27 -6
- package/src/helpers/zod.ts +78 -29
- package/src/internal/bedrock.ts +84 -58
- package/src/internal/detect-platform.ts +2 -2
- package/src/internal/errors.ts +3 -2
- package/src/internal/headers.ts +7 -5
- package/src/internal/parse.ts +1 -1
- package/src/internal/realtime-credentials.ts +27 -0
- package/src/internal/responses/response-accumulator.ts +1 -0
- package/src/internal/to-file.ts +6 -5
- package/src/internal/uploads.ts +12 -1
- package/src/internal/utils/base64.ts +3 -0
- package/src/lib/AbstractChatCompletionRunner.ts +31 -6
- package/src/lib/AssistantStream.ts +25 -11
- package/src/lib/ChatCompletionRunner.ts +8 -4
- package/src/lib/ChatCompletionStream.ts +8 -0
- package/src/lib/ChatCompletionStreamingRunner.ts +1 -0
- package/src/lib/EventEmitter.ts +17 -8
- package/src/lib/EventStream.ts +105 -52
- package/src/lib/ResponsesParser.ts +33 -12
- package/src/lib/RunnableFunction.ts +2 -2
- package/src/lib/embeddings.ts +18 -12
- package/src/lib/file-processing.ts +5 -4
- package/src/lib/parser.ts +35 -11
- package/src/lib/polling.ts +5 -4
- package/src/lib/responses/EventTypes.ts +3 -69
- package/src/lib/responses/ResponseInputItems.ts +29 -4
- package/src/lib/transform.ts +1 -0
- package/src/lib/vector-store-polling.ts +3 -3
- package/src/lib/vector-store-upload.ts +5 -1
- package/src/providers/bedrock/aws.ts +23 -24
- package/src/realtime/internal-base.ts +3 -5
- package/src/realtime/websocket.ts +14 -6
- package/src/realtime/ws.ts +9 -4
- package/src/resources/admin/organization/audit-logs.ts +1 -1
- package/src/resources/admin/organization/projects/api-keys.ts +6 -0
- package/src/resources/admin/organization/projects/projects.ts +2 -2
- package/src/resources/admin/organization/projects/service-accounts/api-keys.ts +11 -0
- package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +15 -0
- package/src/resources/audio/speech.ts +3 -2
- package/src/resources/audio/transcriptions.ts +10 -10
- package/src/resources/audio/translations.ts +1 -1
- package/src/resources/batches.ts +6 -5
- package/src/resources/beta/assistants.ts +143 -147
- package/src/resources/beta/responses/input-tokens.ts +11 -11
- package/src/resources/beta/responses/responses.ts +315 -192
- package/src/resources/beta/threads/messages.ts +29 -23
- package/src/resources/beta/threads/runs/runs.ts +39 -35
- package/src/resources/beta/threads/runs/steps.ts +14 -15
- package/src/resources/beta/threads/threads.ts +53 -50
- package/src/resources/chat/completions/completions.ts +89 -81
- package/src/resources/completions.ts +15 -14
- package/src/resources/content-provenance-checks.ts +1 -1
- package/src/resources/conversations/items.ts +14 -3
- package/src/resources/embeddings.ts +6 -6
- package/src/resources/evals/evals.ts +1 -1
- package/src/resources/evals/runs/runs.ts +62 -57
- package/src/resources/files.ts +5 -5
- package/src/resources/fine-tuning/alpha/graders.ts +5 -4
- package/src/resources/fine-tuning/checkpoints/permissions.ts +8 -4
- package/src/resources/fine-tuning/jobs/jobs.ts +13 -12
- package/src/resources/graders/grader-models.ts +1 -1
- package/src/resources/images.ts +86 -67
- package/src/resources/moderations.ts +5 -4
- package/src/resources/realtime/calls.ts +1 -1
- package/src/resources/realtime/client-secrets.ts +4 -4
- package/src/resources/realtime/realtime.ts +16 -16
- package/src/resources/responses/input-tokens.ts +9 -9
- package/src/resources/responses/responses.ts +309 -185
- package/src/resources/shared.ts +12 -12
- package/src/resources/uploads/parts.ts +5 -4
- package/src/resources/uploads/uploads.ts +11 -11
- package/src/resources/vector-stores/file-batches.ts +11 -11
- package/src/resources/vector-stores/files.ts +8 -8
- package/src/resources/vector-stores/vector-stores.ts +3 -3
- package/src/resources/webhooks/webhooks.ts +12 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -16,7 +16,7 @@ class ClientSecrets extends resource_1.APIResource {
|
|
|
16
16
|
* will be applied to any sessions created using that client secret, but these can
|
|
17
17
|
* also be overridden by the client connection.
|
|
18
18
|
*
|
|
19
|
-
* [Learn more about authentication with client secrets over WebRTC](https://
|
|
19
|
+
* [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc).
|
|
20
20
|
*
|
|
21
21
|
* Returns the created client secret and the effective session object. The client
|
|
22
22
|
* secret is a string that looks like `ek_1234`.
|
|
@@ -13,7 +13,7 @@ export class ClientSecrets extends APIResource {
|
|
|
13
13
|
* will be applied to any sessions created using that client secret, but these can
|
|
14
14
|
* also be overridden by the client connection.
|
|
15
15
|
*
|
|
16
|
-
* [Learn more about authentication with client secrets over WebRTC](https://
|
|
16
|
+
* [Learn more about authentication with client secrets over WebRTC](https://developers.openai.com/api/docs/guides/realtime-webrtc).
|
|
17
17
|
*
|
|
18
18
|
* Returns the created client secret and the effective session object. The client
|
|
19
19
|
* secret is a string that looks like `ek_1234`.
|
|
@@ -46,7 +46,7 @@ export interface AudioTranscription {
|
|
|
46
46
|
/**
|
|
47
47
|
* An optional text to guide the model's style or continue a previous audio
|
|
48
48
|
* segment. For `whisper-1`, the
|
|
49
|
-
* [prompt is a list of keywords](https://
|
|
49
|
+
* [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting).
|
|
50
50
|
* For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the
|
|
51
51
|
* prompt is a free text string, for example "expect words related to technology".
|
|
52
52
|
* Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.
|
|
@@ -964,7 +964,7 @@ export type NoiseReductionType = 'near_field' | 'far_field';
|
|
|
964
964
|
* trigger the server to stop generating audio and emit a
|
|
965
965
|
* `output_audio_buffer.cleared` event. This event should be preceded by a
|
|
966
966
|
* `response.cancel` client event to stop the generation of the current response.
|
|
967
|
-
* [Learn more](https://
|
|
967
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
968
968
|
*/
|
|
969
969
|
export interface OutputAudioBufferClearEvent {
|
|
970
970
|
/**
|
|
@@ -1041,7 +1041,7 @@ export interface RealtimeAudioConfigInput {
|
|
|
1041
1041
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
1042
1042
|
* model, since the model consumes audio directly. Transcription runs
|
|
1043
1043
|
* asynchronously through
|
|
1044
|
-
* [the /audio/transcriptions endpoint](https://
|
|
1044
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
1045
1045
|
* and should be treated as guidance of input audio content rather than precisely
|
|
1046
1046
|
* what the model heard. The client can optionally set the language and prompt for
|
|
1047
1047
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -1858,7 +1858,7 @@ export declare namespace RealtimeResponseCreateAudioOutput {
|
|
|
1858
1858
|
/**
|
|
1859
1859
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
1860
1860
|
* (MCP) servers.
|
|
1861
|
-
* [Learn more about MCP](https://
|
|
1861
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
1862
1862
|
*/
|
|
1863
1863
|
export interface RealtimeResponseCreateMcpTool {
|
|
1864
1864
|
/**
|
|
@@ -1887,7 +1887,7 @@ export interface RealtimeResponseCreateMcpTool {
|
|
|
1887
1887
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
1888
1888
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
1889
1889
|
* service connectors
|
|
1890
|
-
* [here](https://
|
|
1890
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
1891
1891
|
*
|
|
1892
1892
|
* Currently supported `connector_id` values are:
|
|
1893
1893
|
*
|
|
@@ -2062,7 +2062,7 @@ export interface RealtimeResponseCreateParams {
|
|
|
2062
2062
|
parallel_tool_calls?: boolean;
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Reference to a prompt template and its variables.
|
|
2065
|
-
* [Learn more](https://
|
|
2065
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2066
2066
|
*/
|
|
2067
2067
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2068
2068
|
/**
|
|
@@ -2242,7 +2242,7 @@ export declare namespace RealtimeServerEvent {
|
|
|
2242
2242
|
* **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the
|
|
2243
2243
|
* client. This event is emitted after an audio content part has been added
|
|
2244
2244
|
* (`response.content_part.added`) to the response.
|
|
2245
|
-
* [Learn more](https://
|
|
2245
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2246
2246
|
*/
|
|
2247
2247
|
interface OutputAudioBufferStarted {
|
|
2248
2248
|
/**
|
|
@@ -2262,7 +2262,7 @@ export declare namespace RealtimeServerEvent {
|
|
|
2262
2262
|
* **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely
|
|
2263
2263
|
* drained on the server, and no more audio is forthcoming. This event is emitted
|
|
2264
2264
|
* after the full response data has been sent to the client (`response.done`).
|
|
2265
|
-
* [Learn more](https://
|
|
2265
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2266
2266
|
*/
|
|
2267
2267
|
interface OutputAudioBufferStopped {
|
|
2268
2268
|
/**
|
|
@@ -2284,7 +2284,7 @@ export declare namespace RealtimeServerEvent {
|
|
|
2284
2284
|
* (`input_audio_buffer.speech_started`), or when the client has emitted the
|
|
2285
2285
|
* `output_audio_buffer.clear` event to manually cut off the current audio
|
|
2286
2286
|
* response.
|
|
2287
|
-
* [Learn more](https://
|
|
2287
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2288
2288
|
*/
|
|
2289
2289
|
interface OutputAudioBufferCleared {
|
|
2290
2290
|
/**
|
|
@@ -2339,7 +2339,7 @@ export interface RealtimeSession {
|
|
|
2339
2339
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
2340
2340
|
* model, since the model consumes audio directly. Transcription runs
|
|
2341
2341
|
* asynchronously through
|
|
2342
|
-
* [the /audio/transcriptions endpoint](https://
|
|
2342
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
2343
2343
|
* and should be treated as guidance of input audio content rather than precisely
|
|
2344
2344
|
* what the model heard. The client can optionally set the language and prompt for
|
|
2345
2345
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -2385,7 +2385,7 @@ export interface RealtimeSession {
|
|
|
2385
2385
|
output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
|
|
2386
2386
|
/**
|
|
2387
2387
|
* Reference to a prompt template and its variables.
|
|
2388
|
-
* [Learn more](https://
|
|
2388
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2389
2389
|
*/
|
|
2390
2390
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2391
2391
|
/**
|
|
@@ -2625,7 +2625,7 @@ export interface RealtimeSessionCreateRequest {
|
|
|
2625
2625
|
parallel_tool_calls?: boolean;
|
|
2626
2626
|
/**
|
|
2627
2627
|
* Reference to a prompt template and its variables.
|
|
2628
|
-
* [Learn more](https://
|
|
2628
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2629
2629
|
*/
|
|
2630
2630
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2631
2631
|
/**
|
|
@@ -2685,14 +2685,14 @@ export type RealtimeToolsConfig = Array<RealtimeToolsConfigUnion>;
|
|
|
2685
2685
|
/**
|
|
2686
2686
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
2687
2687
|
* (MCP) servers.
|
|
2688
|
-
* [Learn more about MCP](https://
|
|
2688
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
2689
2689
|
*/
|
|
2690
2690
|
export type RealtimeToolsConfigUnion = RealtimeFunctionTool | RealtimeToolsConfigUnion.Mcp;
|
|
2691
2691
|
export declare namespace RealtimeToolsConfigUnion {
|
|
2692
2692
|
/**
|
|
2693
2693
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
2694
2694
|
* (MCP) servers.
|
|
2695
|
-
* [Learn more about MCP](https://
|
|
2695
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
2696
2696
|
*/
|
|
2697
2697
|
interface Mcp {
|
|
2698
2698
|
/**
|
|
@@ -2721,7 +2721,7 @@ export declare namespace RealtimeToolsConfigUnion {
|
|
|
2721
2721
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
2722
2722
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
2723
2723
|
* service connectors
|
|
2724
|
-
* [here](https://
|
|
2724
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
2725
2725
|
*
|
|
2726
2726
|
* Currently supported `connector_id` values are:
|
|
2727
2727
|
*
|
|
@@ -2888,7 +2888,7 @@ export interface RealtimeTranscriptionSessionAudioInput {
|
|
|
2888
2888
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
2889
2889
|
* model, since the model consumes audio directly. Transcription runs
|
|
2890
2890
|
* asynchronously through
|
|
2891
|
-
* [the /audio/transcriptions endpoint](https://
|
|
2891
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
2892
2892
|
* and should be treated as guidance of input audio content rather than precisely
|
|
2893
2893
|
* what the model heard. The client can optionally set the language and prompt for
|
|
2894
2894
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -46,7 +46,7 @@ export interface AudioTranscription {
|
|
|
46
46
|
/**
|
|
47
47
|
* An optional text to guide the model's style or continue a previous audio
|
|
48
48
|
* segment. For `whisper-1`, the
|
|
49
|
-
* [prompt is a list of keywords](https://
|
|
49
|
+
* [prompt is a list of keywords](https://developers.openai.com/api/docs/guides/speech-to-text#prompting).
|
|
50
50
|
* For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the
|
|
51
51
|
* prompt is a free text string, for example "expect words related to technology".
|
|
52
52
|
* Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.
|
|
@@ -964,7 +964,7 @@ export type NoiseReductionType = 'near_field' | 'far_field';
|
|
|
964
964
|
* trigger the server to stop generating audio and emit a
|
|
965
965
|
* `output_audio_buffer.cleared` event. This event should be preceded by a
|
|
966
966
|
* `response.cancel` client event to stop the generation of the current response.
|
|
967
|
-
* [Learn more](https://
|
|
967
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
968
968
|
*/
|
|
969
969
|
export interface OutputAudioBufferClearEvent {
|
|
970
970
|
/**
|
|
@@ -1041,7 +1041,7 @@ export interface RealtimeAudioConfigInput {
|
|
|
1041
1041
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
1042
1042
|
* model, since the model consumes audio directly. Transcription runs
|
|
1043
1043
|
* asynchronously through
|
|
1044
|
-
* [the /audio/transcriptions endpoint](https://
|
|
1044
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
1045
1045
|
* and should be treated as guidance of input audio content rather than precisely
|
|
1046
1046
|
* what the model heard. The client can optionally set the language and prompt for
|
|
1047
1047
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -1858,7 +1858,7 @@ export declare namespace RealtimeResponseCreateAudioOutput {
|
|
|
1858
1858
|
/**
|
|
1859
1859
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
1860
1860
|
* (MCP) servers.
|
|
1861
|
-
* [Learn more about MCP](https://
|
|
1861
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
1862
1862
|
*/
|
|
1863
1863
|
export interface RealtimeResponseCreateMcpTool {
|
|
1864
1864
|
/**
|
|
@@ -1887,7 +1887,7 @@ export interface RealtimeResponseCreateMcpTool {
|
|
|
1887
1887
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
1888
1888
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
1889
1889
|
* service connectors
|
|
1890
|
-
* [here](https://
|
|
1890
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
1891
1891
|
*
|
|
1892
1892
|
* Currently supported `connector_id` values are:
|
|
1893
1893
|
*
|
|
@@ -2062,7 +2062,7 @@ export interface RealtimeResponseCreateParams {
|
|
|
2062
2062
|
parallel_tool_calls?: boolean;
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Reference to a prompt template and its variables.
|
|
2065
|
-
* [Learn more](https://
|
|
2065
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2066
2066
|
*/
|
|
2067
2067
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2068
2068
|
/**
|
|
@@ -2242,7 +2242,7 @@ export declare namespace RealtimeServerEvent {
|
|
|
2242
2242
|
* **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the
|
|
2243
2243
|
* client. This event is emitted after an audio content part has been added
|
|
2244
2244
|
* (`response.content_part.added`) to the response.
|
|
2245
|
-
* [Learn more](https://
|
|
2245
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2246
2246
|
*/
|
|
2247
2247
|
interface OutputAudioBufferStarted {
|
|
2248
2248
|
/**
|
|
@@ -2262,7 +2262,7 @@ export declare namespace RealtimeServerEvent {
|
|
|
2262
2262
|
* **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely
|
|
2263
2263
|
* drained on the server, and no more audio is forthcoming. This event is emitted
|
|
2264
2264
|
* after the full response data has been sent to the client (`response.done`).
|
|
2265
|
-
* [Learn more](https://
|
|
2265
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2266
2266
|
*/
|
|
2267
2267
|
interface OutputAudioBufferStopped {
|
|
2268
2268
|
/**
|
|
@@ -2284,7 +2284,7 @@ export declare namespace RealtimeServerEvent {
|
|
|
2284
2284
|
* (`input_audio_buffer.speech_started`), or when the client has emitted the
|
|
2285
2285
|
* `output_audio_buffer.clear` event to manually cut off the current audio
|
|
2286
2286
|
* response.
|
|
2287
|
-
* [Learn more](https://
|
|
2287
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
|
2288
2288
|
*/
|
|
2289
2289
|
interface OutputAudioBufferCleared {
|
|
2290
2290
|
/**
|
|
@@ -2339,7 +2339,7 @@ export interface RealtimeSession {
|
|
|
2339
2339
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
2340
2340
|
* model, since the model consumes audio directly. Transcription runs
|
|
2341
2341
|
* asynchronously through
|
|
2342
|
-
* [the /audio/transcriptions endpoint](https://
|
|
2342
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
2343
2343
|
* and should be treated as guidance of input audio content rather than precisely
|
|
2344
2344
|
* what the model heard. The client can optionally set the language and prompt for
|
|
2345
2345
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -2385,7 +2385,7 @@ export interface RealtimeSession {
|
|
|
2385
2385
|
output_audio_format?: 'pcm16' | 'g711_ulaw' | 'g711_alaw';
|
|
2386
2386
|
/**
|
|
2387
2387
|
* Reference to a prompt template and its variables.
|
|
2388
|
-
* [Learn more](https://
|
|
2388
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2389
2389
|
*/
|
|
2390
2390
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2391
2391
|
/**
|
|
@@ -2625,7 +2625,7 @@ export interface RealtimeSessionCreateRequest {
|
|
|
2625
2625
|
parallel_tool_calls?: boolean;
|
|
2626
2626
|
/**
|
|
2627
2627
|
* Reference to a prompt template and its variables.
|
|
2628
|
-
* [Learn more](https://
|
|
2628
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
2629
2629
|
*/
|
|
2630
2630
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
2631
2631
|
/**
|
|
@@ -2685,14 +2685,14 @@ export type RealtimeToolsConfig = Array<RealtimeToolsConfigUnion>;
|
|
|
2685
2685
|
/**
|
|
2686
2686
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
2687
2687
|
* (MCP) servers.
|
|
2688
|
-
* [Learn more about MCP](https://
|
|
2688
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
2689
2689
|
*/
|
|
2690
2690
|
export type RealtimeToolsConfigUnion = RealtimeFunctionTool | RealtimeToolsConfigUnion.Mcp;
|
|
2691
2691
|
export declare namespace RealtimeToolsConfigUnion {
|
|
2692
2692
|
/**
|
|
2693
2693
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
2694
2694
|
* (MCP) servers.
|
|
2695
|
-
* [Learn more about MCP](https://
|
|
2695
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
2696
2696
|
*/
|
|
2697
2697
|
interface Mcp {
|
|
2698
2698
|
/**
|
|
@@ -2721,7 +2721,7 @@ export declare namespace RealtimeToolsConfigUnion {
|
|
|
2721
2721
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
2722
2722
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
2723
2723
|
* service connectors
|
|
2724
|
-
* [here](https://
|
|
2724
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
2725
2725
|
*
|
|
2726
2726
|
* Currently supported `connector_id` values are:
|
|
2727
2727
|
*
|
|
@@ -2888,7 +2888,7 @@ export interface RealtimeTranscriptionSessionAudioInput {
|
|
|
2888
2888
|
* `null` to turn off once on. Input audio transcription is not native to the
|
|
2889
2889
|
* model, since the model consumes audio directly. Transcription runs
|
|
2890
2890
|
* asynchronously through
|
|
2891
|
-
* [the /audio/transcriptions endpoint](https://
|
|
2891
|
+
* [the /audio/transcriptions endpoint](https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create)
|
|
2892
2892
|
* and should be treated as guidance of input audio content rather than precisely
|
|
2893
2893
|
* what the model heard. The client can optionally set the language and prompt for
|
|
2894
2894
|
* transcription, these offer additional guidance to the transcription service.
|
|
@@ -44,8 +44,8 @@ export interface InputTokenCountParams {
|
|
|
44
44
|
* Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
|
|
45
45
|
* wide range of models with different capabilities, performance characteristics,
|
|
46
46
|
* and price points. Refer to the
|
|
47
|
-
* [model guide](https://
|
|
48
|
-
* available models.
|
|
47
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
48
|
+
* compare available models.
|
|
49
49
|
*/
|
|
50
50
|
model?: string | null;
|
|
51
51
|
/**
|
|
@@ -61,21 +61,21 @@ export interface InputTokenCountParams {
|
|
|
61
61
|
/**
|
|
62
62
|
* The unique ID of the previous response to the model. Use this to create
|
|
63
63
|
* multi-turn conversations. Learn more about
|
|
64
|
-
* [conversation state](https://
|
|
64
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
65
65
|
* Cannot be used in conjunction with `conversation`.
|
|
66
66
|
*/
|
|
67
67
|
previous_response_id?: string | null;
|
|
68
68
|
/**
|
|
69
69
|
* **gpt-5 and o-series models only** Configuration options for
|
|
70
|
-
* [reasoning models](https://
|
|
70
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
71
71
|
*/
|
|
72
72
|
reasoning?: Shared.Reasoning | null;
|
|
73
73
|
/**
|
|
74
74
|
* Configuration options for a text response from the model. Can be plain text or
|
|
75
75
|
* structured JSON data. Learn more:
|
|
76
76
|
*
|
|
77
|
-
* - [Text inputs and outputs](https://
|
|
78
|
-
* - [Structured Outputs](https://
|
|
77
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
78
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
79
79
|
*/
|
|
80
80
|
text?: InputTokenCountParams.Text | null;
|
|
81
81
|
/**
|
|
@@ -102,8 +102,8 @@ export declare namespace InputTokenCountParams {
|
|
|
102
102
|
* Configuration options for a text response from the model. Can be plain text or
|
|
103
103
|
* structured JSON data. Learn more:
|
|
104
104
|
*
|
|
105
|
-
* - [Text inputs and outputs](https://
|
|
106
|
-
* - [Structured Outputs](https://
|
|
105
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
106
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
107
107
|
*/
|
|
108
108
|
interface Text {
|
|
109
109
|
/**
|
|
@@ -111,7 +111,7 @@ export declare namespace InputTokenCountParams {
|
|
|
111
111
|
*
|
|
112
112
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
113
113
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
114
|
-
* [Structured Outputs guide](https://
|
|
114
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
115
115
|
*
|
|
116
116
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
117
117
|
*
|
|
@@ -44,8 +44,8 @@ export interface InputTokenCountParams {
|
|
|
44
44
|
* Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
|
|
45
45
|
* wide range of models with different capabilities, performance characteristics,
|
|
46
46
|
* and price points. Refer to the
|
|
47
|
-
* [model guide](https://
|
|
48
|
-
* available models.
|
|
47
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
48
|
+
* compare available models.
|
|
49
49
|
*/
|
|
50
50
|
model?: string | null;
|
|
51
51
|
/**
|
|
@@ -61,21 +61,21 @@ export interface InputTokenCountParams {
|
|
|
61
61
|
/**
|
|
62
62
|
* The unique ID of the previous response to the model. Use this to create
|
|
63
63
|
* multi-turn conversations. Learn more about
|
|
64
|
-
* [conversation state](https://
|
|
64
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
65
65
|
* Cannot be used in conjunction with `conversation`.
|
|
66
66
|
*/
|
|
67
67
|
previous_response_id?: string | null;
|
|
68
68
|
/**
|
|
69
69
|
* **gpt-5 and o-series models only** Configuration options for
|
|
70
|
-
* [reasoning models](https://
|
|
70
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
71
71
|
*/
|
|
72
72
|
reasoning?: Shared.Reasoning | null;
|
|
73
73
|
/**
|
|
74
74
|
* Configuration options for a text response from the model. Can be plain text or
|
|
75
75
|
* structured JSON data. Learn more:
|
|
76
76
|
*
|
|
77
|
-
* - [Text inputs and outputs](https://
|
|
78
|
-
* - [Structured Outputs](https://
|
|
77
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
78
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
79
79
|
*/
|
|
80
80
|
text?: InputTokenCountParams.Text | null;
|
|
81
81
|
/**
|
|
@@ -102,8 +102,8 @@ export declare namespace InputTokenCountParams {
|
|
|
102
102
|
* Configuration options for a text response from the model. Can be plain text or
|
|
103
103
|
* structured JSON data. Learn more:
|
|
104
104
|
*
|
|
105
|
-
* - [Text inputs and outputs](https://
|
|
106
|
-
* - [Structured Outputs](https://
|
|
105
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
106
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
107
107
|
*/
|
|
108
108
|
interface Text {
|
|
109
109
|
/**
|
|
@@ -111,7 +111,7 @@ export declare namespace InputTokenCountParams {
|
|
|
111
111
|
*
|
|
112
112
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
113
113
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
114
|
-
* [Structured Outputs guide](https://
|
|
114
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
115
115
|
*
|
|
116
116
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
117
117
|
*
|