openai 0.22.1 → 0.23.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.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/realtime/audio_transcription.rb +60 -0
  5. data/lib/openai/models/realtime/client_secret_create_params.rb +18 -9
  6. data/lib/openai/models/realtime/client_secret_create_response.rb +11 -250
  7. data/lib/openai/models/realtime/conversation_item.rb +1 -1
  8. data/lib/openai/models/realtime/conversation_item_added.rb +14 -1
  9. data/lib/openai/models/realtime/conversation_item_done.rb +3 -0
  10. data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +10 -8
  11. data/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb +14 -5
  12. data/lib/openai/models/realtime/conversation_item_truncate_event.rb +2 -2
  13. data/lib/openai/models/realtime/input_audio_buffer_append_event.rb +10 -5
  14. data/lib/openai/models/realtime/models.rb +58 -0
  15. data/lib/openai/models/realtime/noise_reduction_type.rb +20 -0
  16. data/lib/openai/models/realtime/realtime_audio_config.rb +6 -427
  17. data/lib/openai/models/realtime/realtime_audio_config_input.rb +89 -0
  18. data/lib/openai/models/realtime/realtime_audio_config_output.rb +100 -0
  19. data/lib/openai/models/realtime/realtime_audio_formats.rb +121 -0
  20. data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +131 -0
  21. data/lib/openai/models/realtime/realtime_client_event.rb +31 -23
  22. data/lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb +43 -10
  23. data/lib/openai/models/realtime/realtime_conversation_item_function_call.rb +16 -7
  24. data/lib/openai/models/realtime/realtime_conversation_item_function_call_output.rb +15 -7
  25. data/lib/openai/models/realtime/realtime_conversation_item_system_message.rb +18 -6
  26. data/lib/openai/models/realtime/realtime_conversation_item_user_message.rb +62 -13
  27. data/lib/openai/models/realtime/realtime_response.rb +117 -107
  28. data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +100 -0
  29. data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +310 -0
  30. data/lib/openai/models/realtime/realtime_response_create_params.rb +225 -0
  31. data/lib/openai/models/realtime/realtime_response_status.rb +1 -1
  32. data/lib/openai/models/realtime/realtime_response_usage.rb +5 -2
  33. data/lib/openai/models/realtime/realtime_response_usage_input_token_details.rb +58 -8
  34. data/lib/openai/models/realtime/realtime_server_event.rb +21 -5
  35. data/lib/openai/models/realtime/realtime_session.rb +9 -125
  36. data/lib/openai/models/realtime/realtime_session_client_secret.rb +36 -0
  37. data/lib/openai/models/realtime/realtime_session_create_request.rb +50 -71
  38. data/lib/openai/models/realtime/realtime_session_create_response.rb +621 -219
  39. data/lib/openai/models/realtime/realtime_tools_config_union.rb +2 -53
  40. data/lib/openai/models/realtime/realtime_tracing_config.rb +7 -6
  41. data/lib/openai/models/realtime/realtime_transcription_session_audio.rb +19 -0
  42. data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +90 -0
  43. data/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +131 -0
  44. data/lib/openai/models/realtime/realtime_transcription_session_client_secret.rb +38 -0
  45. data/lib/openai/models/realtime/realtime_transcription_session_create_request.rb +12 -270
  46. data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +78 -0
  47. data/lib/openai/models/realtime/realtime_transcription_session_input_audio_transcription.rb +66 -0
  48. data/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb +57 -0
  49. data/lib/openai/models/realtime/realtime_truncation.rb +8 -40
  50. data/lib/openai/models/realtime/realtime_truncation_retention_ratio.rb +34 -0
  51. data/lib/openai/models/realtime/response_cancel_event.rb +3 -1
  52. data/lib/openai/models/realtime/response_create_event.rb +18 -348
  53. data/lib/openai/models/realtime/response_done_event.rb +7 -0
  54. data/lib/openai/models/realtime/session_created_event.rb +20 -4
  55. data/lib/openai/models/realtime/session_update_event.rb +36 -12
  56. data/lib/openai/models/realtime/session_updated_event.rb +20 -4
  57. data/lib/openai/models/realtime/transcription_session_created.rb +8 -243
  58. data/lib/openai/models/realtime/transcription_session_update.rb +179 -3
  59. data/lib/openai/models/realtime/transcription_session_updated_event.rb +8 -243
  60. data/lib/openai/resources/realtime/client_secrets.rb +2 -3
  61. data/lib/openai/version.rb +1 -1
  62. data/lib/openai.rb +19 -1
  63. data/rbi/openai/models/realtime/audio_transcription.rbi +132 -0
  64. data/rbi/openai/models/realtime/client_secret_create_params.rbi +25 -11
  65. data/rbi/openai/models/realtime/client_secret_create_response.rbi +2 -587
  66. data/rbi/openai/models/realtime/conversation_item_added.rbi +14 -1
  67. data/rbi/openai/models/realtime/conversation_item_done.rbi +3 -0
  68. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +11 -8
  69. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbi +15 -5
  70. data/rbi/openai/models/realtime/conversation_item_truncate_event.rbi +2 -2
  71. data/rbi/openai/models/realtime/input_audio_buffer_append_event.rbi +10 -5
  72. data/rbi/openai/models/realtime/models.rbi +97 -0
  73. data/rbi/openai/models/realtime/noise_reduction_type.rbi +31 -0
  74. data/rbi/openai/models/realtime/realtime_audio_config.rbi +8 -956
  75. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +221 -0
  76. data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +222 -0
  77. data/rbi/openai/models/realtime/realtime_audio_formats.rbi +329 -0
  78. data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +262 -0
  79. data/rbi/openai/models/realtime/realtime_conversation_item_assistant_message.rbi +51 -10
  80. data/rbi/openai/models/realtime/realtime_conversation_item_function_call.rbi +16 -7
  81. data/rbi/openai/models/realtime/realtime_conversation_item_function_call_output.rbi +14 -7
  82. data/rbi/openai/models/realtime/realtime_conversation_item_system_message.rbi +16 -6
  83. data/rbi/openai/models/realtime/realtime_conversation_item_user_message.rbi +110 -12
  84. data/rbi/openai/models/realtime/realtime_response.rbi +287 -212
  85. data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +250 -0
  86. data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +616 -0
  87. data/rbi/openai/models/realtime/realtime_response_create_params.rbi +529 -0
  88. data/rbi/openai/models/realtime/realtime_response_usage.rbi +8 -2
  89. data/rbi/openai/models/realtime/realtime_response_usage_input_token_details.rbi +106 -7
  90. data/rbi/openai/models/realtime/realtime_server_event.rbi +4 -1
  91. data/rbi/openai/models/realtime/realtime_session.rbi +12 -262
  92. data/rbi/openai/models/realtime/realtime_session_client_secret.rbi +49 -0
  93. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +112 -133
  94. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +1229 -405
  95. data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +1 -117
  96. data/rbi/openai/models/realtime/realtime_tracing_config.rbi +11 -10
  97. data/rbi/openai/models/realtime/realtime_transcription_session_audio.rbi +50 -0
  98. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +226 -0
  99. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbi +259 -0
  100. data/rbi/openai/models/realtime/realtime_transcription_session_client_secret.rbi +51 -0
  101. data/rbi/openai/models/realtime/realtime_transcription_session_create_request.rbi +25 -597
  102. data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +195 -0
  103. data/rbi/openai/models/realtime/realtime_transcription_session_input_audio_transcription.rbi +144 -0
  104. data/rbi/openai/models/realtime/realtime_transcription_session_turn_detection.rbi +94 -0
  105. data/rbi/openai/models/realtime/realtime_truncation.rbi +5 -56
  106. data/rbi/openai/models/realtime/realtime_truncation_retention_ratio.rbi +45 -0
  107. data/rbi/openai/models/realtime/response_cancel_event.rbi +3 -1
  108. data/rbi/openai/models/realtime/response_create_event.rbi +19 -786
  109. data/rbi/openai/models/realtime/response_done_event.rbi +7 -0
  110. data/rbi/openai/models/realtime/session_created_event.rbi +42 -9
  111. data/rbi/openai/models/realtime/session_update_event.rbi +57 -19
  112. data/rbi/openai/models/realtime/session_updated_event.rbi +42 -9
  113. data/rbi/openai/models/realtime/transcription_session_created.rbi +17 -591
  114. data/rbi/openai/models/realtime/transcription_session_update.rbi +425 -7
  115. data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +14 -591
  116. data/rbi/openai/resources/realtime/client_secrets.rbi +5 -3
  117. data/sig/openai/models/realtime/audio_transcription.rbs +57 -0
  118. data/sig/openai/models/realtime/client_secret_create_response.rbs +1 -251
  119. data/sig/openai/models/realtime/models.rbs +57 -0
  120. data/sig/openai/models/realtime/noise_reduction_type.rbs +16 -0
  121. data/sig/openai/models/realtime/realtime_audio_config.rbs +12 -331
  122. data/sig/openai/models/realtime/realtime_audio_config_input.rbs +72 -0
  123. data/sig/openai/models/realtime/realtime_audio_config_output.rbs +72 -0
  124. data/sig/openai/models/realtime/realtime_audio_formats.rbs +128 -0
  125. data/sig/openai/models/realtime/realtime_audio_input_turn_detection.rbs +99 -0
  126. data/sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs +17 -2
  127. data/sig/openai/models/realtime/realtime_conversation_item_user_message.rbs +30 -1
  128. data/sig/openai/models/realtime/realtime_response.rbs +103 -82
  129. data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +84 -0
  130. data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +218 -0
  131. data/sig/openai/models/realtime/realtime_response_create_params.rbs +148 -0
  132. data/sig/openai/models/realtime/realtime_response_usage_input_token_details.rbs +50 -1
  133. data/sig/openai/models/realtime/realtime_session.rbs +16 -106
  134. data/sig/openai/models/realtime/realtime_session_client_secret.rbs +20 -0
  135. data/sig/openai/models/realtime/realtime_session_create_request.rbs +27 -43
  136. data/sig/openai/models/realtime/realtime_session_create_response.rbs +389 -187
  137. data/sig/openai/models/realtime/realtime_tools_config_union.rbs +1 -53
  138. data/sig/openai/models/realtime/realtime_transcription_session_audio.rbs +24 -0
  139. data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +72 -0
  140. data/sig/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbs +99 -0
  141. data/sig/openai/models/realtime/realtime_transcription_session_client_secret.rbs +20 -0
  142. data/sig/openai/models/realtime/realtime_transcription_session_create_request.rbs +11 -203
  143. data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +69 -0
  144. data/sig/openai/models/realtime/realtime_transcription_session_input_audio_transcription.rbs +59 -0
  145. data/sig/openai/models/realtime/realtime_transcription_session_turn_detection.rbs +47 -0
  146. data/sig/openai/models/realtime/realtime_truncation.rbs +1 -28
  147. data/sig/openai/models/realtime/realtime_truncation_retention_ratio.rbs +21 -0
  148. data/sig/openai/models/realtime/response_create_event.rbs +6 -249
  149. data/sig/openai/models/realtime/session_created_event.rbs +14 -4
  150. data/sig/openai/models/realtime/session_update_event.rbs +14 -4
  151. data/sig/openai/models/realtime/session_updated_event.rbs +14 -4
  152. data/sig/openai/models/realtime/transcription_session_created.rbs +4 -254
  153. data/sig/openai/models/realtime/transcription_session_update.rbs +154 -4
  154. data/sig/openai/models/realtime/transcription_session_updated_event.rbs +4 -254
  155. metadata +59 -5
  156. data/lib/openai/models/realtime/realtime_client_secret_config.rb +0 -64
  157. data/rbi/openai/models/realtime/realtime_client_secret_config.rbi +0 -147
  158. data/sig/openai/models/realtime/realtime_client_secret_config.rbs +0 -60
