openai 0.28.0 → 0.29.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 +16 -0
- data/README.md +1 -1
- data/lib/openai/models/conversations/conversation_item.rb +37 -1
- data/lib/openai/models/realtime/call_accept_params.rb +16 -0
- data/lib/openai/models/realtime/call_hangup_params.rb +16 -0
- data/lib/openai/models/realtime/call_refer_params.rb +28 -0
- data/lib/openai/models/realtime/call_reject_params.rb +28 -0
- data/lib/openai/models/responses/response_input_item.rb +37 -1
- data/lib/openai/models/responses/response_item.rb +37 -1
- data/lib/openai/models/responses/response_output_item.rb +37 -1
- data/lib/openai/resources/realtime/calls.rb +143 -0
- data/lib/openai/resources/realtime.rb +4 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +6 -1
- data/rbi/openai/models/conversations/conversation_item.rbi +90 -1
- data/rbi/openai/models/realtime/call_accept_params.rbi +29 -0
- data/rbi/openai/models/realtime/call_hangup_params.rbi +29 -0
- data/rbi/openai/models/realtime/call_refer_params.rbi +44 -0
- data/rbi/openai/models/realtime/call_reject_params.rbi +47 -0
- data/rbi/openai/models/responses/response_input_item.rbi +90 -1
- data/rbi/openai/models/responses/response_item.rbi +86 -1
- data/rbi/openai/models/responses/response_output_item.rbi +90 -1
- data/rbi/openai/resources/realtime/calls.rbi +182 -0
- data/rbi/openai/resources/realtime.rbi +3 -0
- data/sig/openai/models/conversations/conversation_item.rbs +31 -2
- data/sig/openai/models/realtime/call_accept_params.rbs +17 -0
- data/sig/openai/models/realtime/call_hangup_params.rbs +17 -0
- data/sig/openai/models/realtime/call_refer_params.rbs +25 -0
- data/sig/openai/models/realtime/call_reject_params.rbs +27 -0
- data/sig/openai/models/responses/response_input_item.rbs +31 -2
- data/sig/openai/models/responses/response_item.rbs +31 -2
- data/sig/openai/models/responses/response_output_item.rbs +31 -2
- data/sig/openai/resources/realtime/calls.rbs +43 -0
- data/sig/openai/resources/realtime.rbs +2 -0
- metadata +17 -2
@@ -0,0 +1,182 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Resources
|
5
|
+
class Realtime
|
6
|
+
class Calls
|
7
|
+
# Accept an incoming SIP call and configure the realtime session that will handle
|
8
|
+
# it.
|
9
|
+
sig do
|
10
|
+
params(
|
11
|
+
call_id: String,
|
12
|
+
audio: OpenAI::Realtime::RealtimeAudioConfig::OrHash,
|
13
|
+
include:
|
14
|
+
T::Array[
|
15
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::OrSymbol
|
16
|
+
],
|
17
|
+
instructions: String,
|
18
|
+
max_output_tokens: T.any(Integer, Symbol),
|
19
|
+
model:
|
20
|
+
T.any(
|
21
|
+
String,
|
22
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::OrSymbol
|
23
|
+
),
|
24
|
+
output_modalities:
|
25
|
+
T::Array[
|
26
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::OrSymbol
|
27
|
+
],
|
28
|
+
prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash),
|
29
|
+
tool_choice:
|
30
|
+
T.any(
|
31
|
+
OpenAI::Responses::ToolChoiceOptions::OrSymbol,
|
32
|
+
OpenAI::Responses::ToolChoiceFunction::OrHash,
|
33
|
+
OpenAI::Responses::ToolChoiceMcp::OrHash
|
34
|
+
),
|
35
|
+
tools:
|
36
|
+
T::Array[
|
37
|
+
T.any(
|
38
|
+
OpenAI::Realtime::RealtimeFunctionTool::OrHash,
|
39
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp::OrHash
|
40
|
+
)
|
41
|
+
],
|
42
|
+
tracing:
|
43
|
+
T.nilable(
|
44
|
+
T.any(
|
45
|
+
Symbol,
|
46
|
+
OpenAI::Realtime::RealtimeTracingConfig::TracingConfiguration::OrHash
|
47
|
+
)
|
48
|
+
),
|
49
|
+
truncation:
|
50
|
+
T.any(
|
51
|
+
OpenAI::Realtime::RealtimeTruncation::RealtimeTruncationStrategy::OrSymbol,
|
52
|
+
OpenAI::Realtime::RealtimeTruncationRetentionRatio::OrHash
|
53
|
+
),
|
54
|
+
type: Symbol,
|
55
|
+
request_options: OpenAI::RequestOptions::OrHash
|
56
|
+
).void
|
57
|
+
end
|
58
|
+
def accept(
|
59
|
+
# The identifier for the call provided in the
|
60
|
+
# [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook_events/realtime/call/incoming)
|
61
|
+
# webhook.
|
62
|
+
call_id,
|
63
|
+
# Configuration for input and output audio.
|
64
|
+
audio: nil,
|
65
|
+
# Additional fields to include in server outputs.
|
66
|
+
#
|
67
|
+
# `item.input_audio_transcription.logprobs`: Include logprobs for input audio
|
68
|
+
# transcription.
|
69
|
+
include: nil,
|
70
|
+
# The default system instructions (i.e. system message) prepended to model calls.
|
71
|
+
# This field allows the client to guide the model on desired responses. The model
|
72
|
+
# can be instructed on response content and format, (e.g. "be extremely succinct",
|
73
|
+
# "act friendly", "here are examples of good responses") and on audio behavior
|
74
|
+
# (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
75
|
+
# instructions are not guaranteed to be followed by the model, but they provide
|
76
|
+
# guidance to the model on the desired behavior.
|
77
|
+
#
|
78
|
+
# Note that the server sets default instructions which will be used if this field
|
79
|
+
# is not set and are visible in the `session.created` event at the start of the
|
80
|
+
# session.
|
81
|
+
instructions: nil,
|
82
|
+
# Maximum number of output tokens for a single assistant response, inclusive of
|
83
|
+
# tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
84
|
+
# `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
85
|
+
max_output_tokens: nil,
|
86
|
+
# The Realtime model used for this session.
|
87
|
+
model: nil,
|
88
|
+
# The set of modalities the model can respond with. It defaults to `["audio"]`,
|
89
|
+
# indicating that the model will respond with audio plus a transcript. `["text"]`
|
90
|
+
# can be used to make the model respond with text only. It is not possible to
|
91
|
+
# request both `text` and `audio` at the same time.
|
92
|
+
output_modalities: nil,
|
93
|
+
# Reference to a prompt template and its variables.
|
94
|
+
# [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
95
|
+
prompt: nil,
|
96
|
+
# How the model chooses tools. Provide one of the string modes or force a specific
|
97
|
+
# function/MCP tool.
|
98
|
+
tool_choice: nil,
|
99
|
+
# Tools available to the model.
|
100
|
+
tools: nil,
|
101
|
+
# Realtime API can write session traces to the
|
102
|
+
# [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
|
103
|
+
# tracing is enabled for a session, the configuration cannot be modified.
|
104
|
+
#
|
105
|
+
# `auto` will create a trace for the session with default values for the workflow
|
106
|
+
# name, group id, and metadata.
|
107
|
+
tracing: nil,
|
108
|
+
# Controls how the realtime conversation is truncated prior to model inference.
|
109
|
+
# The default is `auto`.
|
110
|
+
truncation: nil,
|
111
|
+
# The type of session to create. Always `realtime` for the Realtime API.
|
112
|
+
type: :realtime,
|
113
|
+
request_options: {}
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
# End an active Realtime API call, whether it was initiated over SIP or WebRTC.
|
118
|
+
sig do
|
119
|
+
params(
|
120
|
+
call_id: String,
|
121
|
+
request_options: OpenAI::RequestOptions::OrHash
|
122
|
+
).void
|
123
|
+
end
|
124
|
+
def hangup(
|
125
|
+
# The identifier for the call. For SIP calls, use the value provided in the
|
126
|
+
# [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook_events/realtime/call/incoming)
|
127
|
+
# webhook. For WebRTC sessions, reuse the call ID returned in the `Location`
|
128
|
+
# header when creating the call with
|
129
|
+
# [`POST /v1/realtime/calls`](https://platform.openai.com/docs/api-reference/realtime/create-call).
|
130
|
+
call_id,
|
131
|
+
request_options: {}
|
132
|
+
)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Transfer an active SIP call to a new destination using the SIP REFER verb.
|
136
|
+
sig do
|
137
|
+
params(
|
138
|
+
call_id: String,
|
139
|
+
target_uri: String,
|
140
|
+
request_options: OpenAI::RequestOptions::OrHash
|
141
|
+
).void
|
142
|
+
end
|
143
|
+
def refer(
|
144
|
+
# The identifier for the call provided in the
|
145
|
+
# [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook_events/realtime/call/incoming)
|
146
|
+
# webhook.
|
147
|
+
call_id,
|
148
|
+
# URI that should appear in the SIP Refer-To header. Supports values like
|
149
|
+
# `tel:+14155550123` or `sip:agent@example.com`.
|
150
|
+
target_uri:,
|
151
|
+
request_options: {}
|
152
|
+
)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Decline an incoming SIP call by returning a SIP status code to the caller.
|
156
|
+
sig do
|
157
|
+
params(
|
158
|
+
call_id: String,
|
159
|
+
status_code: Integer,
|
160
|
+
request_options: OpenAI::RequestOptions::OrHash
|
161
|
+
).void
|
162
|
+
end
|
163
|
+
def reject(
|
164
|
+
# The identifier for the call provided in the
|
165
|
+
# [`realtime.call.incoming`](https://platform.openai.com/docs/api-reference/webhook_events/realtime/call/incoming)
|
166
|
+
# webhook.
|
167
|
+
call_id,
|
168
|
+
# SIP response code to send back to the caller. Defaults to `603` (Decline) when
|
169
|
+
# omitted.
|
170
|
+
status_code: nil,
|
171
|
+
request_options: {}
|
172
|
+
)
|
173
|
+
end
|
174
|
+
|
175
|
+
# @api private
|
176
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
177
|
+
def self.new(client:)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
@@ -6,6 +6,9 @@ module OpenAI
|
|
6
6
|
sig { returns(OpenAI::Resources::Realtime::ClientSecrets) }
|
7
7
|
attr_reader :client_secrets
|
8
8
|
|
9
|
+
sig { returns(OpenAI::Resources::Realtime::Calls) }
|
10
|
+
attr_reader :calls
|
11
|
+
|
9
12
|
# @api private
|
10
13
|
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
11
14
|
def self.new(client:)
|
@@ -356,8 +356,10 @@ module OpenAI
|
|
356
356
|
name: String,
|
357
357
|
server_label: String,
|
358
358
|
type: :mcp_call,
|
359
|
+
approval_request_id: String?,
|
359
360
|
error: String?,
|
360
|
-
output: String
|
361
|
+
output: String?,
|
362
|
+
status: OpenAI::Models::Conversations::ConversationItem::McpCall::status
|
361
363
|
}
|
362
364
|
|
363
365
|
class McpCall < OpenAI::Internal::Type::BaseModel
|
@@ -371,17 +373,27 @@ module OpenAI
|
|
371
373
|
|
372
374
|
attr_accessor type: :mcp_call
|
373
375
|
|
376
|
+
attr_accessor approval_request_id: String?
|
377
|
+
|
374
378
|
attr_accessor error: String?
|
375
379
|
|
376
380
|
attr_accessor output: String?
|
377
381
|
|
382
|
+
attr_reader status: OpenAI::Models::Conversations::ConversationItem::McpCall::status?
|
383
|
+
|
384
|
+
def status=: (
|
385
|
+
OpenAI::Models::Conversations::ConversationItem::McpCall::status
|
386
|
+
) -> OpenAI::Models::Conversations::ConversationItem::McpCall::status
|
387
|
+
|
378
388
|
def initialize: (
|
379
389
|
id: String,
|
380
390
|
arguments: String,
|
381
391
|
name: String,
|
382
392
|
server_label: String,
|
393
|
+
?approval_request_id: String?,
|
383
394
|
?error: String?,
|
384
395
|
?output: String?,
|
396
|
+
?status: OpenAI::Models::Conversations::ConversationItem::McpCall::status,
|
385
397
|
?type: :mcp_call
|
386
398
|
) -> void
|
387
399
|
|
@@ -391,9 +403,26 @@ module OpenAI
|
|
391
403
|
name: String,
|
392
404
|
server_label: String,
|
393
405
|
type: :mcp_call,
|
406
|
+
approval_request_id: String?,
|
394
407
|
error: String?,
|
395
|
-
output: String
|
408
|
+
output: String?,
|
409
|
+
status: OpenAI::Models::Conversations::ConversationItem::McpCall::status
|
396
410
|
}
|
411
|
+
|
412
|
+
type status =
|
413
|
+
:in_progress | :completed | :incomplete | :calling | :failed
|
414
|
+
|
415
|
+
module Status
|
416
|
+
extend OpenAI::Internal::Type::Enum
|
417
|
+
|
418
|
+
IN_PROGRESS: :in_progress
|
419
|
+
COMPLETED: :completed
|
420
|
+
INCOMPLETE: :incomplete
|
421
|
+
CALLING: :calling
|
422
|
+
FAILED: :failed
|
423
|
+
|
424
|
+
def self?.values: -> ::Array[OpenAI::Models::Conversations::ConversationItem::McpCall::status]
|
425
|
+
end
|
397
426
|
end
|
398
427
|
|
399
428
|
def self?.variants: -> ::Array[OpenAI::Models::Conversations::conversation_item]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Realtime
|
4
|
+
type call_accept_params =
|
5
|
+
{ } & OpenAI::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class CallAcceptParams < OpenAI::Models::Realtime::RealtimeSessionCreateRequest
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
def initialize: (?request_options: OpenAI::request_opts) -> void
|
12
|
+
|
13
|
+
def to_hash: -> { request_options: OpenAI::RequestOptions }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Realtime
|
4
|
+
type call_hangup_params =
|
5
|
+
{ } & OpenAI::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class CallHangupParams < OpenAI::Internal::Type::BaseModel
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
def initialize: (?request_options: OpenAI::request_opts) -> void
|
12
|
+
|
13
|
+
def to_hash: -> { request_options: OpenAI::RequestOptions }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Realtime
|
4
|
+
type call_refer_params =
|
5
|
+
{ target_uri: String } & OpenAI::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class CallReferParams < OpenAI::Internal::Type::BaseModel
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
attr_accessor target_uri: String
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
target_uri: String,
|
15
|
+
?request_options: OpenAI::request_opts
|
16
|
+
) -> void
|
17
|
+
|
18
|
+
def to_hash: -> {
|
19
|
+
target_uri: String,
|
20
|
+
request_options: OpenAI::RequestOptions
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Realtime
|
4
|
+
type call_reject_params =
|
5
|
+
{ status_code: Integer } & OpenAI::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class CallRejectParams < OpenAI::Internal::Type::BaseModel
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
attr_reader status_code: Integer?
|
12
|
+
|
13
|
+
def status_code=: (Integer) -> Integer
|
14
|
+
|
15
|
+
def initialize: (
|
16
|
+
?status_code: Integer,
|
17
|
+
?request_options: OpenAI::request_opts
|
18
|
+
) -> void
|
19
|
+
|
20
|
+
def to_hash: -> {
|
21
|
+
status_code: Integer,
|
22
|
+
request_options: OpenAI::RequestOptions
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -563,8 +563,10 @@ module OpenAI
|
|
563
563
|
name: String,
|
564
564
|
server_label: String,
|
565
565
|
type: :mcp_call,
|
566
|
+
approval_request_id: String?,
|
566
567
|
error: String?,
|
567
|
-
output: String
|
568
|
+
output: String?,
|
569
|
+
status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status
|
568
570
|
}
|
569
571
|
|
570
572
|
class McpCall < OpenAI::Internal::Type::BaseModel
|
@@ -578,17 +580,27 @@ module OpenAI
|
|
578
580
|
|
579
581
|
attr_accessor type: :mcp_call
|
580
582
|
|
583
|
+
attr_accessor approval_request_id: String?
|
584
|
+
|
581
585
|
attr_accessor error: String?
|
582
586
|
|
583
587
|
attr_accessor output: String?
|
584
588
|
|
589
|
+
attr_reader status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status?
|
590
|
+
|
591
|
+
def status=: (
|
592
|
+
OpenAI::Models::Responses::ResponseInputItem::McpCall::status
|
593
|
+
) -> OpenAI::Models::Responses::ResponseInputItem::McpCall::status
|
594
|
+
|
585
595
|
def initialize: (
|
586
596
|
id: String,
|
587
597
|
arguments: String,
|
588
598
|
name: String,
|
589
599
|
server_label: String,
|
600
|
+
?approval_request_id: String?,
|
590
601
|
?error: String?,
|
591
602
|
?output: String?,
|
603
|
+
?status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status,
|
592
604
|
?type: :mcp_call
|
593
605
|
) -> void
|
594
606
|
|
@@ -598,9 +610,26 @@ module OpenAI
|
|
598
610
|
name: String,
|
599
611
|
server_label: String,
|
600
612
|
type: :mcp_call,
|
613
|
+
approval_request_id: String?,
|
601
614
|
error: String?,
|
602
|
-
output: String
|
615
|
+
output: String?,
|
616
|
+
status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status
|
603
617
|
}
|
618
|
+
|
619
|
+
type status =
|
620
|
+
:in_progress | :completed | :incomplete | :calling | :failed
|
621
|
+
|
622
|
+
module Status
|
623
|
+
extend OpenAI::Internal::Type::Enum
|
624
|
+
|
625
|
+
IN_PROGRESS: :in_progress
|
626
|
+
COMPLETED: :completed
|
627
|
+
INCOMPLETE: :incomplete
|
628
|
+
CALLING: :calling
|
629
|
+
FAILED: :failed
|
630
|
+
|
631
|
+
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseInputItem::McpCall::status]
|
632
|
+
end
|
604
633
|
end
|
605
634
|
|
606
635
|
type item_reference =
|
@@ -352,8 +352,10 @@ module OpenAI
|
|
352
352
|
name: String,
|
353
353
|
server_label: String,
|
354
354
|
type: :mcp_call,
|
355
|
+
approval_request_id: String?,
|
355
356
|
error: String?,
|
356
|
-
output: String
|
357
|
+
output: String?,
|
358
|
+
status: OpenAI::Models::Responses::ResponseItem::McpCall::status
|
357
359
|
}
|
358
360
|
|
359
361
|
class McpCall < OpenAI::Internal::Type::BaseModel
|
@@ -367,17 +369,27 @@ module OpenAI
|
|
367
369
|
|
368
370
|
attr_accessor type: :mcp_call
|
369
371
|
|
372
|
+
attr_accessor approval_request_id: String?
|
373
|
+
|
370
374
|
attr_accessor error: String?
|
371
375
|
|
372
376
|
attr_accessor output: String?
|
373
377
|
|
378
|
+
attr_reader status: OpenAI::Models::Responses::ResponseItem::McpCall::status?
|
379
|
+
|
380
|
+
def status=: (
|
381
|
+
OpenAI::Models::Responses::ResponseItem::McpCall::status
|
382
|
+
) -> OpenAI::Models::Responses::ResponseItem::McpCall::status
|
383
|
+
|
374
384
|
def initialize: (
|
375
385
|
id: String,
|
376
386
|
arguments: String,
|
377
387
|
name: String,
|
378
388
|
server_label: String,
|
389
|
+
?approval_request_id: String?,
|
379
390
|
?error: String?,
|
380
391
|
?output: String?,
|
392
|
+
?status: OpenAI::Models::Responses::ResponseItem::McpCall::status,
|
381
393
|
?type: :mcp_call
|
382
394
|
) -> void
|
383
395
|
|
@@ -387,9 +399,26 @@ module OpenAI
|
|
387
399
|
name: String,
|
388
400
|
server_label: String,
|
389
401
|
type: :mcp_call,
|
402
|
+
approval_request_id: String?,
|
390
403
|
error: String?,
|
391
|
-
output: String
|
404
|
+
output: String?,
|
405
|
+
status: OpenAI::Models::Responses::ResponseItem::McpCall::status
|
392
406
|
}
|
407
|
+
|
408
|
+
type status =
|
409
|
+
:in_progress | :completed | :incomplete | :calling | :failed
|
410
|
+
|
411
|
+
module Status
|
412
|
+
extend OpenAI::Internal::Type::Enum
|
413
|
+
|
414
|
+
IN_PROGRESS: :in_progress
|
415
|
+
COMPLETED: :completed
|
416
|
+
INCOMPLETE: :incomplete
|
417
|
+
CALLING: :calling
|
418
|
+
FAILED: :failed
|
419
|
+
|
420
|
+
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseItem::McpCall::status]
|
421
|
+
end
|
393
422
|
end
|
394
423
|
|
395
424
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::response_item]
|
@@ -162,8 +162,10 @@ module OpenAI
|
|
162
162
|
name: String,
|
163
163
|
server_label: String,
|
164
164
|
type: :mcp_call,
|
165
|
+
approval_request_id: String?,
|
165
166
|
error: String?,
|
166
|
-
output: String
|
167
|
+
output: String?,
|
168
|
+
status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
|
167
169
|
}
|
168
170
|
|
169
171
|
class McpCall < OpenAI::Internal::Type::BaseModel
|
@@ -177,17 +179,27 @@ module OpenAI
|
|
177
179
|
|
178
180
|
attr_accessor type: :mcp_call
|
179
181
|
|
182
|
+
attr_accessor approval_request_id: String?
|
183
|
+
|
180
184
|
attr_accessor error: String?
|
181
185
|
|
182
186
|
attr_accessor output: String?
|
183
187
|
|
188
|
+
attr_reader status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status?
|
189
|
+
|
190
|
+
def status=: (
|
191
|
+
OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
|
192
|
+
) -> OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
|
193
|
+
|
184
194
|
def initialize: (
|
185
195
|
id: String,
|
186
196
|
arguments: String,
|
187
197
|
name: String,
|
188
198
|
server_label: String,
|
199
|
+
?approval_request_id: String?,
|
189
200
|
?error: String?,
|
190
201
|
?output: String?,
|
202
|
+
?status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status,
|
191
203
|
?type: :mcp_call
|
192
204
|
) -> void
|
193
205
|
|
@@ -197,9 +209,26 @@ module OpenAI
|
|
197
209
|
name: String,
|
198
210
|
server_label: String,
|
199
211
|
type: :mcp_call,
|
212
|
+
approval_request_id: String?,
|
200
213
|
error: String?,
|
201
|
-
output: String
|
214
|
+
output: String?,
|
215
|
+
status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
|
202
216
|
}
|
217
|
+
|
218
|
+
type status =
|
219
|
+
:in_progress | :completed | :incomplete | :calling | :failed
|
220
|
+
|
221
|
+
module Status
|
222
|
+
extend OpenAI::Internal::Type::Enum
|
223
|
+
|
224
|
+
IN_PROGRESS: :in_progress
|
225
|
+
COMPLETED: :completed
|
226
|
+
INCOMPLETE: :incomplete
|
227
|
+
CALLING: :calling
|
228
|
+
FAILED: :failed
|
229
|
+
|
230
|
+
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseOutputItem::McpCall::status]
|
231
|
+
end
|
203
232
|
end
|
204
233
|
|
205
234
|
type mcp_list_tools =
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Resources
|
3
|
+
class Realtime
|
4
|
+
class Calls
|
5
|
+
def accept: (
|
6
|
+
String call_id,
|
7
|
+
?audio: OpenAI::Realtime::RealtimeAudioConfig,
|
8
|
+
?include: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateRequest::include_],
|
9
|
+
?instructions: String,
|
10
|
+
?max_output_tokens: OpenAI::Models::Realtime::RealtimeSessionCreateRequest::max_output_tokens,
|
11
|
+
?model: OpenAI::Models::Realtime::RealtimeSessionCreateRequest::model,
|
12
|
+
?output_modalities: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateRequest::output_modality],
|
13
|
+
?prompt: OpenAI::Responses::ResponsePrompt?,
|
14
|
+
?tool_choice: OpenAI::Models::Realtime::realtime_tool_choice_config,
|
15
|
+
?tools: OpenAI::Models::Realtime::realtime_tools_config,
|
16
|
+
?tracing: OpenAI::Models::Realtime::realtime_tracing_config?,
|
17
|
+
?truncation: OpenAI::Models::Realtime::realtime_truncation,
|
18
|
+
?type: :realtime,
|
19
|
+
?request_options: OpenAI::request_opts
|
20
|
+
) -> nil
|
21
|
+
|
22
|
+
def hangup: (
|
23
|
+
String call_id,
|
24
|
+
?request_options: OpenAI::request_opts
|
25
|
+
) -> nil
|
26
|
+
|
27
|
+
def refer: (
|
28
|
+
String call_id,
|
29
|
+
target_uri: String,
|
30
|
+
?request_options: OpenAI::request_opts
|
31
|
+
) -> nil
|
32
|
+
|
33
|
+
def reject: (
|
34
|
+
String call_id,
|
35
|
+
?status_code: Integer,
|
36
|
+
?request_options: OpenAI::request_opts
|
37
|
+
) -> nil
|
38
|
+
|
39
|
+
def initialize: (client: OpenAI::Client) -> void
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -389,6 +389,10 @@ files:
|
|
389
389
|
- lib/openai/models/moderation_text_input.rb
|
390
390
|
- lib/openai/models/other_file_chunking_strategy_object.rb
|
391
391
|
- lib/openai/models/realtime/audio_transcription.rb
|
392
|
+
- lib/openai/models/realtime/call_accept_params.rb
|
393
|
+
- lib/openai/models/realtime/call_hangup_params.rb
|
394
|
+
- lib/openai/models/realtime/call_refer_params.rb
|
395
|
+
- lib/openai/models/realtime/call_reject_params.rb
|
392
396
|
- lib/openai/models/realtime/client_secret_create_params.rb
|
393
397
|
- lib/openai/models/realtime/client_secret_create_response.rb
|
394
398
|
- lib/openai/models/realtime/conversation_created_event.rb
|
@@ -708,6 +712,7 @@ files:
|
|
708
712
|
- lib/openai/resources/models.rb
|
709
713
|
- lib/openai/resources/moderations.rb
|
710
714
|
- lib/openai/resources/realtime.rb
|
715
|
+
- lib/openai/resources/realtime/calls.rb
|
711
716
|
- lib/openai/resources/realtime/client_secrets.rb
|
712
717
|
- lib/openai/resources/responses.rb
|
713
718
|
- lib/openai/resources/responses/input_items.rb
|
@@ -1069,6 +1074,10 @@ files:
|
|
1069
1074
|
- rbi/openai/models/moderation_text_input.rbi
|
1070
1075
|
- rbi/openai/models/other_file_chunking_strategy_object.rbi
|
1071
1076
|
- rbi/openai/models/realtime/audio_transcription.rbi
|
1077
|
+
- rbi/openai/models/realtime/call_accept_params.rbi
|
1078
|
+
- rbi/openai/models/realtime/call_hangup_params.rbi
|
1079
|
+
- rbi/openai/models/realtime/call_refer_params.rbi
|
1080
|
+
- rbi/openai/models/realtime/call_reject_params.rbi
|
1072
1081
|
- rbi/openai/models/realtime/client_secret_create_params.rbi
|
1073
1082
|
- rbi/openai/models/realtime/client_secret_create_response.rbi
|
1074
1083
|
- rbi/openai/models/realtime/conversation_created_event.rbi
|
@@ -1388,6 +1397,7 @@ files:
|
|
1388
1397
|
- rbi/openai/resources/models.rbi
|
1389
1398
|
- rbi/openai/resources/moderations.rbi
|
1390
1399
|
- rbi/openai/resources/realtime.rbi
|
1400
|
+
- rbi/openai/resources/realtime/calls.rbi
|
1391
1401
|
- rbi/openai/resources/realtime/client_secrets.rbi
|
1392
1402
|
- rbi/openai/resources/responses.rbi
|
1393
1403
|
- rbi/openai/resources/responses/input_items.rbi
|
@@ -1739,6 +1749,10 @@ files:
|
|
1739
1749
|
- sig/openai/models/moderation_text_input.rbs
|
1740
1750
|
- sig/openai/models/other_file_chunking_strategy_object.rbs
|
1741
1751
|
- sig/openai/models/realtime/audio_transcription.rbs
|
1752
|
+
- sig/openai/models/realtime/call_accept_params.rbs
|
1753
|
+
- sig/openai/models/realtime/call_hangup_params.rbs
|
1754
|
+
- sig/openai/models/realtime/call_refer_params.rbs
|
1755
|
+
- sig/openai/models/realtime/call_reject_params.rbs
|
1742
1756
|
- sig/openai/models/realtime/client_secret_create_params.rbs
|
1743
1757
|
- sig/openai/models/realtime/client_secret_create_response.rbs
|
1744
1758
|
- sig/openai/models/realtime/conversation_created_event.rbs
|
@@ -2058,6 +2072,7 @@ files:
|
|
2058
2072
|
- sig/openai/resources/models.rbs
|
2059
2073
|
- sig/openai/resources/moderations.rbs
|
2060
2074
|
- sig/openai/resources/realtime.rbs
|
2075
|
+
- sig/openai/resources/realtime/calls.rbs
|
2061
2076
|
- sig/openai/resources/realtime/client_secrets.rbs
|
2062
2077
|
- sig/openai/resources/responses.rbs
|
2063
2078
|
- sig/openai/resources/responses/input_items.rbs
|