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
@@ -767,6 +767,12 @@ module OpenAI
|
|
767
767
|
sig { returns(Symbol) }
|
768
768
|
attr_accessor :type
|
769
769
|
|
770
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
771
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
772
|
+
# corresponding tool call.
|
773
|
+
sig { returns(T.nilable(String)) }
|
774
|
+
attr_accessor :approval_request_id
|
775
|
+
|
770
776
|
# The error from the tool call, if any.
|
771
777
|
sig { returns(T.nilable(String)) }
|
772
778
|
attr_accessor :error
|
@@ -775,6 +781,25 @@ module OpenAI
|
|
775
781
|
sig { returns(T.nilable(String)) }
|
776
782
|
attr_accessor :output
|
777
783
|
|
784
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
785
|
+
# `calling`, or `failed`.
|
786
|
+
sig do
|
787
|
+
returns(
|
788
|
+
T.nilable(
|
789
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
790
|
+
)
|
791
|
+
)
|
792
|
+
end
|
793
|
+
attr_reader :status
|
794
|
+
|
795
|
+
sig do
|
796
|
+
params(
|
797
|
+
status:
|
798
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::OrSymbol
|
799
|
+
).void
|
800
|
+
end
|
801
|
+
attr_writer :status
|
802
|
+
|
778
803
|
# An invocation of a tool on an MCP server.
|
779
804
|
sig do
|
780
805
|
params(
|
@@ -782,8 +807,11 @@ module OpenAI
|
|
782
807
|
arguments: String,
|
783
808
|
name: String,
|
784
809
|
server_label: String,
|
810
|
+
approval_request_id: T.nilable(String),
|
785
811
|
error: T.nilable(String),
|
786
812
|
output: T.nilable(String),
|
813
|
+
status:
|
814
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::OrSymbol,
|
787
815
|
type: Symbol
|
788
816
|
).returns(T.attached_class)
|
789
817
|
end
|
@@ -796,10 +824,17 @@ module OpenAI
|
|
796
824
|
name:,
|
797
825
|
# The label of the MCP server running the tool.
|
798
826
|
server_label:,
|
827
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
828
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
829
|
+
# corresponding tool call.
|
830
|
+
approval_request_id: nil,
|
799
831
|
# The error from the tool call, if any.
|
800
832
|
error: nil,
|
801
833
|
# The output from the tool call.
|
802
834
|
output: nil,
|
835
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
836
|
+
# `calling`, or `failed`.
|
837
|
+
status: nil,
|
803
838
|
# The type of the item. Always `mcp_call`.
|
804
839
|
type: :mcp_call
|
805
840
|
)
|
@@ -813,13 +848,67 @@ module OpenAI
|
|
813
848
|
name: String,
|
814
849
|
server_label: String,
|
815
850
|
type: Symbol,
|
851
|
+
approval_request_id: T.nilable(String),
|
816
852
|
error: T.nilable(String),
|
817
|
-
output: T.nilable(String)
|
853
|
+
output: T.nilable(String),
|
854
|
+
status:
|
855
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
818
856
|
}
|
819
857
|
)
|
820
858
|
end
|
821
859
|
def to_hash
|
822
860
|
end
|
861
|
+
|
862
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
863
|
+
# `calling`, or `failed`.
|
864
|
+
module Status
|
865
|
+
extend OpenAI::Internal::Type::Enum
|
866
|
+
|
867
|
+
TaggedSymbol =
|
868
|
+
T.type_alias do
|
869
|
+
T.all(
|
870
|
+
Symbol,
|
871
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status
|
872
|
+
)
|
873
|
+
end
|
874
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
875
|
+
|
876
|
+
IN_PROGRESS =
|
877
|
+
T.let(
|
878
|
+
:in_progress,
|
879
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
880
|
+
)
|
881
|
+
COMPLETED =
|
882
|
+
T.let(
|
883
|
+
:completed,
|
884
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
885
|
+
)
|
886
|
+
INCOMPLETE =
|
887
|
+
T.let(
|
888
|
+
:incomplete,
|
889
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
890
|
+
)
|
891
|
+
CALLING =
|
892
|
+
T.let(
|
893
|
+
:calling,
|
894
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
895
|
+
)
|
896
|
+
FAILED =
|
897
|
+
T.let(
|
898
|
+
:failed,
|
899
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
900
|
+
)
|
901
|
+
|
902
|
+
sig do
|
903
|
+
override.returns(
|
904
|
+
T::Array[
|
905
|
+
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
906
|
+
]
|
907
|
+
)
|
908
|
+
end
|
909
|
+
def self.values
|
910
|
+
end
|
911
|
+
end
|
823
912
|
end
|
824
913
|
|
825
914
|
sig do
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Realtime
|
6
|
+
class CallAcceptParams < OpenAI::Models::Realtime::RealtimeSessionCreateRequest
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(OpenAI::Realtime::CallAcceptParams, OpenAI::Internal::AnyHash)
|
13
|
+
end
|
14
|
+
|
15
|
+
sig do
|
16
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
17
|
+
T.attached_class
|
18
|
+
)
|
19
|
+
end
|
20
|
+
def self.new(request_options: {})
|
21
|
+
end
|
22
|
+
|
23
|
+
sig { override.returns({ request_options: OpenAI::RequestOptions }) }
|
24
|
+
def to_hash
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Realtime
|
6
|
+
class CallHangupParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(OpenAI::Realtime::CallHangupParams, OpenAI::Internal::AnyHash)
|
13
|
+
end
|
14
|
+
|
15
|
+
sig do
|
16
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
17
|
+
T.attached_class
|
18
|
+
)
|
19
|
+
end
|
20
|
+
def self.new(request_options: {})
|
21
|
+
end
|
22
|
+
|
23
|
+
sig { override.returns({ request_options: OpenAI::RequestOptions }) }
|
24
|
+
def to_hash
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Realtime
|
6
|
+
class CallReferParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(OpenAI::Realtime::CallReferParams, OpenAI::Internal::AnyHash)
|
13
|
+
end
|
14
|
+
|
15
|
+
# URI that should appear in the SIP Refer-To header. Supports values like
|
16
|
+
# `tel:+14155550123` or `sip:agent@example.com`.
|
17
|
+
sig { returns(String) }
|
18
|
+
attr_accessor :target_uri
|
19
|
+
|
20
|
+
sig do
|
21
|
+
params(
|
22
|
+
target_uri: String,
|
23
|
+
request_options: OpenAI::RequestOptions::OrHash
|
24
|
+
).returns(T.attached_class)
|
25
|
+
end
|
26
|
+
def self.new(
|
27
|
+
# URI that should appear in the SIP Refer-To header. Supports values like
|
28
|
+
# `tel:+14155550123` or `sip:agent@example.com`.
|
29
|
+
target_uri:,
|
30
|
+
request_options: {}
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
sig do
|
35
|
+
override.returns(
|
36
|
+
{ target_uri: String, request_options: OpenAI::RequestOptions }
|
37
|
+
)
|
38
|
+
end
|
39
|
+
def to_hash
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Realtime
|
6
|
+
class CallRejectParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(OpenAI::Realtime::CallRejectParams, OpenAI::Internal::AnyHash)
|
13
|
+
end
|
14
|
+
|
15
|
+
# SIP response code to send back to the caller. Defaults to `603` (Decline) when
|
16
|
+
# omitted.
|
17
|
+
sig { returns(T.nilable(Integer)) }
|
18
|
+
attr_reader :status_code
|
19
|
+
|
20
|
+
sig { params(status_code: Integer).void }
|
21
|
+
attr_writer :status_code
|
22
|
+
|
23
|
+
sig do
|
24
|
+
params(
|
25
|
+
status_code: Integer,
|
26
|
+
request_options: OpenAI::RequestOptions::OrHash
|
27
|
+
).returns(T.attached_class)
|
28
|
+
end
|
29
|
+
def self.new(
|
30
|
+
# SIP response code to send back to the caller. Defaults to `603` (Decline) when
|
31
|
+
# omitted.
|
32
|
+
status_code: nil,
|
33
|
+
request_options: {}
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
sig do
|
38
|
+
override.returns(
|
39
|
+
{ status_code: Integer, request_options: OpenAI::RequestOptions }
|
40
|
+
)
|
41
|
+
end
|
42
|
+
def to_hash
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -1381,6 +1381,12 @@ module OpenAI
|
|
1381
1381
|
sig { returns(Symbol) }
|
1382
1382
|
attr_accessor :type
|
1383
1383
|
|
1384
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
1385
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
1386
|
+
# corresponding tool call.
|
1387
|
+
sig { returns(T.nilable(String)) }
|
1388
|
+
attr_accessor :approval_request_id
|
1389
|
+
|
1384
1390
|
# The error from the tool call, if any.
|
1385
1391
|
sig { returns(T.nilable(String)) }
|
1386
1392
|
attr_accessor :error
|
@@ -1389,6 +1395,25 @@ module OpenAI
|
|
1389
1395
|
sig { returns(T.nilable(String)) }
|
1390
1396
|
attr_accessor :output
|
1391
1397
|
|
1398
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
1399
|
+
# `calling`, or `failed`.
|
1400
|
+
sig do
|
1401
|
+
returns(
|
1402
|
+
T.nilable(
|
1403
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol
|
1404
|
+
)
|
1405
|
+
)
|
1406
|
+
end
|
1407
|
+
attr_reader :status
|
1408
|
+
|
1409
|
+
sig do
|
1410
|
+
params(
|
1411
|
+
status:
|
1412
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol
|
1413
|
+
).void
|
1414
|
+
end
|
1415
|
+
attr_writer :status
|
1416
|
+
|
1392
1417
|
# An invocation of a tool on an MCP server.
|
1393
1418
|
sig do
|
1394
1419
|
params(
|
@@ -1396,8 +1421,11 @@ module OpenAI
|
|
1396
1421
|
arguments: String,
|
1397
1422
|
name: String,
|
1398
1423
|
server_label: String,
|
1424
|
+
approval_request_id: T.nilable(String),
|
1399
1425
|
error: T.nilable(String),
|
1400
1426
|
output: T.nilable(String),
|
1427
|
+
status:
|
1428
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol,
|
1401
1429
|
type: Symbol
|
1402
1430
|
).returns(T.attached_class)
|
1403
1431
|
end
|
@@ -1410,10 +1438,17 @@ module OpenAI
|
|
1410
1438
|
name:,
|
1411
1439
|
# The label of the MCP server running the tool.
|
1412
1440
|
server_label:,
|
1441
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
1442
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
1443
|
+
# corresponding tool call.
|
1444
|
+
approval_request_id: nil,
|
1413
1445
|
# The error from the tool call, if any.
|
1414
1446
|
error: nil,
|
1415
1447
|
# The output from the tool call.
|
1416
1448
|
output: nil,
|
1449
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
1450
|
+
# `calling`, or `failed`.
|
1451
|
+
status: nil,
|
1417
1452
|
# The type of the item. Always `mcp_call`.
|
1418
1453
|
type: :mcp_call
|
1419
1454
|
)
|
@@ -1427,13 +1462,67 @@ module OpenAI
|
|
1427
1462
|
name: String,
|
1428
1463
|
server_label: String,
|
1429
1464
|
type: Symbol,
|
1465
|
+
approval_request_id: T.nilable(String),
|
1430
1466
|
error: T.nilable(String),
|
1431
|
-
output: T.nilable(String)
|
1467
|
+
output: T.nilable(String),
|
1468
|
+
status:
|
1469
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol
|
1432
1470
|
}
|
1433
1471
|
)
|
1434
1472
|
end
|
1435
1473
|
def to_hash
|
1436
1474
|
end
|
1475
|
+
|
1476
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
1477
|
+
# `calling`, or `failed`.
|
1478
|
+
module Status
|
1479
|
+
extend OpenAI::Internal::Type::Enum
|
1480
|
+
|
1481
|
+
TaggedSymbol =
|
1482
|
+
T.type_alias do
|
1483
|
+
T.all(
|
1484
|
+
Symbol,
|
1485
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status
|
1486
|
+
)
|
1487
|
+
end
|
1488
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1489
|
+
|
1490
|
+
IN_PROGRESS =
|
1491
|
+
T.let(
|
1492
|
+
:in_progress,
|
1493
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
|
1494
|
+
)
|
1495
|
+
COMPLETED =
|
1496
|
+
T.let(
|
1497
|
+
:completed,
|
1498
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
|
1499
|
+
)
|
1500
|
+
INCOMPLETE =
|
1501
|
+
T.let(
|
1502
|
+
:incomplete,
|
1503
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
|
1504
|
+
)
|
1505
|
+
CALLING =
|
1506
|
+
T.let(
|
1507
|
+
:calling,
|
1508
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
|
1509
|
+
)
|
1510
|
+
FAILED =
|
1511
|
+
T.let(
|
1512
|
+
:failed,
|
1513
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
|
1514
|
+
)
|
1515
|
+
|
1516
|
+
sig do
|
1517
|
+
override.returns(
|
1518
|
+
T::Array[
|
1519
|
+
OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
|
1520
|
+
]
|
1521
|
+
)
|
1522
|
+
end
|
1523
|
+
def self.values
|
1524
|
+
end
|
1525
|
+
end
|
1437
1526
|
end
|
1438
1527
|
|
1439
1528
|
class ItemReference < OpenAI::Internal::Type::BaseModel
|
@@ -754,6 +754,12 @@ module OpenAI
|
|
754
754
|
sig { returns(Symbol) }
|
755
755
|
attr_accessor :type
|
756
756
|
|
757
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
758
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
759
|
+
# corresponding tool call.
|
760
|
+
sig { returns(T.nilable(String)) }
|
761
|
+
attr_accessor :approval_request_id
|
762
|
+
|
757
763
|
# The error from the tool call, if any.
|
758
764
|
sig { returns(T.nilable(String)) }
|
759
765
|
attr_accessor :error
|
@@ -762,6 +768,24 @@ module OpenAI
|
|
762
768
|
sig { returns(T.nilable(String)) }
|
763
769
|
attr_accessor :output
|
764
770
|
|
771
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
772
|
+
# `calling`, or `failed`.
|
773
|
+
sig do
|
774
|
+
returns(
|
775
|
+
T.nilable(
|
776
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
777
|
+
)
|
778
|
+
)
|
779
|
+
end
|
780
|
+
attr_reader :status
|
781
|
+
|
782
|
+
sig do
|
783
|
+
params(
|
784
|
+
status: OpenAI::Responses::ResponseItem::McpCall::Status::OrSymbol
|
785
|
+
).void
|
786
|
+
end
|
787
|
+
attr_writer :status
|
788
|
+
|
765
789
|
# An invocation of a tool on an MCP server.
|
766
790
|
sig do
|
767
791
|
params(
|
@@ -769,8 +793,11 @@ module OpenAI
|
|
769
793
|
arguments: String,
|
770
794
|
name: String,
|
771
795
|
server_label: String,
|
796
|
+
approval_request_id: T.nilable(String),
|
772
797
|
error: T.nilable(String),
|
773
798
|
output: T.nilable(String),
|
799
|
+
status:
|
800
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::OrSymbol,
|
774
801
|
type: Symbol
|
775
802
|
).returns(T.attached_class)
|
776
803
|
end
|
@@ -783,10 +810,17 @@ module OpenAI
|
|
783
810
|
name:,
|
784
811
|
# The label of the MCP server running the tool.
|
785
812
|
server_label:,
|
813
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
814
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
815
|
+
# corresponding tool call.
|
816
|
+
approval_request_id: nil,
|
786
817
|
# The error from the tool call, if any.
|
787
818
|
error: nil,
|
788
819
|
# The output from the tool call.
|
789
820
|
output: nil,
|
821
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
822
|
+
# `calling`, or `failed`.
|
823
|
+
status: nil,
|
790
824
|
# The type of the item. Always `mcp_call`.
|
791
825
|
type: :mcp_call
|
792
826
|
)
|
@@ -800,13 +834,64 @@ module OpenAI
|
|
800
834
|
name: String,
|
801
835
|
server_label: String,
|
802
836
|
type: Symbol,
|
837
|
+
approval_request_id: T.nilable(String),
|
803
838
|
error: T.nilable(String),
|
804
|
-
output: T.nilable(String)
|
839
|
+
output: T.nilable(String),
|
840
|
+
status:
|
841
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
805
842
|
}
|
806
843
|
)
|
807
844
|
end
|
808
845
|
def to_hash
|
809
846
|
end
|
847
|
+
|
848
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
849
|
+
# `calling`, or `failed`.
|
850
|
+
module Status
|
851
|
+
extend OpenAI::Internal::Type::Enum
|
852
|
+
|
853
|
+
TaggedSymbol =
|
854
|
+
T.type_alias do
|
855
|
+
T.all(Symbol, OpenAI::Responses::ResponseItem::McpCall::Status)
|
856
|
+
end
|
857
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
858
|
+
|
859
|
+
IN_PROGRESS =
|
860
|
+
T.let(
|
861
|
+
:in_progress,
|
862
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
863
|
+
)
|
864
|
+
COMPLETED =
|
865
|
+
T.let(
|
866
|
+
:completed,
|
867
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
868
|
+
)
|
869
|
+
INCOMPLETE =
|
870
|
+
T.let(
|
871
|
+
:incomplete,
|
872
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
873
|
+
)
|
874
|
+
CALLING =
|
875
|
+
T.let(
|
876
|
+
:calling,
|
877
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
878
|
+
)
|
879
|
+
FAILED =
|
880
|
+
T.let(
|
881
|
+
:failed,
|
882
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
883
|
+
)
|
884
|
+
|
885
|
+
sig do
|
886
|
+
override.returns(
|
887
|
+
T::Array[
|
888
|
+
OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
|
889
|
+
]
|
890
|
+
)
|
891
|
+
end
|
892
|
+
def self.values
|
893
|
+
end
|
894
|
+
end
|
810
895
|
end
|
811
896
|
|
812
897
|
sig do
|
@@ -370,6 +370,12 @@ module OpenAI
|
|
370
370
|
sig { returns(Symbol) }
|
371
371
|
attr_accessor :type
|
372
372
|
|
373
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
374
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
375
|
+
# corresponding tool call.
|
376
|
+
sig { returns(T.nilable(String)) }
|
377
|
+
attr_accessor :approval_request_id
|
378
|
+
|
373
379
|
# The error from the tool call, if any.
|
374
380
|
sig { returns(T.nilable(String)) }
|
375
381
|
attr_accessor :error
|
@@ -378,6 +384,25 @@ module OpenAI
|
|
378
384
|
sig { returns(T.nilable(String)) }
|
379
385
|
attr_accessor :output
|
380
386
|
|
387
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
388
|
+
# `calling`, or `failed`.
|
389
|
+
sig do
|
390
|
+
returns(
|
391
|
+
T.nilable(
|
392
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
393
|
+
)
|
394
|
+
)
|
395
|
+
end
|
396
|
+
attr_reader :status
|
397
|
+
|
398
|
+
sig do
|
399
|
+
params(
|
400
|
+
status:
|
401
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::OrSymbol
|
402
|
+
).void
|
403
|
+
end
|
404
|
+
attr_writer :status
|
405
|
+
|
381
406
|
# An invocation of a tool on an MCP server.
|
382
407
|
sig do
|
383
408
|
params(
|
@@ -385,8 +410,11 @@ module OpenAI
|
|
385
410
|
arguments: String,
|
386
411
|
name: String,
|
387
412
|
server_label: String,
|
413
|
+
approval_request_id: T.nilable(String),
|
388
414
|
error: T.nilable(String),
|
389
415
|
output: T.nilable(String),
|
416
|
+
status:
|
417
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::OrSymbol,
|
390
418
|
type: Symbol
|
391
419
|
).returns(T.attached_class)
|
392
420
|
end
|
@@ -399,10 +427,17 @@ module OpenAI
|
|
399
427
|
name:,
|
400
428
|
# The label of the MCP server running the tool.
|
401
429
|
server_label:,
|
430
|
+
# Unique identifier for the MCP tool call approval request. Include this value in
|
431
|
+
# a subsequent `mcp_approval_response` input to approve or reject the
|
432
|
+
# corresponding tool call.
|
433
|
+
approval_request_id: nil,
|
402
434
|
# The error from the tool call, if any.
|
403
435
|
error: nil,
|
404
436
|
# The output from the tool call.
|
405
437
|
output: nil,
|
438
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
439
|
+
# `calling`, or `failed`.
|
440
|
+
status: nil,
|
406
441
|
# The type of the item. Always `mcp_call`.
|
407
442
|
type: :mcp_call
|
408
443
|
)
|
@@ -416,13 +451,67 @@ module OpenAI
|
|
416
451
|
name: String,
|
417
452
|
server_label: String,
|
418
453
|
type: Symbol,
|
454
|
+
approval_request_id: T.nilable(String),
|
419
455
|
error: T.nilable(String),
|
420
|
-
output: T.nilable(String)
|
456
|
+
output: T.nilable(String),
|
457
|
+
status:
|
458
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
421
459
|
}
|
422
460
|
)
|
423
461
|
end
|
424
462
|
def to_hash
|
425
463
|
end
|
464
|
+
|
465
|
+
# The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
|
466
|
+
# `calling`, or `failed`.
|
467
|
+
module Status
|
468
|
+
extend OpenAI::Internal::Type::Enum
|
469
|
+
|
470
|
+
TaggedSymbol =
|
471
|
+
T.type_alias do
|
472
|
+
T.all(
|
473
|
+
Symbol,
|
474
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status
|
475
|
+
)
|
476
|
+
end
|
477
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
478
|
+
|
479
|
+
IN_PROGRESS =
|
480
|
+
T.let(
|
481
|
+
:in_progress,
|
482
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
483
|
+
)
|
484
|
+
COMPLETED =
|
485
|
+
T.let(
|
486
|
+
:completed,
|
487
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
488
|
+
)
|
489
|
+
INCOMPLETE =
|
490
|
+
T.let(
|
491
|
+
:incomplete,
|
492
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
493
|
+
)
|
494
|
+
CALLING =
|
495
|
+
T.let(
|
496
|
+
:calling,
|
497
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
498
|
+
)
|
499
|
+
FAILED =
|
500
|
+
T.let(
|
501
|
+
:failed,
|
502
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
503
|
+
)
|
504
|
+
|
505
|
+
sig do
|
506
|
+
override.returns(
|
507
|
+
T::Array[
|
508
|
+
OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
|
509
|
+
]
|
510
|
+
)
|
511
|
+
end
|
512
|
+
def self.values
|
513
|
+
end
|
514
|
+
end
|
426
515
|
end
|
427
516
|
|
428
517
|
class McpListTools < OpenAI::Internal::Type::BaseModel
|