@@ -11,7 +11,8 @@ module OpenAI
11
11
  required :call_id, String
12
12
 
13
13
  # @!attribute output
14
- # The output of the function call.
14
+ # The output of the function call, this is free text and can contain any
15
+ # information or simply be empty.
15
16
  #
16
17
  # @return [String]
17
18
  required :output, String
@@ -23,13 +24,15 @@ module OpenAI
23
24
  required :type, const: :function_call_output
24
25
 
25
26
  # @!attribute id
26
- # The unique ID of the item.
27
+ # The unique ID of the item. This may be provided by the client or generated by
28
+ # the server.
27
29
  #
28
30
  # @return [String, nil]
29
31
  optional :id, String
30
32
 
31
33
  # @!attribute object
32
- # Identifier for the API object being returned - always `realtime.item`.
34
+ # Identifier for the API object being returned - always `realtime.item`. Optional
35
+ # when creating a new item.
33
36
  #
34
37
  # @return [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Object, nil]
35
38
  optional :object, enum: -> { OpenAI::Realtime::RealtimeConversationItemFunctionCallOutput::Object }
@@ -41,21 +44,26 @@ module OpenAI
41
44
  optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemFunctionCallOutput::Status }
42
45
 
43
46
  # @!method initialize(call_id:, output:, id: nil, object: nil, status: nil, type: :function_call_output)
