openai 0.88.0 → 0.89.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 +12 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +91 -1
- data/lib/openai/models/beta/beta_response_item.rb +93 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +91 -1
- data/lib/openai/models/conversations/conversation_item.rb +91 -1
- data/lib/openai/models/live/audio_format.rb +109 -0
- data/lib/openai/models/live/built_in_voice.rb +38 -0
- data/lib/openai/models/live/client_config.rb +22 -0
- data/lib/openai/models/live/client_delegation.rb +22 -0
- data/lib/openai/models/live/client_event.rb +54 -0
- data/lib/openai/models/live/commentary_append_event.rb +59 -0
- data/lib/openai/models/live/commentary_appended_event.rb +65 -0
- data/lib/openai/models/live/custom_voice.rb +17 -0
- data/lib/openai/models/live/data_channel_config.rb +81 -0
- data/lib/openai/models/live/delegation_created_event.rb +140 -0
- data/lib/openai/models/live/error.rb +60 -0
- data/lib/openai/models/live/error_event.rb +52 -0
- data/lib/openai/models/live/fork_client_event.rb +53 -0
- data/lib/openai/models/live/fork_server_event.rb +295 -0
- data/lib/openai/models/live/fork_session_config.rb +107 -0
- data/lib/openai/models/live/fork_session_start_event.rb +48 -0
- data/lib/openai/models/live/function_tool.rb +60 -0
- data/lib/openai/models/live/info_event.rb +60 -0
- data/lib/openai/models/live/initial_item.rb +419 -0
- data/lib/openai/models/live/input_audio_append_event.rb +50 -0
- data/lib/openai/models/live/input_audio_mute_event.rb +33 -0
- data/lib/openai/models/live/input_audio_muted_event.rb +42 -0
- data/lib/openai/models/live/input_audio_unmute_event.rb +33 -0
- data/lib/openai/models/live/input_audio_unmuted_event.rb +42 -0
- data/lib/openai/models/live/input_transcript_delta_event.rb +76 -0
- data/lib/openai/models/live/instructions_append_event.rb +57 -0
- data/lib/openai/models/live/instructions_appended_event.rb +65 -0
- data/lib/openai/models/live/live_create_params.rb +57 -0
- data/lib/openai/models/live/live_create_response.rb +77 -0
- data/lib/openai/models/live/media_session_config.rb +227 -0
- data/lib/openai/models/live/media_session_fork_config.rb +75 -0
- data/lib/openai/models/live/output_audio_delta_event.rb +58 -0
- data/lib/openai/models/live/output_transcript_delta_event.rb +76 -0
- data/lib/openai/models/live/response_create_event.rb +33 -0
- data/lib/openai/models/live/response_event.rb +67 -0
- data/lib/openai/models/live/response_item_create_event.rb +44 -0
- data/lib/openai/models/live/responses_delegation_config.rb +332 -0
- data/lib/openai/models/live/responses_delegation_update_config.rb +332 -0
- data/lib/openai/models/live/server_event.rb +295 -0
- data/lib/openai/models/live/server_event_selector.rb +32 -0
- data/lib/openai/models/live/session_accept_params.rb +257 -0
- data/lib/openai/models/live/session_close_event.rb +33 -0
- data/lib/openai/models/live/session_closed_event.rb +113 -0
- data/lib/openai/models/live/session_config.rb +236 -0
- data/lib/openai/models/live/session_download_recording_params.rb +27 -0
- data/lib/openai/models/live/session_fork_params.rb +66 -0
- data/lib/openai/models/live/session_fork_response.rb +77 -0
- data/lib/openai/models/live/session_hangup_params.rb +22 -0
- data/lib/openai/models/live/session_refer_params.rb +34 -0
- data/lib/openai/models/live/session_reject_params.rb +32 -0
- data/lib/openai/models/live/session_resource.rb +268 -0
- data/lib/openai/models/live/session_start_event.rb +46 -0
- data/lib/openai/models/live/session_started_event.rb +51 -0
- data/lib/openai/models/live/session_update_config.rb +69 -0
- data/lib/openai/models/live/session_update_event.rb +46 -0
- data/lib/openai/models/live/session_updated_event.rb +51 -0
- data/lib/openai/models/live/session_usage.rb +24 -0
- data/lib/openai/models/live/session_usage_updated_event.rb +81 -0
- data/lib/openai/models/live/thinking_append_event.rb +59 -0
- data/lib/openai/models/live/thinking_appended_event.rb +65 -0
- data/lib/openai/models/responses/response_input_item.rb +91 -1
- data/lib/openai/models/responses/response_item.rb +93 -1
- data/lib/openai/models/responses/response_output_item.rb +91 -1
- data/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +12 -7
- data/lib/openai/models/webhooks/live_transport_incoming_webhook_event.rb +137 -0
- data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +4 -4
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +9 -2
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/live/forks.rb +16 -0
- data/lib/openai/resources/live/sessions.rb +180 -0
- data/lib/openai/resources/live/sideband.rb +16 -0
- data/lib/openai/resources/live.rb +54 -0
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +65 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +109 -0
- data/rbi/openai/models/beta/beta_response_item.rbi +105 -0
- data/rbi/openai/models/beta/beta_response_output_item.rbi +119 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +133 -0
- data/rbi/openai/models/live/audio_format.rbi +185 -0
- data/rbi/openai/models/live/built_in_voice.rbi +46 -0
- data/rbi/openai/models/live/client_config.rbi +54 -0
- data/rbi/openai/models/live/client_delegation.rbi +51 -0
- data/rbi/openai/models/live/client_event.rbi +41 -0
- data/rbi/openai/models/live/commentary_append_event.rbi +88 -0
- data/rbi/openai/models/live/commentary_appended_event.rbi +97 -0
- data/rbi/openai/models/live/custom_voice.rbi +46 -0
- data/rbi/openai/models/live/data_channel_config.rbi +119 -0
- data/rbi/openai/models/live/delegation_created_event.rbi +207 -0
- data/rbi/openai/models/live/error.rbi +95 -0
- data/rbi/openai/models/live/error_event.rbi +87 -0
- data/rbi/openai/models/live/fork_client_event.rbi +40 -0
- data/rbi/openai/models/live/fork_server_event.rbi +436 -0
- data/rbi/openai/models/live/fork_session_config.rbi +234 -0
- data/rbi/openai/models/live/fork_session_start_event.rbi +80 -0
- data/rbi/openai/models/live/function_tool.rbi +95 -0
- data/rbi/openai/models/live/info_event.rbi +92 -0
- data/rbi/openai/models/live/initial_item.rbi +661 -0
- data/rbi/openai/models/live/input_audio_append_event.rbi +79 -0
- data/rbi/openai/models/live/input_audio_mute_event.rbi +62 -0
- data/rbi/openai/models/live/input_audio_muted_event.rbi +74 -0
- data/rbi/openai/models/live/input_audio_unmute_event.rbi +62 -0
- data/rbi/openai/models/live/input_audio_unmuted_event.rbi +74 -0
- data/rbi/openai/models/live/input_transcript_delta_event.rbi +115 -0
- data/rbi/openai/models/live/instructions_append_event.rbi +86 -0
- data/rbi/openai/models/live/instructions_appended_event.rbi +97 -0
- data/rbi/openai/models/live/live_create_params.rbi +121 -0
- data/rbi/openai/models/live/live_create_response.rbi +160 -0
- data/rbi/openai/models/live/media_session_config.rbi +390 -0
- data/rbi/openai/models/live/media_session_fork_config.rbi +143 -0
- data/rbi/openai/models/live/output_audio_delta_event.rbi +93 -0
- data/rbi/openai/models/live/output_transcript_delta_event.rbi +115 -0
- data/rbi/openai/models/live/response_create_event.rbi +62 -0
- data/rbi/openai/models/live/response_event.rbi +105 -0
- data/rbi/openai/models/live/response_item_create_event.rbi +183 -0
- data/rbi/openai/models/live/responses_delegation_config.rbi +562 -0
- data/rbi/openai/models/live/responses_delegation_update_config.rbi +585 -0
- data/rbi/openai/models/live/server_event.rbi +436 -0
- data/rbi/openai/models/live/server_event_selector.rbi +64 -0
- data/rbi/openai/models/live/session_accept_params.rbi +451 -0
- data/rbi/openai/models/live/session_close_event.rbi +62 -0
- data/rbi/openai/models/live/session_closed_event.rbi +148 -0
- data/rbi/openai/models/live/session_config.rbi +427 -0
- data/rbi/openai/models/live/session_download_recording_params.rbi +57 -0
- data/rbi/openai/models/live/session_fork_params.rbi +131 -0
- data/rbi/openai/models/live/session_fork_response.rbi +160 -0
- data/rbi/openai/models/live/session_hangup_params.rbi +53 -0
- data/rbi/openai/models/live/session_refer_params.rbi +64 -0
- data/rbi/openai/models/live/session_reject_params.rbi +62 -0
- data/rbi/openai/models/live/session_resource.rbi +461 -0
- data/rbi/openai/models/live/session_start_event.rbi +78 -0
- data/rbi/openai/models/live/session_started_event.rbi +86 -0
- data/rbi/openai/models/live/session_update_config.rbi +134 -0
- data/rbi/openai/models/live/session_update_event.rbi +78 -0
- data/rbi/openai/models/live/session_updated_event.rbi +86 -0
- data/rbi/openai/models/live/session_usage.rbi +53 -0
- data/rbi/openai/models/live/session_usage_updated_event.rbi +148 -0
- data/rbi/openai/models/live/thinking_append_event.rbi +88 -0
- data/rbi/openai/models/live/thinking_appended_event.rbi +97 -0
- data/rbi/openai/models/responses/response_input_item.rbi +113 -0
- data/rbi/openai/models/responses/response_item.rbi +105 -0
- data/rbi/openai/models/responses/response_output_item.rbi +125 -0
- data/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +11 -7
- data/rbi/openai/models/webhooks/live_transport_incoming_webhook_event.rbi +226 -0
- data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +4 -4
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/live/forks.rbi +19 -0
- data/rbi/openai/resources/live/sessions.rbi +110 -0
- data/rbi/openai/resources/live/sideband.rbi +19 -0
- data/rbi/openai/resources/live.rbi +43 -0
- data/rbi/openai/resources/responses.rbi +75 -38
- data/rbi/openai/resources/webhooks.rbi +1 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +56 -0
- data/sig/openai/models/beta/beta_response_item.rbs +56 -0
- data/sig/openai/models/beta/beta_response_output_item.rbs +56 -0
- data/sig/openai/models/conversations/conversation_item.rbs +56 -0
- data/sig/openai/models/live/audio_format.rbs +73 -0
- data/sig/openai/models/live/built_in_voice.rbs +58 -0
- data/sig/openai/models/live/client_config.rbs +15 -0
- data/sig/openai/models/live/client_delegation.rbs +15 -0
- data/sig/openai/models/live/client_event.rbs +24 -0
- data/sig/openai/models/live/commentary_append_event.rbs +37 -0
- data/sig/openai/models/live/commentary_appended_event.rbs +44 -0
- data/sig/openai/models/live/custom_voice.rbs +15 -0
- data/sig/openai/models/live/data_channel_config.rbs +56 -0
- data/sig/openai/models/live/delegation_created_event.rbs +89 -0
- data/sig/openai/models/live/error.rbs +46 -0
- data/sig/openai/models/live/error_event.rbs +39 -0
- data/sig/openai/models/live/fork_client_event.rbs +24 -0
- data/sig/openai/models/live/fork_server_event.rbs +212 -0
- data/sig/openai/models/live/fork_session_config.rbs +89 -0
- data/sig/openai/models/live/fork_session_start_event.rbs +32 -0
- data/sig/openai/models/live/function_tool.rbs +42 -0
- data/sig/openai/models/live/info_event.rbs +44 -0
- data/sig/openai/models/live/initial_item.rbs +332 -0
- data/sig/openai/models/live/input_audio_append_event.rbs +32 -0
- data/sig/openai/models/live/input_audio_mute_event.rbs +24 -0
- data/sig/openai/models/live/input_audio_muted_event.rbs +34 -0
- data/sig/openai/models/live/input_audio_unmute_event.rbs +24 -0
- data/sig/openai/models/live/input_audio_unmuted_event.rbs +34 -0
- data/sig/openai/models/live/input_transcript_delta_event.rbs +49 -0
- data/sig/openai/models/live/instructions_append_event.rbs +37 -0
- data/sig/openai/models/live/instructions_appended_event.rbs +44 -0
- data/sig/openai/models/live/live_create_params.rbs +45 -0
- data/sig/openai/models/live/live_create_response.rbs +49 -0
- data/sig/openai/models/live/media_session_config.rbs +157 -0
- data/sig/openai/models/live/media_session_fork_config.rbs +66 -0
- data/sig/openai/models/live/output_audio_delta_event.rbs +41 -0
- data/sig/openai/models/live/output_transcript_delta_event.rbs +49 -0
- data/sig/openai/models/live/response_create_event.rbs +18 -0
- data/sig/openai/models/live/response_event.rbs +44 -0
- data/sig/openai/models/live/response_item_create_event.rbs +32 -0
- data/sig/openai/models/live/responses_delegation_config.rbs +244 -0
- data/sig/openai/models/live/responses_delegation_update_config.rbs +246 -0
- data/sig/openai/models/live/server_event.rbs +212 -0
- data/sig/openai/models/live/server_event_selector.rbs +19 -0
- data/sig/openai/models/live/session_accept_params.rbs +185 -0
- data/sig/openai/models/live/session_close_event.rbs +17 -0
- data/sig/openai/models/live/session_closed_event.rbs +68 -0
- data/sig/openai/models/live/session_config.rbs +168 -0
- data/sig/openai/models/live/session_download_recording_params.rbs +25 -0
- data/sig/openai/models/live/session_fork_params.rbs +54 -0
- data/sig/openai/models/live/session_fork_response.rbs +49 -0
- data/sig/openai/models/live/session_hangup_params.rbs +25 -0
- data/sig/openai/models/live/session_refer_params.rbs +33 -0
- data/sig/openai/models/live/session_reject_params.rbs +33 -0
- data/sig/openai/models/live/session_resource.rbs +183 -0
- data/sig/openai/models/live/session_start_event.rbs +32 -0
- data/sig/openai/models/live/session_started_event.rbs +39 -0
- data/sig/openai/models/live/session_update_config.rbs +56 -0
- data/sig/openai/models/live/session_update_event.rbs +32 -0
- data/sig/openai/models/live/session_updated_event.rbs +39 -0
- data/sig/openai/models/live/session_usage.rbs +15 -0
- data/sig/openai/models/live/session_usage_updated_event.rbs +58 -0
- data/sig/openai/models/live/thinking_append_event.rbs +37 -0
- data/sig/openai/models/live/thinking_appended_event.rbs +44 -0
- data/sig/openai/models/responses/response_input_item.rbs +56 -0
- data/sig/openai/models/responses/response_item.rbs +56 -0
- data/sig/openai/models/responses/response_output_item.rbs +56 -0
- data/sig/openai/models/webhooks/live_transport_incoming_webhook_event.rbs +95 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/live/forks.rbs +9 -0
- data/sig/openai/resources/live/sessions.rbs +44 -0
- data/sig/openai/resources/live/sideband.rbs +9 -0
- data/sig/openai/resources/live.rbs +19 -0
- data/sig/openai/resources/webhooks.rbs +1 -0
- metadata +196 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class InputTranscriptDeltaEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute delta
|
|
8
|
+
# The transcript text fragment for the audio in this time range. Append fragments
|
|
9
|
+
# in delivery order to build the transcript.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :delta, String
|
|
13
|
+
|
|
14
|
+
# @!attribute end_ms
|
|
15
|
+
# The end of this event on the Live session timeline, in milliseconds from the
|
|
16
|
+
# beginning of the session. For appended context, this can equal start_ms.
|
|
17
|
+
#
|
|
18
|
+
# @return [Integer]
|
|
19
|
+
required :end_ms, Integer
|
|
20
|
+
|
|
21
|
+
# @!attribute event_id
|
|
22
|
+
# The unique ID of the Live server event.
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :event_id, String
|
|
26
|
+
|
|
27
|
+
# @!attribute start_ms
|
|
28
|
+
# The start of this event on the Live session timeline, in milliseconds from the
|
|
29
|
+
# beginning of the session.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer]
|
|
32
|
+
required :start_ms, Integer
|
|
33
|
+
|
|
34
|
+
# @!attribute type
|
|
35
|
+
# The event type, always `session.input_transcript.delta`.
|
|
36
|
+
#
|
|
37
|
+
# @return [Symbol, :"session.input_transcript.delta"]
|
|
38
|
+
required :type, const: :"session.input_transcript.delta"
|
|
39
|
+
|
|
40
|
+
# @!attribute client_event_id
|
|
41
|
+
# The event_id of the client command associated with this server event, when
|
|
42
|
+
# supplied.
|
|
43
|
+
#
|
|
44
|
+
# @return [String, nil]
|
|
45
|
+
optional :client_event_id, String
|
|
46
|
+
|
|
47
|
+
# @!method initialize(delta:, end_ms:, event_id:, start_ms:, client_event_id: nil, type: :"session.input_transcript.delta")
|
|
48
|
+
# A transcript fragment for user input audio in the Live session. Accumulate
|
|
49
|
+
# fragments in delivery order; these events do not define complete turns or
|
|
50
|
+
# include a transcript-done event.
|
|
51
|
+
#
|
|
52
|
+
# @param delta [String]
|
|
53
|
+
# The transcript text fragment for the audio in this time range. Append fragments
|
|
54
|
+
# in delivery order to build the transcript.
|
|
55
|
+
#
|
|
56
|
+
# @param end_ms [Integer]
|
|
57
|
+
# The end of this event on the Live session timeline, in milliseconds from the
|
|
58
|
+
# beginning of the session. For appended context, this can equal start_ms.
|
|
59
|
+
#
|
|
60
|
+
# @param event_id [String]
|
|
61
|
+
# The unique ID of the Live server event.
|
|
62
|
+
#
|
|
63
|
+
# @param start_ms [Integer]
|
|
64
|
+
# The start of this event on the Live session timeline, in milliseconds from the
|
|
65
|
+
# beginning of the session.
|
|
66
|
+
#
|
|
67
|
+
# @param client_event_id [String]
|
|
68
|
+
# The event_id of the client command associated with this server event, when
|
|
69
|
+
# supplied.
|
|
70
|
+
#
|
|
71
|
+
# @param type [Symbol, :"session.input_transcript.delta"]
|
|
72
|
+
# The event type, always `session.input_transcript.delta`.
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class InstructionsAppendEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
# Instruction text to append, limited to 500 tokens. This is a plain string, not
|
|
9
|
+
# an array of content parts.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :content, String
|
|
13
|
+
|
|
14
|
+
# @!attribute delegation_id
|
|
15
|
+
# Required, nullable. Set null for general session context, or use the ID from
|
|
16
|
+
# session.delegation.created for an existing client delegation. Non-null IDs are
|
|
17
|
+
# not accepted with Responses delegation.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
required :delegation_id, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute type
|
|
23
|
+
# The Live client event type. Always `session.instructions.append`.
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, :"session.instructions.append"]
|
|
26
|
+
required :type, const: :"session.instructions.append"
|
|
27
|
+
|
|
28
|
+
# @!attribute event_id
|
|
29
|
+
# Optional client identifier for correlating this command with a server event's
|
|
30
|
+
# client_event_id or error.client_event_id.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :event_id, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!method initialize(content:, delegation_id:, event_id: nil, type: :"session.instructions.append")
|
|
36
|
+
# Append instructions to the Live conversation while it is running, optionally
|
|
37
|
+
# associating them with an existing client delegation.
|
|
38
|
+
#
|
|
39
|
+
# @param content [String]
|
|
40
|
+
# Instruction text to append, limited to 500 tokens. This is a plain string, not
|
|
41
|
+
# an array of content parts.
|
|
42
|
+
#
|
|
43
|
+
# @param delegation_id [String, nil]
|
|
44
|
+
# Required, nullable. Set null for general session context, or use the ID from
|
|
45
|
+
# session.delegation.created for an existing client delegation. Non-null IDs are
|
|
46
|
+
# not accepted with Responses delegation.
|
|
47
|
+
#
|
|
48
|
+
# @param event_id [String, nil]
|
|
49
|
+
# Optional client identifier for correlating this command with a server event's
|
|
50
|
+
# client_event_id or error.client_event_id.
|
|
51
|
+
#
|
|
52
|
+
# @param type [Symbol, :"session.instructions.append"]
|
|
53
|
+
# The Live client event type. Always `session.instructions.append`.
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class InstructionsAppendedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute end_ms
|
|
8
|
+
# The end of this event on the Live session timeline, in milliseconds from the
|
|
9
|
+
# beginning of the session. For appended context, this can equal start_ms.
|
|
10
|
+
#
|
|
11
|
+
# @return [Integer]
|
|
12
|
+
required :end_ms, Integer
|
|
13
|
+
|
|
14
|
+
# @!attribute event_id
|
|
15
|
+
# The unique ID of the Live server event.
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :event_id, String
|
|
19
|
+
|
|
20
|
+
# @!attribute start_ms
|
|
21
|
+
# The start of this event on the Live session timeline, in milliseconds from the
|
|
22
|
+
# beginning of the session.
|
|
23
|
+
#
|
|
24
|
+
# @return [Integer]
|
|
25
|
+
required :start_ms, Integer
|
|
26
|
+
|
|
27
|
+
# @!attribute type
|
|
28
|
+
# The event type, always `session.instructions.appended`.
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, :"session.instructions.appended"]
|
|
31
|
+
required :type, const: :"session.instructions.appended"
|
|
32
|
+
|
|
33
|
+
# @!attribute client_event_id
|
|
34
|
+
# The event_id of the client command associated with this server event, when
|
|
35
|
+
# supplied.
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :client_event_id, String
|
|
39
|
+
|
|
40
|
+
# @!method initialize(end_ms:, event_id:, start_ms:, client_event_id: nil, type: :"session.instructions.appended")
|
|
41
|
+
# Returned when a session.instructions.append command is accepted into the Live
|
|
42
|
+
# session timeline. Acknowledges the appended instructions without guaranteeing
|
|
43
|
+
# that the model has acted on them.
|
|
44
|
+
#
|
|
45
|
+
# @param end_ms [Integer]
|
|
46
|
+
# The end of this event on the Live session timeline, in milliseconds from the
|
|
47
|
+
# beginning of the session. For appended context, this can equal start_ms.
|
|
48
|
+
#
|
|
49
|
+
# @param event_id [String]
|
|
50
|
+
# The unique ID of the Live server event.
|
|
51
|
+
#
|
|
52
|
+
# @param start_ms [Integer]
|
|
53
|
+
# The start of this event on the Live session timeline, in milliseconds from the
|
|
54
|
+
# beginning of the session.
|
|
55
|
+
#
|
|
56
|
+
# @param client_event_id [String]
|
|
57
|
+
# The event_id of the client command associated with this server event, when
|
|
58
|
+
# supplied.
|
|
59
|
+
#
|
|
60
|
+
# @param type [Symbol, :"session.instructions.appended"]
|
|
61
|
+
# The event type, always `session.instructions.appended`.
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
# @see OpenAI::Resources::Live#create
|
|
7
|
+
class LiveCreateParams < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute session
|
|
12
|
+
# Startup configuration for the Live session.
|
|
13
|
+
#
|
|
14
|
+
# @return [OpenAI::Models::Live::MediaSessionConfig]
|
|
15
|
+
required :session, -> { OpenAI::Live::MediaSessionConfig }
|
|
16
|
+
|
|
17
|
+
# @!attribute transport
|
|
18
|
+
# WebRTC transport with the browser's SDP offer.
|
|
19
|
+
#
|
|
20
|
+
# @return [OpenAI::Models::Live::LiveCreateParams::Transport]
|
|
21
|
+
required :transport, -> { OpenAI::Live::LiveCreateParams::Transport }
|
|
22
|
+
|
|
23
|
+
# @!method initialize(session:, transport:, request_options: {})
|
|
24
|
+
# @param session [OpenAI::Models::Live::MediaSessionConfig]
|
|
25
|
+
# Startup configuration for the Live session.
|
|
26
|
+
#
|
|
27
|
+
# @param transport [OpenAI::Models::Live::LiveCreateParams::Transport]
|
|
28
|
+
# WebRTC transport with the browser's SDP offer.
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
|
|
32
|
+
class Transport < OpenAI::Internal::Type::BaseModel
|
|
33
|
+
# @!attribute sdp
|
|
34
|
+
# Session Description Protocol message for the WebRTC connection.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :sdp, String
|
|
38
|
+
|
|
39
|
+
# @!attribute type
|
|
40
|
+
# The transport used for the Live session. Always `webrtc`.
|
|
41
|
+
#
|
|
42
|
+
# @return [Symbol, :webrtc]
|
|
43
|
+
required :type, const: :webrtc
|
|
44
|
+
|
|
45
|
+
# @!method initialize(sdp:, type: :webrtc)
|
|
46
|
+
# WebRTC transport with the browser's SDP offer.
|
|
47
|
+
#
|
|
48
|
+
# @param sdp [String]
|
|
49
|
+
# Session Description Protocol message for the WebRTC connection.
|
|
50
|
+
#
|
|
51
|
+
# @param type [Symbol, :webrtc]
|
|
52
|
+
# The transport used for the Live session. Always `webrtc`.
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
# @see OpenAI::Resources::Live#create
|
|
7
|
+
class LiveCreateResponse < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute session
|
|
9
|
+
# The newly created Live session. Use its ID for session controls and sideband
|
|
10
|
+
# connections.
|
|
11
|
+
#
|
|
12
|
+
# @return [OpenAI::Models::Live::LiveCreateResponse::Session]
|
|
13
|
+
required :session, -> { OpenAI::Models::Live::LiveCreateResponse::Session }
|
|
14
|
+
|
|
15
|
+
# @!attribute transport
|
|
16
|
+
# WebRTC transport with the SDP answer.
|
|
17
|
+
#
|
|
18
|
+
# @return [OpenAI::Models::Live::LiveCreateResponse::Transport]
|
|
19
|
+
required :transport, -> { OpenAI::Models::Live::LiveCreateResponse::Transport }
|
|
20
|
+
|
|
21
|
+
# @!method initialize(session:, transport:)
|
|
22
|
+
# The created Live session identifier and WebRTC answer. Apply transport.sdp as
|
|
23
|
+
# the peer's remote answer and wait for session.started on the data channel before
|
|
24
|
+
# sending commands.
|
|
25
|
+
#
|
|
26
|
+
# @param session [OpenAI::Models::Live::LiveCreateResponse::Session]
|
|
27
|
+
# The newly created Live session. Use its ID for session controls and sideband
|
|
28
|
+
# connections.
|
|
29
|
+
#
|
|
30
|
+
# @param transport [OpenAI::Models::Live::LiveCreateResponse::Transport]
|
|
31
|
+
# WebRTC transport with the SDP answer.
|
|
32
|
+
|
|
33
|
+
# @see OpenAI::Models::Live::LiveCreateResponse#session
|
|
34
|
+
class Session < OpenAI::Internal::Type::BaseModel
|
|
35
|
+
# @!attribute id
|
|
36
|
+
# Opaque session identifier. Preserve the returned value unchanged, including its
|
|
37
|
+
# prefix.
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :id, String
|
|
41
|
+
|
|
42
|
+
# @!method initialize(id:)
|
|
43
|
+
# The newly created Live session. Use its ID for session controls and sideband
|
|
44
|
+
# connections.
|
|
45
|
+
#
|
|
46
|
+
# @param id [String]
|
|
47
|
+
# Opaque session identifier. Preserve the returned value unchanged, including its
|
|
48
|
+
# prefix.
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# @see OpenAI::Models::Live::LiveCreateResponse#transport
|
|
52
|
+
class Transport < OpenAI::Internal::Type::BaseModel
|
|
53
|
+
# @!attribute sdp
|
|
54
|
+
# Session Description Protocol message for the WebRTC connection.
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
required :sdp, String
|
|
58
|
+
|
|
59
|
+
# @!attribute type
|
|
60
|
+
# The transport used for the Live session. Always `webrtc`.
|
|
61
|
+
#
|
|
62
|
+
# @return [Symbol, :webrtc]
|
|
63
|
+
required :type, const: :webrtc
|
|
64
|
+
|
|
65
|
+
# @!method initialize(sdp:, type: :webrtc)
|
|
66
|
+
# WebRTC transport with the SDP answer.
|
|
67
|
+
#
|
|
68
|
+
# @param sdp [String]
|
|
69
|
+
# Session Description Protocol message for the WebRTC connection.
|
|
70
|
+
#
|
|
71
|
+
# @param type [Symbol, :webrtc]
|
|
72
|
+
# The transport used for the Live session. Always `webrtc`.
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class MediaSessionConfig < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute model
|
|
8
|
+
# The Live model. Required in the session configuration for every transport; do
|
|
9
|
+
# not pass it as a URL query parameter.
|
|
10
|
+
#
|
|
11
|
+
# @return [String, Symbol, OpenAI::Models::Live::MediaSessionConfig::Model]
|
|
12
|
+
required :model, union: -> { OpenAI::Live::MediaSessionConfig::Model }
|
|
13
|
+
|
|
14
|
+
# @!attribute audio
|
|
15
|
+
# Startup audio configuration. WebRTC and SIP negotiate their audio format on the
|
|
16
|
+
# media transport.
|
|
17
|
+
#
|
|
18
|
+
# @return [OpenAI::Models::Live::MediaSessionConfig::Audio, nil]
|
|
19
|
+
optional :audio, -> { OpenAI::Live::MediaSessionConfig::Audio }
|
|
20
|
+
|
|
21
|
+
# @!attribute client
|
|
22
|
+
# Startup-only capabilities for an untrusted frontend attached to a unified WebRTC
|
|
23
|
+
# session. Trusted sideband connections are unaffected.
|
|
24
|
+
#
|
|
25
|
+
# @return [OpenAI::Models::Live::ClientConfig, nil]
|
|
26
|
+
optional :client, -> { OpenAI::Live::ClientConfig }
|
|
27
|
+
|
|
28
|
+
# @!attribute delegation
|
|
29
|
+
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
30
|
+
# application; use `responses` to let the API manage a Responses backend.
|
|
31
|
+
#
|
|
32
|
+
# @return [OpenAI::Models::Live::ClientDelegation, OpenAI::Models::Live::MediaSessionConfig::Delegation::Responses, nil]
|
|
33
|
+
optional :delegation, union: -> { OpenAI::Live::MediaSessionConfig::Delegation }, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute input
|
|
36
|
+
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
37
|
+
# assistant messages with one text part each; at most 128 messages and 8,192
|
|
38
|
+
# rendered tokens in total.
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<OpenAI::Models::Live::InitialItem::Developer, OpenAI::Models::Live::InitialItem::User, OpenAI::Models::Live::InitialItem::Assistant>, nil]
|
|
41
|
+
optional :input, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::InitialItem] }
|
|
42
|
+
|
|
43
|
+
# @!attribute instructions
|
|
44
|
+
# Frontend instructions for voice, conversation, interruptions, and when to
|
|
45
|
+
# delegate. Start with the
|
|
46
|
+
# [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting);
|
|
47
|
+
# put business rules and tool workflows in a separate
|
|
48
|
+
# [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).
|
|
49
|
+
# Limited to 16,384 client-supplied tokens. Omitted or blank instructions use
|
|
50
|
+
# server defaults. Immutable after startup.
|
|
51
|
+
#
|
|
52
|
+
# @return [String, nil]
|
|
53
|
+
optional :instructions, String, nil?: true
|
|
54
|
+
|
|
55
|
+
# @!attribute store
|
|
56
|
+
# Whether to store the session for later forking and recording download. Defaults
|
|
57
|
+
# to false for new sessions.
|
|
58
|
+
#
|
|
59
|
+
# @return [Boolean, nil]
|
|
60
|
+
optional :store, OpenAI::Internal::Type::Boolean
|
|
61
|
+
|
|
62
|
+
# @!method initialize(model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, store: nil)
|
|
63
|
+
# Startup configuration for a Live media session. Follow the
|
|
64
|
+
# [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting)
|
|
65
|
+
# when writing frontend instructions and the backend prompt under
|
|
66
|
+
# delegation.responses.instructions.
|
|
67
|
+
#
|
|
68
|
+
# @param model [String, Symbol, OpenAI::Models::Live::MediaSessionConfig::Model]
|
|
69
|
+
# The Live model. Required in the session configuration for every transport; do
|
|
70
|
+
# not pass it as a URL query parameter.
|
|
71
|
+
#
|
|
72
|
+
# @param audio [OpenAI::Models::Live::MediaSessionConfig::Audio]
|
|
73
|
+
# Startup audio configuration. WebRTC and SIP negotiate their audio format on the
|
|
74
|
+
# media transport.
|
|
75
|
+
#
|
|
76
|
+
# @param client [OpenAI::Models::Live::ClientConfig]
|
|
77
|
+
# Startup-only capabilities for an untrusted frontend attached to a unified WebRTC
|
|
78
|
+
# session. Trusted sideband connections are unaffected.
|
|
79
|
+
#
|
|
80
|
+
# @param delegation [OpenAI::Models::Live::ClientDelegation, OpenAI::Models::Live::MediaSessionConfig::Delegation::Responses, nil]
|
|
81
|
+
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
82
|
+
# application; use `responses` to let the API manage a Responses backend.
|
|
83
|
+
#
|
|
84
|
+
# @param input [Array<OpenAI::Models::Live::InitialItem::Developer, OpenAI::Models::Live::InitialItem::User, OpenAI::Models::Live::InitialItem::Assistant>]
|
|
85
|
+
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
86
|
+
# assistant messages with one text part each; at most 128 messages and 8,192
|
|
87
|
+
# rendered tokens in total.
|
|
88
|
+
#
|
|
89
|
+
# @param instructions [String, nil]
|
|
90
|
+
# Frontend instructions for voice, conversation, interruptions, and when to
|
|
91
|
+
# delegate. Start with the
|
|
92
|
+
# [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting);
|
|
93
|
+
# put business rules and tool workflows in a separate
|
|
94
|
+
# [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).
|
|
95
|
+
# Limited to 16,384 client-supplied tokens. Omitted or blank instructions use
|
|
96
|
+
# server defaults. Immutable after startup.
|
|
97
|
+
#
|
|
98
|
+
# @param store [Boolean]
|
|
99
|
+
# Whether to store the session for later forking and recording download. Defaults
|
|
100
|
+
# to false for new sessions.
|
|
101
|
+
|
|
102
|
+
# The Live model. Required in the session configuration for every transport; do
|
|
103
|
+
# not pass it as a URL query parameter.
|
|
104
|
+
#
|
|
105
|
+
# @see OpenAI::Models::Live::MediaSessionConfig#model
|
|
106
|
+
module Model
|
|
107
|
+
extend OpenAI::Internal::Type::Union
|
|
108
|
+
|
|
109
|
+
variant String
|
|
110
|
+
|
|
111
|
+
variant const: -> { OpenAI::Models::Live::MediaSessionConfig::Model::GPT_LIVE_1 }
|
|
112
|
+
|
|
113
|
+
# @!method self.variants
|
|
114
|
+
# @return [Array(String, Symbol)]
|
|
115
|
+
|
|
116
|
+
define_sorbet_constant!(:Variants) do
|
|
117
|
+
T.type_alias { T.any(String, OpenAI::Live::MediaSessionConfig::Model::TaggedSymbol) }
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @!group
|
|
121
|
+
|
|
122
|
+
GPT_LIVE_1 = :"gpt-live-1"
|
|
123
|
+
|
|
124
|
+
# @!endgroup
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @see OpenAI::Models::Live::MediaSessionConfig#audio
|
|
128
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
129
|
+
# @!attribute output
|
|
130
|
+
# Settings for speech generated by the Live model. Choose the voice before
|
|
131
|
+
# starting the session.
|
|
132
|
+
#
|
|
133
|
+
# @return [OpenAI::Models::Live::MediaSessionConfig::Audio::Output, nil]
|
|
134
|
+
optional :output, -> { OpenAI::Live::MediaSessionConfig::Audio::Output }
|
|
135
|
+
|
|
136
|
+
# @!method initialize(output: nil)
|
|
137
|
+
# Startup audio configuration. WebRTC and SIP negotiate their audio format on the
|
|
138
|
+
# media transport.
|
|
139
|
+
#
|
|
140
|
+
# @param output [OpenAI::Models::Live::MediaSessionConfig::Audio::Output]
|
|
141
|
+
# Settings for speech generated by the Live model. Choose the voice before
|
|
142
|
+
# starting the session.
|
|
143
|
+
|
|
144
|
+
# @see OpenAI::Models::Live::MediaSessionConfig::Audio#output
|
|
145
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
146
|
+
# @!attribute voice
|
|
147
|
+
# The voice used for Live speech, as a built-in voice name or a custom voice
|
|
148
|
+
# object containing its ID. Defaults to `marin` and cannot change after startup.
|
|
149
|
+
#
|
|
150
|
+
# @return [String, Symbol, OpenAI::Models::Live::BuiltInVoice, OpenAI::Models::Live::CustomVoice, nil]
|
|
151
|
+
optional :voice, union: -> { OpenAI::Live::MediaSessionConfig::Audio::Output::Voice }
|
|
152
|
+
|
|
153
|
+
# @!method initialize(voice: nil)
|
|
154
|
+
# Settings for speech generated by the Live model. Choose the voice before
|
|
155
|
+
# starting the session.
|
|
156
|
+
#
|
|
157
|
+
# @param voice [String, Symbol, OpenAI::Models::Live::BuiltInVoice, OpenAI::Models::Live::CustomVoice]
|
|
158
|
+
# The voice used for Live speech, as a built-in voice name or a custom voice
|
|
159
|
+
# object containing its ID. Defaults to `marin` and cannot change after startup.
|
|
160
|
+
|
|
161
|
+
# The voice used for Live speech, as a built-in voice name or a custom voice
|
|
162
|
+
# object containing its ID. Defaults to `marin` and cannot change after startup.
|
|
163
|
+
#
|
|
164
|
+
# @see OpenAI::Models::Live::MediaSessionConfig::Audio::Output#voice
|
|
165
|
+
module Voice
|
|
166
|
+
extend OpenAI::Internal::Type::Union
|
|
167
|
+
|
|
168
|
+
variant String
|
|
169
|
+
|
|
170
|
+
# A built-in voice available for Live speech.
|
|
171
|
+
variant enum: -> { OpenAI::Live::BuiltInVoice }
|
|
172
|
+
|
|
173
|
+
variant -> { OpenAI::Live::CustomVoice }
|
|
174
|
+
|
|
175
|
+
# @!method self.variants
|
|
176
|
+
# @return [Array(String, Symbol, OpenAI::Models::Live::BuiltInVoice, OpenAI::Models::Live::CustomVoice)]
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
182
|
+
# application; use `responses` to let the API manage a Responses backend.
|
|
183
|
+
#
|
|
184
|
+
# @see OpenAI::Models::Live::MediaSessionConfig#delegation
|
|
185
|
+
module Delegation
|
|
186
|
+
extend OpenAI::Internal::Type::Union
|
|
187
|
+
|
|
188
|
+
discriminator :type
|
|
189
|
+
|
|
190
|
+
# Delegate tasks to your application. The Live session emits delegation events that your backend handles.
|
|
191
|
+
variant :client, -> { OpenAI::Live::ClientDelegation }
|
|
192
|
+
|
|
193
|
+
# Delegate tasks to a Responses model managed by the Live session.
|
|
194
|
+
variant :responses, -> { OpenAI::Live::MediaSessionConfig::Delegation::Responses }
|
|
195
|
+
|
|
196
|
+
class Responses < OpenAI::Internal::Type::BaseModel
|
|
197
|
+
# @!attribute responses
|
|
198
|
+
# Backend model, prompt, and tools used when the Live session delegates a task to
|
|
199
|
+
# Responses.
|
|
200
|
+
#
|
|
201
|
+
# @return [OpenAI::Models::Live::ResponsesDelegationConfig]
|
|
202
|
+
required :responses, -> { OpenAI::Live::ResponsesDelegationConfig }
|
|
203
|
+
|
|
204
|
+
# @!attribute type
|
|
205
|
+
# The delegation owner. Always `responses` for tasks handled by the Responses API.
|
|
206
|
+
#
|
|
207
|
+
# @return [Symbol, :responses]
|
|
208
|
+
required :type, const: :responses
|
|
209
|
+
|
|
210
|
+
# @!method initialize(responses:, type: :responses)
|
|
211
|
+
# Delegate tasks to a Responses model managed by the Live session.
|
|
212
|
+
#
|
|
213
|
+
# @param responses [OpenAI::Models::Live::ResponsesDelegationConfig]
|
|
214
|
+
# Backend model, prompt, and tools used when the Live session delegates a task to
|
|
215
|
+
# Responses.
|
|
216
|
+
#
|
|
217
|
+
# @param type [Symbol, :responses]
|
|
218
|
+
# The delegation owner. Always `responses` for tasks handled by the Responses API.
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# @!method self.variants
|
|
222
|
+
# @return [Array(OpenAI::Models::Live::ClientDelegation, OpenAI::Models::Live::MediaSessionConfig::Delegation::Responses)]
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class MediaSessionForkConfig < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute client
|
|
8
|
+
# Startup-only capabilities for an untrusted frontend attached to a unified WebRTC
|
|
9
|
+
# session. Trusted sideband connections are unaffected.
|
|
10
|
+
#
|
|
11
|
+
# @return [OpenAI::Models::Live::ClientConfig, nil]
|
|
12
|
+
optional :client, -> { OpenAI::Live::ClientConfig }
|
|
13
|
+
|
|
14
|
+
# @!attribute delegation
|
|
15
|
+
# Update the Responses backend for an existing Live session without changing
|
|
16
|
+
# delegation ownership.
|
|
17
|
+
#
|
|
18
|
+
# @return [OpenAI::Models::Live::MediaSessionForkConfig::Delegation, nil]
|
|
19
|
+
optional :delegation, -> { OpenAI::Live::MediaSessionForkConfig::Delegation }
|
|
20
|
+
|
|
21
|
+
# @!attribute store
|
|
22
|
+
# Whether to store the forked session. Omission inherits the stored session's
|
|
23
|
+
# setting.
|
|
24
|
+
#
|
|
25
|
+
# @return [Boolean, nil]
|
|
26
|
+
optional :store, OpenAI::Internal::Type::Boolean
|
|
27
|
+
|
|
28
|
+
# @!method initialize(client: nil, delegation: nil, store: nil)
|
|
29
|
+
# Optional overrides for a stored Live session. Omitted settings are inherited.
|
|
30
|
+
# The model, voice, frontend instructions, and prior conversation come from the
|
|
31
|
+
# stored session. WebRTC negotiates its audio format; audio.format is only
|
|
32
|
+
# supported on WebSocket forks.
|
|
33
|
+
#
|
|
34
|
+
# @param client [OpenAI::Models::Live::ClientConfig]
|
|
35
|
+
# Startup-only capabilities for an untrusted frontend attached to a unified WebRTC
|
|
36
|
+
# session. Trusted sideband connections are unaffected.
|
|
37
|
+
#
|
|
38
|
+
# @param delegation [OpenAI::Models::Live::MediaSessionForkConfig::Delegation]
|
|
39
|
+
# Update the Responses backend for an existing Live session without changing
|
|
40
|
+
# delegation ownership.
|
|
41
|
+
#
|
|
42
|
+
# @param store [Boolean]
|
|
43
|
+
# Whether to store the forked session. Omission inherits the stored session's
|
|
44
|
+
# setting.
|
|
45
|
+
|
|
46
|
+
# @see OpenAI::Models::Live::MediaSessionForkConfig#delegation
|
|
47
|
+
class Delegation < OpenAI::Internal::Type::BaseModel
|
|
48
|
+
# @!attribute type
|
|
49
|
+
# The delegation owner. Always `responses` for tasks handled by the Responses API.
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, :responses]
|
|
52
|
+
required :type, const: :responses
|
|
53
|
+
|
|
54
|
+
# @!attribute responses
|
|
55
|
+
# Responses backend settings to update. Omitted settings keep their existing
|
|
56
|
+
# values.
|
|
57
|
+
#
|
|
58
|
+
# @return [OpenAI::Models::Live::ResponsesDelegationUpdateConfig, nil]
|
|
59
|
+
optional :responses, -> { OpenAI::Live::ResponsesDelegationUpdateConfig }
|
|
60
|
+
|
|
61
|
+
# @!method initialize(responses: nil, type: :responses)
|
|
62
|
+
# Update the Responses backend for an existing Live session without changing
|
|
63
|
+
# delegation ownership.
|
|
64
|
+
#
|
|
65
|
+
# @param responses [OpenAI::Models::Live::ResponsesDelegationUpdateConfig]
|
|
66
|
+
# Responses backend settings to update. Omitted settings keep their existing
|
|
67
|
+
# values.
|
|
68
|
+
#
|
|
69
|
+
# @param type [Symbol, :responses]
|
|
70
|
+
# The delegation owner. Always `responses` for tasks handled by the Responses API.
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|