openai 0.71.0 → 0.73.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/organization_spend_limit.rb +151 -0
- data/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb +33 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit.rb +155 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb +35 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_delete_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_retrieve_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb +77 -0
- data/lib/openai/models/admin/organization/spend_limit_delete_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_retrieve_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_update_params.rb +67 -0
- data/lib/openai/models/audio/transcription.rb +10 -1
- data/lib/openai/models/audio/transcription_create_params.rb +24 -5
- data/lib/openai/models/audio/transcription_language.rb +20 -0
- data/lib/openai/models/audio/transcription_text_done_event.rb +10 -1
- data/lib/openai/models/audio_model.rb +1 -0
- data/lib/openai/models/beta/beta_response.rb +12 -6
- data/lib/openai/models/beta/beta_response_error.rb +1 -0
- data/lib/openai/models/beta/beta_response_text_config.rb +4 -2
- data/lib/openai/models/beta/beta_responses_client_event.rb +12 -6
- data/lib/openai/models/beta/response_create_params.rb +12 -6
- data/lib/openai/models/beta/responses/input_token_count_params.rb +12 -4
- data/lib/openai/models/chat/completion_create_params.rb +8 -6
- data/lib/openai/models/realtime/audio_transcription.rb +35 -8
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +10 -1
- data/lib/openai/models/reasoning.rb +8 -2
- data/lib/openai/models/responses/input_token_count_params.rb +4 -2
- data/lib/openai/models/responses/response.rb +4 -4
- data/lib/openai/models/responses/response_create_params.rb +4 -4
- data/lib/openai/models/responses/response_error.rb +1 -0
- data/lib/openai/models/responses/response_text_config.rb +4 -2
- data/lib/openai/models/responses/responses_client_event.rb +4 -4
- data/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +121 -0
- data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +6 -3
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +9 -2
- data/lib/openai/resources/admin/organization/projects/spend_limit.rb +95 -0
- data/lib/openai/resources/admin/organization/projects.rb +4 -0
- data/lib/openai/resources/admin/organization/spend_limit.rb +86 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/audio/transcriptions.rb +12 -4
- data/lib/openai/resources/beta/responses.rb +4 -4
- data/lib/openai/resources/chat/completions.rb +4 -4
- data/lib/openai/resources/responses.rb +4 -4
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +14 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit.rbi +278 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit_deleted.rbi +48 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit.rbi +280 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit_deleted.rbi +49 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_delete_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_update_params.rbi +149 -0
- data/rbi/openai/models/admin/organization/spend_limit_delete_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_retrieve_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_update_params.rbi +141 -0
- data/rbi/openai/models/audio/transcription.rbi +19 -0
- data/rbi/openai/models/audio/transcription_create_params.rbi +31 -3
- data/rbi/openai/models/audio/transcription_language.rbi +33 -0
- data/rbi/openai/models/audio/transcription_text_done_event.rbi +19 -0
- data/rbi/openai/models/audio_model.rbi +2 -0
- data/rbi/openai/models/beta/beta_response.rbi +18 -15
- data/rbi/openai/models/beta/beta_response_error.rbi +5 -0
- data/rbi/openai/models/beta/beta_response_text_config.rbi +6 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +18 -15
- data/rbi/openai/models/beta/response_create_params.rbi +18 -15
- data/rbi/openai/models/beta/responses/input_token_count_params.rbi +18 -6
- data/rbi/openai/models/chat/completion_create_params.rbi +12 -15
- data/rbi/openai/models/realtime/audio_transcription.rbi +50 -9
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +19 -0
- data/rbi/openai/models/reasoning.rbi +12 -3
- data/rbi/openai/models/responses/input_token_count_params.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +6 -12
- data/rbi/openai/models/responses/response_create_params.rbi +6 -12
- data/rbi/openai/models/responses/response_error.rbi +5 -0
- data/rbi/openai/models/responses/response_text_config.rbi +6 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -12
- data/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +7 -3
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
- data/rbi/openai/resources/admin/organization/projects/spend_limit.rbi +78 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +7 -0
- data/rbi/openai/resources/admin/organization/spend_limit.rbi +57 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/audio/transcriptions.rbi +20 -2
- data/rbi/openai/resources/beta/responses.rbi +4 -4
- data/rbi/openai/resources/chat/completions.rbi +8 -6
- data/rbi/openai/resources/responses.rbi +4 -4
- data/rbi/openai/resources/webhooks.rbi +1 -0
- data/sig/openai/models/admin/organization/organization_spend_limit.rbs +94 -0
- data/sig/openai/models/admin/organization/organization_spend_limit_deleted.rbs +28 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +96 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit_deleted.rbs +30 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_delete_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +67 -0
- data/sig/openai/models/admin/organization/spend_limit_delete_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_retrieve_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +60 -0
- data/sig/openai/models/audio/transcription.rbs +9 -0
- data/sig/openai/models/audio/transcription_create_params.rbs +14 -0
- data/sig/openai/models/audio/transcription_language.rbs +15 -0
- data/sig/openai/models/audio/transcription_text_done_event.rbs +9 -0
- data/sig/openai/models/audio_model.rbs +2 -0
- data/sig/openai/models/beta/beta_response.rbs +8 -12
- data/sig/openai/models/beta/beta_response_error.rbs +2 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -12
- data/sig/openai/models/beta/response_create_params.rbs +8 -12
- data/sig/openai/models/chat/completion_create_params.rbs +8 -12
- data/sig/openai/models/realtime/audio_transcription.rbs +18 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +9 -0
- data/sig/openai/models/responses/response.rbs +8 -12
- data/sig/openai/models/responses/response_create_params.rbs +8 -12
- data/sig/openai/models/responses/response_error.rbs +2 -0
- data/sig/openai/models/responses/responses_client_event.rbs +8 -12
- data/sig/openai/models/webhooks/live_call_incoming_webhook_event.rbs +90 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/resources/admin/organization/projects/spend_limit.rbs +31 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- data/sig/openai/resources/admin/organization/spend_limit.rbs +26 -0
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/audio/transcriptions.rbs +4 -0
- data/sig/openai/resources/beta/responses.rbs +4 -4
- data/sig/openai/resources/chat/completions.rbs +4 -4
- data/sig/openai/resources/responses.rbs +4 -4
- data/sig/openai/resources/webhooks.rbs +1 -0
- metadata +44 -2
|
@@ -10,6 +10,13 @@ module OpenAI
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :text, String
|
|
12
12
|
|
|
13
|
+
# @!attribute languages
|
|
14
|
+
# The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
15
|
+
# array indicates that no language could be reliably detected.
|
|
16
|
+
#
|
|
17
|
+
# @return [Array<OpenAI::Models::Audio::TranscriptionLanguage>, nil]
|
|
18
|
+
optional :languages, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionLanguage] }
|
|
19
|
+
|
|
13
20
|
# @!attribute logprobs
|
|
14
21
|
# The log probabilities of the tokens in the transcription. Only returned with the
|
|
15
22
|
# models `gpt-4o-transcribe` and `gpt-4o-mini-transcribe` if `logprobs` is added
|
|
@@ -24,7 +31,7 @@ module OpenAI
|
|
|
24
31
|
# @return [OpenAI::Models::Audio::Transcription::Usage::Tokens, OpenAI::Models::Audio::Transcription::Usage::Duration, nil]
|
|
25
32
|
optional :usage, union: -> { OpenAI::Audio::Transcription::Usage }
|
|
26
33
|
|
|
27
|
-
# @!method initialize(text:, logprobs: nil, usage: nil)
|
|
34
|
+
# @!method initialize(text:, languages: nil, logprobs: nil, usage: nil)
|
|
28
35
|
# Some parameter documentations has been truncated, see
|
|
29
36
|
# {OpenAI::Models::Audio::Transcription} for more details.
|
|
30
37
|
#
|
|
@@ -33,6 +40,8 @@ module OpenAI
|
|
|
33
40
|
#
|
|
34
41
|
# @param text [String] The transcribed text.
|
|
35
42
|
#
|
|
43
|
+
# @param languages [Array<OpenAI::Models::Audio::TranscriptionLanguage>] The languages detected in the audio. Returned by `gpt-transcribe`. An empty arra
|
|
44
|
+
#
|
|
36
45
|
# @param logprobs [Array<OpenAI::Models::Audio::Transcription::Logprob>] The log probabilities of the tokens in the transcription. Only returned with the
|
|
37
46
|
#
|
|
38
47
|
# @param usage [OpenAI::Models::Audio::Transcription::Usage::Tokens, OpenAI::Models::Audio::Transcription::Usage::Duration] Token usage statistics for the request.
|
|
@@ -18,7 +18,7 @@ module OpenAI
|
|
|
18
18
|
required :file, OpenAI::Internal::Type::FileInput
|
|
19
19
|
|
|
20
20
|
# @!attribute model
|
|
21
|
-
# ID of the model to use. The options are `gpt-4o-transcribe`,
|
|
21
|
+
# ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
|
|
22
22
|
# `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
|
|
23
23
|
# (which is powered by our open source Whisper V2 model), and
|
|
24
24
|
# `gpt-4o-transcribe-diarize`.
|
|
@@ -50,6 +50,13 @@ module OpenAI
|
|
|
50
50
|
# @return [Array<Symbol, OpenAI::Models::Audio::TranscriptionInclude>, nil]
|
|
51
51
|
optional :include, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Audio::TranscriptionInclude] }
|
|
52
52
|
|
|
53
|
+
# @!attribute keywords
|
|
54
|
+
# Words or phrases to guide transcription of the input audio. Supported by
|
|
55
|
+
# `gpt-transcribe`.
|
|
56
|
+
#
|
|
57
|
+
# @return [Array<String>, nil]
|
|
58
|
+
optional :keywords, OpenAI::Internal::Type::ArrayOf[String]
|
|
59
|
+
|
|
53
60
|
# @!attribute known_speaker_names
|
|
54
61
|
# Optional list of speaker names that correspond to the audio samples provided in
|
|
55
62
|
# `known_speaker_references[]`. Each entry should be a short identifier (for
|
|
@@ -76,6 +83,14 @@ module OpenAI
|
|
|
76
83
|
# @return [String, nil]
|
|
77
84
|
optional :language, String
|
|
78
85
|
|
|
86
|
+
# @!attribute languages
|
|
87
|
+
# Possible languages of the input audio, in
|
|
88
|
+
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
89
|
+
# Supported by `gpt-transcribe`.
|
|
90
|
+
#
|
|
91
|
+
# @return [Array<String>, nil]
|
|
92
|
+
optional :languages, OpenAI::Internal::Type::ArrayOf[String]
|
|
93
|
+
|
|
79
94
|
# @!attribute prompt
|
|
80
95
|
# An optional text to guide the model's style or continue a previous audio
|
|
81
96
|
# segment. The
|
|
@@ -118,24 +133,28 @@ module OpenAI
|
|
|
118
133
|
optional :timestamp_granularities,
|
|
119
134
|
-> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Audio::TranscriptionCreateParams::TimestampGranularity] }
|
|
120
135
|
|
|
121
|
-
# @!method initialize(file:, model:, chunking_strategy: nil, include: nil, known_speaker_names: nil, known_speaker_references: nil, language: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {})
|
|
136
|
+
# @!method initialize(file:, model:, chunking_strategy: nil, include: nil, keywords: nil, known_speaker_names: nil, known_speaker_references: nil, language: nil, languages: nil, prompt: nil, response_format: nil, temperature: nil, timestamp_granularities: nil, request_options: {})
|
|
122
137
|
# Some parameter documentations has been truncated, see
|
|
123
138
|
# {OpenAI::Models::Audio::TranscriptionCreateParams} for more details.
|
|
124
139
|
#
|
|
125
140
|
# @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The audio file object (not file name) to transcribe, in one of these formats: fl
|
|
126
141
|
#
|
|
127
|
-
# @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. The options are `gpt-
|
|
142
|
+
# @param model [String, Symbol, OpenAI::Models::AudioModel] ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, `
|
|
128
143
|
#
|
|
129
144
|
# @param chunking_strategy [Symbol, :auto, OpenAI::Models::Audio::TranscriptionCreateParams::ChunkingStrategy::VadConfig, nil] Controls how the audio is cut into chunks. When set to `"auto"`, the server firs
|
|
130
145
|
#
|
|
131
146
|
# @param include [Array<Symbol, OpenAI::Models::Audio::TranscriptionInclude>] Additional information to include in the transcription response.
|
|
132
147
|
#
|
|
148
|
+
# @param keywords [Array<String>] Words or phrases to guide transcription of the input audio. Supported by `gpt-tr
|
|
149
|
+
#
|
|
133
150
|
# @param known_speaker_names [Array<String>] Optional list of speaker names that correspond to the audio samples provided in
|
|
134
151
|
#
|
|
135
152
|
# @param known_speaker_references [Array<String>] Optional list of audio samples (as [data URLs](https://developer.mozilla.org/en-
|
|
136
153
|
#
|
|
137
154
|
# @param language [String] The language of the input audio. Supplying the input language in [ISO-639-1](htt
|
|
138
155
|
#
|
|
156
|
+
# @param languages [Array<String>] Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/w
|
|
157
|
+
#
|
|
139
158
|
# @param prompt [String] An optional text to guide the model's style or continue a previous audio segment
|
|
140
159
|
#
|
|
141
160
|
# @param response_format [Symbol, OpenAI::Models::AudioResponseFormat] The format of the output, in one of these options: `json`, `text`, `srt`, `verbo
|
|
@@ -146,7 +165,7 @@ module OpenAI
|
|
|
146
165
|
#
|
|
147
166
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
148
167
|
|
|
149
|
-
# ID of the model to use. The options are `gpt-4o-transcribe`,
|
|
168
|
+
# ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
|
|
150
169
|
# `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
|
|
151
170
|
# (which is powered by our open source Whisper V2 model), and
|
|
152
171
|
# `gpt-4o-transcribe-diarize`.
|
|
@@ -155,7 +174,7 @@ module OpenAI
|
|
|
155
174
|
|
|
156
175
|
variant String
|
|
157
176
|
|
|
158
|
-
# ID of the model to use. The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
|
|
177
|
+
# ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
|
|
159
178
|
variant enum: -> { OpenAI::AudioModel }
|
|
160
179
|
|
|
161
180
|
# @!method self.variants
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Audio
|
|
6
|
+
class TranscriptionLanguage < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute code
|
|
8
|
+
# The code of a language detected in the audio.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :code, String
|
|
12
|
+
|
|
13
|
+
# @!method initialize(code:)
|
|
14
|
+
# A language detected in transcribed audio.
|
|
15
|
+
#
|
|
16
|
+
# @param code [String] The code of a language detected in the audio.
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -16,6 +16,13 @@ module OpenAI
|
|
|
16
16
|
# @return [Symbol, :"transcript.text.done"]
|
|
17
17
|
required :type, const: :"transcript.text.done"
|
|
18
18
|
|
|
19
|
+
# @!attribute languages
|
|
20
|
+
# The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
21
|
+
# array indicates that no language could be reliably detected.
|
|
22
|
+
#
|
|
23
|
+
# @return [Array<OpenAI::Models::Audio::TranscriptionLanguage>, nil]
|
|
24
|
+
optional :languages, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionLanguage] }
|
|
25
|
+
|
|
19
26
|
# @!attribute logprobs
|
|
20
27
|
# The log probabilities of the individual tokens in the transcription. Only
|
|
21
28
|
# included if you
|
|
@@ -32,7 +39,7 @@ module OpenAI
|
|
|
32
39
|
# @return [OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage, nil]
|
|
33
40
|
optional :usage, -> { OpenAI::Audio::TranscriptionTextDoneEvent::Usage }
|
|
34
41
|
|
|
35
|
-
# @!method initialize(text:, logprobs: nil, usage: nil, type: :"transcript.text.done")
|
|
42
|
+
# @!method initialize(text:, languages: nil, logprobs: nil, usage: nil, type: :"transcript.text.done")
|
|
36
43
|
# Some parameter documentations has been truncated, see
|
|
37
44
|
# {OpenAI::Models::Audio::TranscriptionTextDoneEvent} for more details.
|
|
38
45
|
#
|
|
@@ -43,6 +50,8 @@ module OpenAI
|
|
|
43
50
|
#
|
|
44
51
|
# @param text [String] The text that was transcribed.
|
|
45
52
|
#
|
|
53
|
+
# @param languages [Array<OpenAI::Models::Audio::TranscriptionLanguage>] The languages detected in the audio. Returned by `gpt-transcribe`. An empty arra
|
|
54
|
+
#
|
|
46
55
|
# @param logprobs [Array<OpenAI::Models::Audio::TranscriptionTextDoneEvent::Logprob>] The log probabilities of the individual tokens in the transcription. Only includ
|
|
47
56
|
#
|
|
48
57
|
# @param usage [OpenAI::Models::Audio::TranscriptionTextDoneEvent::Usage] Usage statistics for models billed by token usage.
|
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
|
6
6
|
extend OpenAI::Internal::Type::Enum
|
|
7
7
|
|
|
8
8
|
WHISPER_1 = :"whisper-1"
|
|
9
|
+
GPT_TRANSCRIBE = :"gpt-transcribe"
|
|
9
10
|
GPT_4O_TRANSCRIBE = :"gpt-4o-transcribe"
|
|
10
11
|
GPT_4O_MINI_TRANSCRIBE = :"gpt-4o-mini-transcribe"
|
|
11
12
|
GPT_4O_MINI_TRANSCRIBE_2025_12_15 = :"gpt-4o-mini-transcribe-2025-12-15"
|
|
@@ -204,7 +204,7 @@ module OpenAI
|
|
|
204
204
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
205
205
|
#
|
|
206
206
|
# @return [String, nil]
|
|
207
|
-
optional :prompt_cache_key, String
|
|
207
|
+
optional :prompt_cache_key, String, nil?: true
|
|
208
208
|
|
|
209
209
|
# @!attribute prompt_cache_options
|
|
210
210
|
# The prompt-caching options that were applied to the response. Supported for
|
|
@@ -257,7 +257,7 @@ module OpenAI
|
|
|
257
257
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
258
258
|
#
|
|
259
259
|
# @return [String, nil]
|
|
260
|
-
optional :safety_identifier, String
|
|
260
|
+
optional :safety_identifier, String, nil?: true
|
|
261
261
|
|
|
262
262
|
# @!attribute service_tier
|
|
263
263
|
# Specifies the processing type used for serving the request.
|
|
@@ -382,7 +382,7 @@ module OpenAI
|
|
|
382
382
|
#
|
|
383
383
|
# @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
384
384
|
#
|
|
385
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
385
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
386
386
|
#
|
|
387
387
|
# @param prompt_cache_options [OpenAI::Models::Beta::BetaResponse::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt
|
|
388
388
|
#
|
|
@@ -390,7 +390,7 @@ module OpenAI
|
|
|
390
390
|
#
|
|
391
391
|
# @param reasoning [OpenAI::Models::Beta::BetaResponse::Reasoning, nil] **gpt-5 and o-series models only**
|
|
392
392
|
#
|
|
393
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
393
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
394
394
|
#
|
|
395
395
|
# @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponse::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
396
396
|
#
|
|
@@ -1190,7 +1190,10 @@ module OpenAI
|
|
|
1190
1190
|
# @see OpenAI::Models::Beta::BetaResponse#reasoning
|
|
1191
1191
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1192
1192
|
# @!attribute context
|
|
1193
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1193
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1194
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1195
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1196
|
+
#
|
|
1194
1197
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1195
1198
|
# for the response.
|
|
1196
1199
|
#
|
|
@@ -1260,7 +1263,10 @@ module OpenAI
|
|
|
1260
1263
|
#
|
|
1261
1264
|
# @param summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
1262
1265
|
|
|
1263
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1266
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1267
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1268
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1269
|
+
#
|
|
1264
1270
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1265
1271
|
# for the response.
|
|
1266
1272
|
#
|
|
@@ -35,6 +35,7 @@ module OpenAI
|
|
|
35
35
|
SERVER_ERROR = :server_error
|
|
36
36
|
RATE_LIMIT_EXCEEDED = :rate_limit_exceeded
|
|
37
37
|
INVALID_PROMPT = :invalid_prompt
|
|
38
|
+
DATA_RESIDENCY_MISMATCH = :data_residency_mismatch
|
|
38
39
|
BIO_POLICY = :bio_policy
|
|
39
40
|
VECTOR_STORE_TIMEOUT = :vector_store_timeout
|
|
40
41
|
INVALID_IMAGE = :invalid_image
|
|
@@ -25,7 +25,8 @@ module OpenAI
|
|
|
25
25
|
# @!attribute verbosity
|
|
26
26
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
27
27
|
# more concise responses, while higher values will result in more verbose
|
|
28
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
28
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
29
|
+
# default is `medium`.
|
|
29
30
|
#
|
|
30
31
|
# @return [Symbol, OpenAI::Models::Beta::BetaResponseTextConfig::Verbosity, nil]
|
|
31
32
|
optional :verbosity, enum: -> { OpenAI::Beta::BetaResponseTextConfig::Verbosity }, nil?: true
|
|
@@ -46,7 +47,8 @@ module OpenAI
|
|
|
46
47
|
|
|
47
48
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
48
49
|
# more concise responses, while higher values will result in more verbose
|
|
49
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
50
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
51
|
+
# default is `medium`.
|
|
50
52
|
#
|
|
51
53
|
# @see OpenAI::Models::Beta::BetaResponseTextConfig#verbosity
|
|
52
54
|
module Verbosity
|
|
@@ -188,7 +188,7 @@ module OpenAI
|
|
|
188
188
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
189
189
|
#
|
|
190
190
|
# @return [String, nil]
|
|
191
|
-
optional :prompt_cache_key, String
|
|
191
|
+
optional :prompt_cache_key, String, nil?: true
|
|
192
192
|
|
|
193
193
|
# @!attribute prompt_cache_options
|
|
194
194
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -253,7 +253,7 @@ module OpenAI
|
|
|
253
253
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
254
254
|
#
|
|
255
255
|
# @return [String, nil]
|
|
256
|
-
optional :safety_identifier, String
|
|
256
|
+
optional :safety_identifier, String, nil?: true
|
|
257
257
|
|
|
258
258
|
# @!attribute service_tier
|
|
259
259
|
# Specifies the processing type used for serving the request.
|
|
@@ -443,7 +443,7 @@ module OpenAI
|
|
|
443
443
|
#
|
|
444
444
|
# @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
445
445
|
#
|
|
446
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
446
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
447
447
|
#
|
|
448
448
|
# @param prompt_cache_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
449
449
|
#
|
|
@@ -451,7 +451,7 @@ module OpenAI
|
|
|
451
451
|
#
|
|
452
452
|
# @param reasoning [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning, nil] **gpt-5 and o-series models only**
|
|
453
453
|
#
|
|
454
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
454
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
455
455
|
#
|
|
456
456
|
# @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
457
457
|
#
|
|
@@ -1102,7 +1102,10 @@ module OpenAI
|
|
|
1102
1102
|
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#reasoning
|
|
1103
1103
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1104
1104
|
# @!attribute context
|
|
1105
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1105
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1106
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1107
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1108
|
+
#
|
|
1106
1109
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1107
1110
|
# for the response.
|
|
1108
1111
|
#
|
|
@@ -1181,7 +1184,10 @@ module OpenAI
|
|
|
1181
1184
|
#
|
|
1182
1185
|
# @param summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
1183
1186
|
|
|
1184
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1187
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1188
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1189
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1190
|
+
#
|
|
1185
1191
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1186
1192
|
# for the response.
|
|
1187
1193
|
#
|
|
@@ -163,7 +163,7 @@ module OpenAI
|
|
|
163
163
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
164
164
|
#
|
|
165
165
|
# @return [String, nil]
|
|
166
|
-
optional :prompt_cache_key, String
|
|
166
|
+
optional :prompt_cache_key, String, nil?: true
|
|
167
167
|
|
|
168
168
|
# @!attribute prompt_cache_options
|
|
169
169
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -223,7 +223,7 @@ module OpenAI
|
|
|
223
223
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
224
224
|
#
|
|
225
225
|
# @return [String, nil]
|
|
226
|
-
optional :safety_identifier, String
|
|
226
|
+
optional :safety_identifier, String, nil?: true
|
|
227
227
|
|
|
228
228
|
# @!attribute service_tier
|
|
229
229
|
# Specifies the processing type used for serving the request.
|
|
@@ -392,7 +392,7 @@ module OpenAI
|
|
|
392
392
|
#
|
|
393
393
|
# @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
394
394
|
#
|
|
395
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
395
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
396
396
|
#
|
|
397
397
|
# @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
398
398
|
#
|
|
@@ -400,7 +400,7 @@ module OpenAI
|
|
|
400
400
|
#
|
|
401
401
|
# @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] **gpt-5 and o-series models only**
|
|
402
402
|
#
|
|
403
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
403
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
404
404
|
#
|
|
405
405
|
# @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
406
406
|
#
|
|
@@ -1027,7 +1027,10 @@ module OpenAI
|
|
|
1027
1027
|
|
|
1028
1028
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1029
1029
|
# @!attribute context
|
|
1030
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1030
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1031
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1032
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1033
|
+
#
|
|
1031
1034
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1032
1035
|
# for the response.
|
|
1033
1036
|
#
|
|
@@ -1097,7 +1100,10 @@ module OpenAI
|
|
|
1097
1100
|
#
|
|
1098
1101
|
# @param summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
1099
1102
|
|
|
1100
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1103
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1104
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1105
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1106
|
+
#
|
|
1101
1107
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1102
1108
|
# for the response.
|
|
1103
1109
|
#
|
|
@@ -214,7 +214,10 @@ module OpenAI
|
|
|
214
214
|
|
|
215
215
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
216
216
|
# @!attribute context
|
|
217
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
217
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
218
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
219
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
220
|
+
#
|
|
218
221
|
# When returned on a response, this is the effective reasoning context mode used
|
|
219
222
|
# for the response.
|
|
220
223
|
#
|
|
@@ -289,7 +292,10 @@ module OpenAI
|
|
|
289
292
|
#
|
|
290
293
|
# @param summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
291
294
|
|
|
292
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
295
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
296
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
297
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
298
|
+
#
|
|
293
299
|
# When returned on a response, this is the effective reasoning context mode used
|
|
294
300
|
# for the response.
|
|
295
301
|
#
|
|
@@ -419,7 +425,8 @@ module OpenAI
|
|
|
419
425
|
# @!attribute verbosity
|
|
420
426
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
421
427
|
# more concise responses, while higher values will result in more verbose
|
|
422
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
428
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
429
|
+
# default is `medium`.
|
|
423
430
|
#
|
|
424
431
|
# @return [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::Verbosity, nil]
|
|
425
432
|
optional :verbosity,
|
|
@@ -442,7 +449,8 @@ module OpenAI
|
|
|
442
449
|
|
|
443
450
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
444
451
|
# more concise responses, while higher values will result in more verbose
|
|
445
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
452
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
453
|
+
# default is `medium`.
|
|
446
454
|
#
|
|
447
455
|
# @see OpenAI::Models::Beta::Responses::InputTokenCountParams::Text#verbosity
|
|
448
456
|
module Verbosity
|
|
@@ -194,7 +194,7 @@ module OpenAI
|
|
|
194
194
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
195
195
|
#
|
|
196
196
|
# @return [String, nil]
|
|
197
|
-
optional :prompt_cache_key, String
|
|
197
|
+
optional :prompt_cache_key, String, nil?: true
|
|
198
198
|
|
|
199
199
|
# @!attribute prompt_cache_options
|
|
200
200
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -271,7 +271,7 @@ module OpenAI
|
|
|
271
271
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
272
272
|
#
|
|
273
273
|
# @return [String, nil]
|
|
274
|
-
optional :safety_identifier, String
|
|
274
|
+
optional :safety_identifier, String, nil?: true
|
|
275
275
|
|
|
276
276
|
# @!attribute seed
|
|
277
277
|
# @deprecated
|
|
@@ -401,7 +401,8 @@ module OpenAI
|
|
|
401
401
|
# @!attribute verbosity
|
|
402
402
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
403
403
|
# more concise responses, while higher values will result in more verbose
|
|
404
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
404
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
405
|
+
# default is `medium`.
|
|
405
406
|
#
|
|
406
407
|
# @return [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil]
|
|
407
408
|
optional :verbosity, enum: -> { OpenAI::Chat::CompletionCreateParams::Verbosity }, nil?: true
|
|
@@ -452,7 +453,7 @@ module OpenAI
|
|
|
452
453
|
#
|
|
453
454
|
# @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
454
455
|
#
|
|
455
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
456
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
456
457
|
#
|
|
457
458
|
# @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
458
459
|
#
|
|
@@ -462,7 +463,7 @@ module OpenAI
|
|
|
462
463
|
#
|
|
463
464
|
# @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output.
|
|
464
465
|
#
|
|
465
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
466
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
466
467
|
#
|
|
467
468
|
# @param seed [Integer, nil] This feature is in Beta.
|
|
468
469
|
#
|
|
@@ -894,7 +895,8 @@ module OpenAI
|
|
|
894
895
|
|
|
895
896
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
896
897
|
# more concise responses, while higher values will result in more verbose
|
|
897
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
898
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
899
|
+
# default is `medium`.
|
|
898
900
|
module Verbosity
|
|
899
901
|
extend OpenAI::Internal::Type::Enum
|
|
900
902
|
|
|
@@ -12,6 +12,13 @@ module OpenAI
|
|
|
12
12
|
# @return [Symbol, OpenAI::Models::Realtime::AudioTranscription::Delay, nil]
|
|
13
13
|
optional :delay, enum: -> { OpenAI::Realtime::AudioTranscription::Delay }
|
|
14
14
|
|
|
15
|
+
# @!attribute keywords
|
|
16
|
+
# Words or phrases to guide transcription of the input audio. Supported by
|
|
17
|
+
# `gpt-transcribe` and `gpt-live-transcribe`.
|
|
18
|
+
#
|
|
19
|
+
# @return [Array<String>, nil]
|
|
20
|
+
optional :keywords, OpenAI::Internal::Type::ArrayOf[String]
|
|
21
|
+
|
|
15
22
|
# @!attribute language
|
|
16
23
|
# The language of the input audio. Supplying the input language in
|
|
17
24
|
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
|
@@ -20,11 +27,20 @@ module OpenAI
|
|
|
20
27
|
# @return [String, nil]
|
|
21
28
|
optional :language, String
|
|
22
29
|
|
|
30
|
+
# @!attribute languages
|
|
31
|
+
# Possible languages of the input audio, in
|
|
32
|
+
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
33
|
+
# Supported by `gpt-transcribe` and `gpt-live-transcribe`.
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<String>, nil]
|
|
36
|
+
optional :languages, OpenAI::Internal::Type::ArrayOf[String]
|
|
37
|
+
|
|
23
38
|
# @!attribute model
|
|
24
39
|
# The model to use for transcription. Current options are `whisper-1`,
|
|
25
|
-
# `gpt-
|
|
26
|
-
# `gpt-4o-transcribe`, `gpt-4o-transcribe
|
|
27
|
-
#
|
|
40
|
+
# `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`,
|
|
41
|
+
# `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
|
42
|
+
# `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
|
43
|
+
# `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
|
28
44
|
#
|
|
29
45
|
# @return [String, Symbol, OpenAI::Models::Realtime::AudioTranscription::Model, nil]
|
|
30
46
|
optional :model, union: -> { OpenAI::Realtime::AudioTranscription::Model }
|
|
@@ -40,15 +56,19 @@ module OpenAI
|
|
|
40
56
|
# @return [String, nil]
|
|
41
57
|
optional :prompt, String
|
|
42
58
|
|
|
43
|
-
# @!method initialize(delay: nil, language: nil, model: nil, prompt: nil)
|
|
59
|
+
# @!method initialize(delay: nil, keywords: nil, language: nil, languages: nil, model: nil, prompt: nil)
|
|
44
60
|
# Some parameter documentations has been truncated, see
|
|
45
61
|
# {OpenAI::Models::Realtime::AudioTranscription} for more details.
|
|
46
62
|
#
|
|
47
63
|
# @param delay [Symbol, OpenAI::Models::Realtime::AudioTranscription::Delay] Controls how long the model waits before emitting transcription text.
|
|
48
64
|
#
|
|
65
|
+
# @param keywords [Array<String>] Words or phrases to guide transcription of the input audio. Supported by `gpt-tr
|
|
66
|
+
#
|
|
49
67
|
# @param language [String] The language of the input audio. Supplying the input language in
|
|
50
68
|
#
|
|
51
|
-
# @param
|
|
69
|
+
# @param languages [Array<String>] Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/w
|
|
70
|
+
#
|
|
71
|
+
# @param model [String, Symbol, OpenAI::Models::Realtime::AudioTranscription::Model] The model to use for transcription. Current options are `whisper-1`, `gpt-transc
|
|
52
72
|
#
|
|
53
73
|
# @param prompt [String] An optional text to guide the model's style or continue a previous audio
|
|
54
74
|
|
|
@@ -71,9 +91,10 @@ module OpenAI
|
|
|
71
91
|
end
|
|
72
92
|
|
|
73
93
|
# The model to use for transcription. Current options are `whisper-1`,
|
|
74
|
-
# `gpt-
|
|
75
|
-
# `gpt-4o-transcribe`, `gpt-4o-transcribe
|
|
76
|
-
#
|
|
94
|
+
# `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`,
|
|
95
|
+
# `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
|
96
|
+
# `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
|
97
|
+
# `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
|
77
98
|
#
|
|
78
99
|
# @see OpenAI::Models::Realtime::AudioTranscription#model
|
|
79
100
|
module Model
|
|
@@ -83,6 +104,10 @@ module OpenAI
|
|
|
83
104
|
|
|
84
105
|
variant const: -> { OpenAI::Models::Realtime::AudioTranscription::Model::WHISPER_1 }
|
|
85
106
|
|
|
107
|
+
variant const: -> { OpenAI::Models::Realtime::AudioTranscription::Model::GPT_TRANSCRIBE }
|
|
108
|
+
|
|
109
|
+
variant const: -> { OpenAI::Models::Realtime::AudioTranscription::Model::GPT_LIVE_TRANSCRIBE }
|
|
110
|
+
|
|
86
111
|
variant const: -> { OpenAI::Models::Realtime::AudioTranscription::Model::GPT_4O_MINI_TRANSCRIBE }
|
|
87
112
|
|
|
88
113
|
variant const: -> { OpenAI::Models::Realtime::AudioTranscription::Model::GPT_4O_MINI_TRANSCRIBE_2025_12_15 }
|
|
@@ -103,6 +128,8 @@ module OpenAI
|
|
|
103
128
|
# @!group
|
|
104
129
|
|
|
105
130
|
WHISPER_1 = :"whisper-1"
|
|
131
|
+
GPT_TRANSCRIBE = :"gpt-transcribe"
|
|
132
|
+
GPT_LIVE_TRANSCRIBE = :"gpt-live-transcribe"
|
|
106
133
|
GPT_4O_MINI_TRANSCRIBE = :"gpt-4o-mini-transcribe"
|
|
107
134
|
GPT_4O_MINI_TRANSCRIBE_2025_12_15 = :"gpt-4o-mini-transcribe-2025-12-15"
|
|
108
135
|
GPT_4O_TRANSCRIBE = :"gpt-4o-transcribe"
|
data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb
CHANGED
|
@@ -42,6 +42,13 @@ module OpenAI
|
|
|
42
42
|
required :usage,
|
|
43
43
|
union: -> { OpenAI::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage }
|
|
44
44
|
|
|
45
|
+
# @!attribute languages
|
|
46
|
+
# The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
47
|
+
# array indicates that no language could be reliably detected.
|
|
48
|
+
#
|
|
49
|
+
# @return [Array<OpenAI::Models::Audio::TranscriptionLanguage>, nil]
|
|
50
|
+
optional :languages, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Audio::TranscriptionLanguage] }
|
|
51
|
+
|
|
45
52
|
# @!attribute logprobs
|
|
46
53
|
# The log probabilities of the transcription.
|
|
47
54
|
#
|
|
@@ -50,7 +57,7 @@ module OpenAI
|
|
|
50
57
|
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Realtime::LogProbProperties] },
|
|
51
58
|
nil?: true
|
|
52
59
|
|
|
53
|
-
# @!method initialize(content_index:, event_id:, item_id:, transcript:, usage:, logprobs: nil, type: :"conversation.item.input_audio_transcription.completed")
|
|
60
|
+
# @!method initialize(content_index:, event_id:, item_id:, transcript:, usage:, languages: nil, logprobs: nil, type: :"conversation.item.input_audio_transcription.completed")
|
|
54
61
|
# Some parameter documentations has been truncated, see
|
|
55
62
|
# {OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent}
|
|
56
63
|
# for more details.
|
|
@@ -76,6 +83,8 @@ module OpenAI
|
|
|
76
83
|
#
|
|
77
84
|
# @param usage [OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens, OpenAI::Models::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageDuration] Usage statistics for the transcription, this is billed according to the ASR mode
|
|
78
85
|
#
|
|
86
|
+
# @param languages [Array<OpenAI::Models::Audio::TranscriptionLanguage>] The languages detected in the audio. Returned by `gpt-transcribe`. An empty arra
|
|
87
|
+
#
|
|
79
88
|
# @param logprobs [Array<OpenAI::Models::Realtime::LogProbProperties>, nil] The log probabilities of the transcription.
|
|
80
89
|
#
|
|
81
90
|
# @param type [Symbol, :"conversation.item.input_audio_transcription.completed"] The event type, must be
|
|
@@ -4,7 +4,10 @@ module OpenAI
|
|
|
4
4
|
module Models
|
|
5
5
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute context
|
|
7
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
7
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
8
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
9
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
10
|
+
#
|
|
8
11
|
# When returned on a response, this is the effective reasoning context mode used
|
|
9
12
|
# for the response.
|
|
10
13
|
#
|
|
@@ -72,7 +75,10 @@ module OpenAI
|
|
|
72
75
|
#
|
|
73
76
|
# @param summary [Symbol, OpenAI::Models::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
74
77
|
|
|
75
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
78
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
79
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
80
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
81
|
+
#
|
|
76
82
|
# When returned on a response, this is the effective reasoning context mode used
|
|
77
83
|
# for the response.
|
|
78
84
|
#
|