47
+ # Some parameter documentations has been truncated, see
48
+ # {OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput} for more
49
+ # details.
50
+ #
44
51
  # A function call output item in a Realtime conversation.
45
52
  #
46
53
  # @param call_id [String] The ID of the function call this output is for.
47
54
  #
48
- # @param output [String] The output of the function call.
55
+ # @param output [String] The output of the function call, this is free text and can contain any informati
49
56
  #
50
- # @param id [String] The unique ID of the item.
57
+ # @param id [String] The unique ID of the item. This may be provided by the client or generated by th
51
58
  #
52
- # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Object] Identifier for the API object being returned - always `realtime.item`.
59
+ # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Object] Identifier for the API object being returned - always `realtime.item`. Optional
53
60
  #
54
61
  # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput::Status] The status of the item. Has no effect on the conversation.
55
62
  #
56
63
  # @param type [Symbol, :function_call_output] The type of the item. Always `function_call_output`.
57
64
 
58
- # Identifier for the API object being returned - always `realtime.item`.
65
+ # Identifier for the API object being returned - always `realtime.item`. Optional
66
+ # when creating a new item.
59
67
  #
60
68
  # @see OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput#object
61
69
  module Object
@@ -24,13 +24,15 @@ module OpenAI
24
24
  required :type, const: :message
25
25
 
26
26
  # @!attribute id
27
- # The unique ID of the item.
27
+ # The unique ID of the item. This may be provided by the client or generated by
28
+ # the server.
28
29
  #
29
30
  # @return [String, nil]
30
31
  optional :id, String
31
32
 
32
33
  # @!attribute object
33
- # Identifier for the API object being returned - always `realtime.item`.
34
+ # Identifier for the API object being returned - always `realtime.item`. Optional
35
+ # when creating a new item.
34
36
  #
35
37
  # @return [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Object, nil]
36
38
  optional :object, enum: -> { OpenAI::Realtime::RealtimeConversationItemSystemMessage::Object }
@@ -42,13 +44,22 @@ module OpenAI
42
44
  optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemSystemMessage::Status }
43
45
 
44
46
  # @!method initialize(content:, id: nil, object: nil, status: nil, role: :system, type: :message)
45
- # A system message item in a Realtime conversation.
47
+ # Some parameter documentations has been truncated, see
48
+ # {OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage} for more
49
+ # details.
50
+ #
51
+ # A system message in a Realtime conversation can be used to provide additional
52
+ # context or instructions to the model. This is similar but distinct from the
53
+ # instruction prompt provided at the start of a conversation, as system messages
54
+ # can be added at any point in the conversation. For major changes to the
55
+ # conversation's behavior, use instructions, but for smaller updates (e.g. "the
56
+ # user is now asking about a different topic"), use system messages.
46
57
  #
47
58
  # @param content [Array<OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Content>] The content of the message.
48
59
  #
49
- # @param id [String] The unique ID of the item.
60
+ # @param id [String] The unique ID of the item. This may be provided by the client or generated by th
50
61
  #
51
- # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Object] Identifier for the API object being returned - always `realtime.item`.
62
+ # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Object] Identifier for the API object being returned - always `realtime.item`. Optional
52
63
  #
53
64
  # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage::Status] The status of the item. Has no effect on the conversation.
54
65
  #
@@ -87,7 +98,8 @@ module OpenAI
87
98
  end
88
99
  end
89
100
 
90
- # Identifier for the API object being returned - always `realtime.item`.
101
+ # Identifier for the API object being returned - always `realtime.item`. Optional
102
+ # when creating a new item.
91
103
  #
92
104
  # @see OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage#object
93
105
  module Object
@@ -24,13 +24,15 @@ module OpenAI
24
24
  required :type, const: :message
25
25
 
26
26
  # @!attribute id
27
- # The unique ID of the item.
27
+ # The unique ID of the item. This may be provided by the client or generated by
28
+ # the server.
28
29
  #
29
30
  # @return [String, nil]
30
31
  optional :id, String
31
32
 
32
33
  # @!attribute object
33
- # Identifier for the API object being returned - always `realtime.item`.
34
+ # Identifier for the API object being returned - always `realtime.item`. Optional
35
+ # when creating a new item.
34
36
  #
35
37
  # @return [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Object, nil]
36
38
  optional :object, enum: -> { OpenAI::Realtime::RealtimeConversationItemUserMessage::Object }
@@ -42,13 +44,17 @@ module OpenAI
42
44
  optional :status, enum: -> { OpenAI::Realtime::RealtimeConversationItemUserMessage::Status }
43
45
 
44
46
  # @!method initialize(content:, id: nil, object: nil, status: nil, role: :user, type: :message)
47
+ # Some parameter documentations has been truncated, see
48
+ # {OpenAI::Models::Realtime::RealtimeConversationItemUserMessage} for more
49
+ # details.
50
+ #
45
51
  # A user message item in a Realtime conversation.
46
52
  #
47
53
  # @param content [Array<OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content>] The content of the message.
48
54
  #
49
- # @param id [String] The unique ID of the item.
55
+ # @param id [String] The unique ID of the item. This may be provided by the client or generated by th
50
56
  #
51
- # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Object] Identifier for the API object being returned - always `realtime.item`.
57
+ # @param object [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Object] Identifier for the API object being returned - always `realtime.item`. Optional
52
58
  #
53
59
  # @param status [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Status] The status of the item. Has no effect on the conversation.
54
60
  #
@@ -58,11 +64,28 @@ module OpenAI
58
64
 
59
65
  class Content < OpenAI::Internal::Type::BaseModel
60
66
  # @!attribute audio
61
- # Base64-encoded audio bytes (for `input_audio`).
67
+ # Base64-encoded audio bytes (for `input_audio`), these will be parsed as the
68
+ # format specified in the session input audio type configuration. This defaults to
69
+ # PCM 16-bit 24kHz mono if not specified.
62
70
  #
63
71
  # @return [String, nil]
64
72
  optional :audio, String
65
73
 
74
+ # @!attribute detail
75
+ # The detail level of the image (for `input_image`). `auto` will default to
76
+ # `high`.
77
+ #
78
+ # @return [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Detail, nil]
79
+ optional :detail, enum: -> { OpenAI::Realtime::RealtimeConversationItemUserMessage::Content::Detail }
80
+
81
+ # @!attribute image_url
82
+ # Base64-encoded image bytes (for `input_image`) as a data URI. For example
83
+ # `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG
84
+ # and JPEG.
85
+ #
86
+ # @return [String, nil]
87
+ optional :image_url, String
88
+
66
89
  # @!attribute text
67
90
  # The text content (for `input_text`).
68
91
  #
@@ -70,27 +93,51 @@ module OpenAI
70
93
  optional :text, String
71
94
 
72
95
  # @!attribute transcript
73
- # Transcript of the audio (for `input_audio`).
96
+ # Transcript of the audio (for `input_audio`). This is not sent to the model, but
97
+ # will be attached to the message item for reference.
74
98
  #
75
99
  # @return [String, nil]
76
100
  optional :transcript, String
77
101
 
78
102
  # @!attribute type
79
- # The content type (`input_text` or `input_audio`).
103
+ # The content type (`input_text`, `input_audio`, or `input_image`).
80
104
  #
81
105
  # @return [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Type, nil]
82
106
  optional :type, enum: -> { OpenAI::Realtime::RealtimeConversationItemUserMessage::Content::Type }
83
107
 
84
- # @!method initialize(audio: nil, text: nil, transcript: nil, type: nil)
85
- # @param audio [String] Base64-encoded audio bytes (for `input_audio`).
108
+ # @!method initialize(audio: nil, detail: nil, image_url: nil, text: nil, transcript: nil, type: nil)
109
+ # Some parameter documentations has been truncated, see
110
+ # {OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content} for
111
+ # more details.
112
+ #
113
+ # @param audio [String] Base64-encoded audio bytes (for `input_audio`), these will be parsed as the form
114
+ #
115
+ # @param detail [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Detail] The detail level of the image (for `input_image`). `auto` will default to `high`
116
+ #
117
+ # @param image_url [String] Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:
86
118
  #
87
119
  # @param text [String] The text content (for `input_text`).
88
120
  #
89
- # @param transcript [String] Transcript of the audio (for `input_audio`).
121
+ # @param transcript [String] Transcript of the audio (for `input_audio`). This is not sent to the model, but
90
122
  #
91
- # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Type] The content type (`input_text` or `input_audio`).
123
+ # @param type [Symbol, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content::Type] The content type (`input_text`, `input_audio`, or `input_image`).
124
+
125
+ # The detail level of the image (for `input_image`). `auto` will default to
126
+ # `high`.
127
+ #
128
+ # @see OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content#detail
129
+ module Detail
130
+ extend OpenAI::Internal::Type::Enum
131
+
132
+ AUTO = :auto
133
+ LOW = :low
134
+ HIGH = :high
135
+
136
+ # @!method self.values
137
+ # @return [Array<Symbol>]
138
+ end
92
139
 
93
- # The content type (`input_text` or `input_audio`).
140
+ # The content type (`input_text`, `input_audio`, or `input_image`).
94
141
  #
95
142
  # @see OpenAI::Models::Realtime::RealtimeConversationItemUserMessage::Content#type
96
143
  module Type
@@ -98,13 +145,15 @@ module OpenAI
98
145
 
99
146
  INPUT_TEXT = :input_text
100
147
  INPUT_AUDIO = :input_audio
148
+ INPUT_IMAGE = :input_image
101
149
 
102
150
  # @!method self.values
103
151
  # @return [Array<Symbol>]
104
152
  end
105
153
  end
106
154
 
107
- # Identifier for the API object being returned - always `realtime.item`.
155
+ # Identifier for the API object being returned - always `realtime.item`. Optional
156
+ # when creating a new item.
108
157
  #
109
158
  # @see OpenAI::Models::Realtime::RealtimeConversationItemUserMessage#object
110
159
  module Object
@@ -5,19 +5,24 @@ module OpenAI
5
5
  module Realtime
6
6
  class RealtimeResponse < OpenAI::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # The unique ID of the response.
8
+ # The unique ID of the response, will look like `resp_1234`.
9
9
  #
10
10
  # @return [String, nil]
11
11
  optional :id, String
12
12
 
13
+ # @!attribute audio
14
+ # Configuration for audio output.
15
+ #
16
+ # @return [OpenAI::Models::Realtime::RealtimeResponse::Audio, nil]
17
+ optional :audio, -> { OpenAI::Realtime::RealtimeResponse::Audio }
18
+
13
19
  # @!attribute conversation_id
14
20
  # Which conversation the response is added to, determined by the `conversation`
15
21
  # field in the `response.create` event. If `auto`, the response will be added to
16
22
  # the default conversation and the value of `conversation_id` will be an id like
17
23
  # `conv_1234`. If `none`, the response will not be added to any conversation and
18
24
  # the value of `conversation_id` will be `null`. If responses are being triggered
19
- # by server VAD, the response will be added to the default conversation, thus the
20
- # `conversation_id` will be an id like `conv_1234`.
25
+ # automatically by VAD the response will be added to the default conversation
21
26
  #
22
27
  # @return [String, nil]
23
28
  optional :conversation_id, String
@@ -40,15 +45,6 @@ module OpenAI
40
45
  # @return [Hash{Symbol=>String}, nil]
41
46
  optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
42
47
 
43
- # @!attribute modalities
44
- # The set of modalities the model used to respond. If there are multiple
45
- # modalities, the model will pick one, for example if `modalities` is
46
- # `["text", "audio"]`, the model could be responding in either text or audio.
47
- #
48
- # @return [Array<Symbol, OpenAI::Models::Realtime::RealtimeResponse::Modality>, nil]
49
- optional :modalities,
50
- -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Realtime::RealtimeResponse::Modality] }
51
-
52
48
  # @!attribute object
53
49
  # The object type, must be `realtime.response`.
54
50
  #
@@ -61,11 +57,15 @@ module OpenAI
61
57
  # @return [Array<OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest>, nil]
62
58
  optional :output, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Realtime::ConversationItem] }
63
59
 
64
- # @!attribute output_audio_format
65
- # The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
60
+ # @!attribute output_modalities
61
+ # The set of modalities the model used to respond, currently the only possible
62
+ # values are `[\"audio\"]`, `[\"text\"]`. Audio output always include a text
63
+ # transcript. Setting the output to mode `text` will disable audio output from the
64
+ # model.
66
65
  #
67
- # @return [Symbol, OpenAI::Models::Realtime::RealtimeResponse::OutputAudioFormat, nil]
68
- optional :output_audio_format, enum: -> { OpenAI::Realtime::RealtimeResponse::OutputAudioFormat }
66
+ # @return [Array<Symbol, OpenAI::Models::Realtime::RealtimeResponse::OutputModality>, nil]
67
+ optional :output_modalities,
68
+ -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Realtime::RealtimeResponse::OutputModality] }
69
69
 
70
70
  # @!attribute status
71
71
  # The final status of the response (`completed`, `cancelled`, `failed`, or
@@ -80,12 +80,6 @@ module OpenAI
80
80
  # @return [OpenAI::Models::Realtime::RealtimeResponseStatus, nil]
81
81
  optional :status_details, -> { OpenAI::Realtime::RealtimeResponseStatus }
82
82
 
83
- # @!attribute temperature
84
- # Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.
85
- #
86
- # @return [Float, nil]
87
- optional :temperature, Float
88
-
89
83
  # @!attribute usage
90
84
  # Usage statistics for the Response, this will correspond to billing. A Realtime
91
85
  # API session will maintain a conversation context and append new Items to the
@@ -95,20 +89,15 @@ module OpenAI
95
89
  # @return [OpenAI::Models::Realtime::RealtimeResponseUsage, nil]
96
90
  optional :usage, -> { OpenAI::Realtime::RealtimeResponseUsage }
97
91
 
98
- # @!attribute voice
99
- # The voice the model used to respond. Current voice options are `alloy`, `ash`,
100
- # `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
101
- #
102
- # @return [String, Symbol, OpenAI::Models::Realtime::RealtimeResponse::Voice, nil]
103
- optional :voice, union: -> { OpenAI::Realtime::RealtimeResponse::Voice }
104
-
105
- # @!method initialize(id: nil, conversation_id: nil, max_output_tokens: nil, metadata: nil, modalities: nil, object: nil, output: nil, output_audio_format: nil, status: nil, status_details: nil, temperature: nil, usage: nil, voice: nil)
92
+ # @!method initialize(id: nil, audio: nil, conversation_id: nil, max_output_tokens: nil, metadata: nil, object: nil, output: nil, output_modalities: nil, status: nil, status_details: nil, usage: nil)
106
93
  # Some parameter documentations has been truncated, see
107
94
  # {OpenAI::Models::Realtime::RealtimeResponse} for more details.
108
95
  #
109
96
  # The response resource.
110
97
  #
111
- # @param id [String] The unique ID of the response.
98
+ # @param id [String] The unique ID of the response, will look like `resp_1234`.
99
+ #
100
+ # @param audio [OpenAI::Models::Realtime::RealtimeResponse::Audio] Configuration for audio output.
112
101
  #
113
102
  # @param conversation_id [String] Which conversation the response is added to, determined by the `conversation`
114
103
  #
@@ -116,23 +105,110 @@ module OpenAI
116
105
  #
117
106
  # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
118
107
  #
119
- # @param modalities [Array<Symbol, OpenAI::Models::Realtime::RealtimeResponse::Modality>] The set of modalities the model used to respond. If there are multiple modalitie
120
- #
121
108
  # @param object [Symbol, OpenAI::Models::Realtime::RealtimeResponse::Object] The object type, must be `realtime.response`.
122
109
  #
123
110
  # @param output [Array<OpenAI::Models::Realtime::RealtimeConversationItemSystemMessage, OpenAI::Models::Realtime::RealtimeConversationItemUserMessage, OpenAI::Models::Realtime::RealtimeConversationItemAssistantMessage, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCall, OpenAI::Models::Realtime::RealtimeConversationItemFunctionCallOutput, OpenAI::Models::Realtime::RealtimeMcpApprovalResponse, OpenAI::Models::Realtime::RealtimeMcpListTools, OpenAI::Models::Realtime::RealtimeMcpToolCall, OpenAI::Models::Realtime::RealtimeMcpApprovalRequest>] The list of output items generated by the response.
124
111
  #
125
- # @param output_audio_format [Symbol, OpenAI::Models::Realtime::RealtimeResponse::OutputAudioFormat] The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
112
+ # @param output_modalities [Array<Symbol, OpenAI::Models::Realtime::RealtimeResponse::OutputModality>] The set of modalities the model used to respond, currently the only possible val
126
113
  #
127
114
  # @param status [Symbol, OpenAI::Models::Realtime::RealtimeResponse::Status] The final status of the response (`completed`, `cancelled`, `failed`, or
128
115
  #
129
116
  # @param status_details [OpenAI::Models::Realtime::RealtimeResponseStatus] Additional details about the status.
130
117
  #
131
- # @param temperature [Float] Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.
132
- #
133
118
  # @param usage [OpenAI::Models::Realtime::RealtimeResponseUsage] Usage statistics for the Response, this will correspond to billing. A
134
- #
135
- # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponse::Voice] The voice the model used to respond.
119
+
120
+ # @see OpenAI::Models::Realtime::RealtimeResponse#audio
121
+ class Audio < OpenAI::Internal::Type::BaseModel
122
+ # @!attribute output
123
+ #
124
+ # @return [OpenAI::Models::Realtime::RealtimeResponse::Audio::Output, nil]
125
+ optional :output, -> { OpenAI::Realtime::RealtimeResponse::Audio::Output }
126
+
127
+ # @!method initialize(output: nil)
128
+ # Configuration for audio output.
129
+ #
130
+ # @param output [OpenAI::Models::Realtime::RealtimeResponse::Audio::Output]
131
+
132
+ # @see OpenAI::Models::Realtime::RealtimeResponse::Audio#output
133
+ class Output < OpenAI::Internal::Type::BaseModel
134
+ # @!attribute format_
135
+ # The format of the output audio.
136
+ #
137
+ # @return [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA, nil]
138
+ optional :format_, union: -> { OpenAI::Realtime::RealtimeAudioFormats }, api_name: :format
139
+
140
+ # @!attribute voice
141
+ # The voice the model uses to respond. Voice cannot be changed during the session
142
+ # once the model has responded with audio at least once. Current voice options are
143
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
144
+ # and `cedar`. We recommend `marin` and `cedar` for best quality.
145
+ #
146
+ # @return [String, Symbol, OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice, nil]
147
+ optional :voice, union: -> { OpenAI::Realtime::RealtimeResponse::Audio::Output::Voice }
148
+
149
+ # @!method initialize(format_: nil, voice: nil)
150
+ # Some parameter documentations has been truncated, see
151
+ # {OpenAI::Models::Realtime::RealtimeResponse::Audio::Output} for more details.
152
+ #
153
+ # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the output audio.
154
+ #
155
+ # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice] The voice the model uses to respond. Voice cannot be changed during the
156
+
157
+ # The voice the model uses to respond. Voice cannot be changed during the session
158
+ # once the model has responded with audio at least once. Current voice options are
159
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
160
+ # and `cedar`. We recommend `marin` and `cedar` for best quality.
161
+ #
162
+ # @see OpenAI::Models::Realtime::RealtimeResponse::Audio::Output#voice
163
+ module Voice
164
+ extend OpenAI::Internal::Type::Union
165
+
166
+ variant String
167
+
168
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::ALLOY }
169
+
170
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::ASH }
171
+
172
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::BALLAD }
173
+
174
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::CORAL }
175
+
176
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::ECHO }
177
+
178
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::SAGE }
179
+
180
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::SHIMMER }
181
+
182
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::VERSE }
183
+
184
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::MARIN }
185
+
186
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Audio::Output::Voice::CEDAR }
187
+
188
+ # @!method self.variants
189
+ # @return [Array(String, Symbol)]
190
+
191
+ define_sorbet_constant!(:Variants) do
192
+ T.type_alias { T.any(String, OpenAI::Realtime::RealtimeResponse::Audio::Output::Voice::TaggedSymbol) }
193
+ end
194
+
195
+ # @!group
196
+
197
+ ALLOY = :alloy
198
+ ASH = :ash
199
+ BALLAD = :ballad
200
+ CORAL = :coral
201
+ ECHO = :echo
202
+ SAGE = :sage
203
+ SHIMMER = :shimmer
204
+ VERSE = :verse
205
+ MARIN = :marin
206
+ CEDAR = :cedar
207
+
208
+ # @!endgroup
209
+ end
210
+ end
211
+ end
136
212
 
137
213
  # Maximum number of output tokens for a single assistant response, inclusive of
138
214
  # tool calls, that was used in this response.
@@ -149,16 +225,6 @@ module OpenAI
149
225
  # @return [Array(Integer, Symbol, :inf)]
150
226
  end
151
227
 
152
- module Modality
153
- extend OpenAI::Internal::Type::Enum
154
-
155
- TEXT = :text
156
- AUDIO = :audio
157
-
158
- # @!method self.values
159
- # @return [Array<Symbol>]
160
- end
161
-
162
228
  # The object type, must be `realtime.response`.
163
229
  #
164
230
  # @see OpenAI::Models::Realtime::RealtimeResponse#object
@@ -171,15 +237,11 @@ module OpenAI
171
237
  # @return [Array<Symbol>]
172
238
  end
173
239
 
174
- # The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
175
- #
176
- # @see OpenAI::Models::Realtime::RealtimeResponse#output_audio_format
177
- module OutputAudioFormat
240
+ module OutputModality
178
241
  extend OpenAI::Internal::Type::Enum
179
242
 
180
- PCM16 = :pcm16
181
- G711_ULAW = :g711_ulaw
182
- G711_ALAW = :g711_alaw
243
+ TEXT = :text
244
+ AUDIO = :audio
183
245
 
184
246
  # @!method self.values
185
247
  # @return [Array<Symbol>]
@@ -201,58 +263,6 @@ module OpenAI
201
263
  # @!method self.values
202
264
  # @return [Array<Symbol>]
203
265
  end
204
-
205
- # The voice the model used to respond. Current voice options are `alloy`, `ash`,
206
- # `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
207
- #
208
- # @see OpenAI::Models::Realtime::RealtimeResponse#voice
209
- module Voice
210
- extend OpenAI::Internal::Type::Union
211
-
212
- variant String
213
-
214
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::ALLOY }
215
-
216
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::ASH }
217
-
218
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::BALLAD }
219
-
220
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::CORAL }
221
-
222
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::ECHO }
223
-
224
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::SAGE }
225
-
226
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::SHIMMER }
227
-
228
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::VERSE }
229
-
230
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::MARIN }
231
-
232
- variant const: -> { OpenAI::Models::Realtime::RealtimeResponse::Voice::CEDAR }
233
-
234
- # @!method self.variants
235
- # @return [Array(String, Symbol)]
236
-
237
- define_sorbet_constant!(:Variants) do
238
- T.type_alias { T.any(String, OpenAI::Realtime::RealtimeResponse::Voice::TaggedSymbol) }
239
- end
240
-
241
- # @!group
242
-
243
- ALLOY = :alloy
244
- ASH = :ash
245
- BALLAD = :ballad
246
- CORAL = :coral
247
- ECHO = :echo
248
- SAGE = :sage
249
- SHIMMER = :shimmer
250
- VERSE = :verse
251
- MARIN = :marin
252
- CEDAR = :cedar
253
-
254
- # @!endgroup
255
- end
256
266
  end
257
267
  end
258
268
  end
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Realtime
6
+ class RealtimeResponseCreateAudioOutput < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute output
8
+ #
9
+ # @return [OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output, nil]
10
+ optional :output, -> { OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output }
11
+
12
+ # @!method initialize(output: nil)
13
+ # Configuration for audio input and output.
14
+ #
15
+ # @param output [OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output]
16
+
17
+ # @see OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput#output
18
+ class Output < OpenAI::Internal::Type::BaseModel
19
+ # @!attribute format_
20
+ # The format of the output audio.
21
+ #
22
+ # @return [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA, nil]
23
+ optional :format_, union: -> { OpenAI::Realtime::RealtimeAudioFormats }, api_name: :format
24
+
25
+ # @!attribute voice
26
+ # The voice the model uses to respond. Voice cannot be changed during the session
27
+ # once the model has responded with audio at least once. Current voice options are
28
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
29
+ # and `cedar`. We recommend `marin` and `cedar` for best quality.
30
+ #
31
+ # @return [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice, nil]
32
+ optional :voice, union: -> { OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice }
33
+
34
+ # @!method initialize(format_: nil, voice: nil)
35
+ # Some parameter documentations has been truncated, see
36
+ # {OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output} for more
37
+ # details.
38
+ #
39
+ # @param format_ [OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCM, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMU, OpenAI::Models::Realtime::RealtimeAudioFormats::AudioPCMA] The format of the output audio.
40
+ #
41
+ # @param voice [String, Symbol, OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice] The voice the model uses to respond. Voice cannot be changed during the
42
+
43
+ # The voice the model uses to respond. Voice cannot be changed during the session
44
+ # once the model has responded with audio at least once. Current voice options are
45
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
46
+ # and `cedar`. We recommend `marin` and `cedar` for best quality.
47
+ #
48
+ # @see OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output#voice
49
+ module Voice
50
+ extend OpenAI::Internal::Type::Union
51
+
52
+ variant String
53
+
54
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ALLOY }
55
+
56
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ASH }
57
+
58
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::BALLAD }
59
+
60
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::CORAL }
61
+
62
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ECHO }
63
+
64
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::SAGE }
65
+
66
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::SHIMMER }
67
+
68
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::VERSE }
69
+
70
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::MARIN }
71
+
72
+ variant const: -> { OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::CEDAR }
73
+
74
+ # @!method self.variants
75
+ # @return [Array(String, Symbol)]
76
+
77
+ define_sorbet_constant!(:Variants) do
78
+ T.type_alias { T.any(String, OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::TaggedSymbol) }
79
+ end
80
+
81
+ # @!group
82
+
83
+ ALLOY = :alloy
84
+ ASH = :ash
85
+ BALLAD = :ballad
86
+ CORAL = :coral
87
+ ECHO = :echo
88
+ SAGE = :sage
89
+ SHIMMER = :shimmer
90
+ VERSE = :verse
91
+ MARIN = :marin
92
+ CEDAR = :cedar
93
+
94
+ # @!endgroup
95
+ end
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end