openai 0.56.0 → 0.57.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 +29 -0
- data/README.md +1 -1
- data/lib/openai/models/conversations/conversation_item.rb +4 -1
- data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
- data/lib/openai/models/responses/compacted_response.rb +2 -2
- data/lib/openai/models/responses/computer_action.rb +45 -5
- data/lib/openai/models/responses/response.rb +2 -2
- data/lib/openai/models/responses/response_computer_tool_call.rb +45 -5
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +31 -22
- data/lib/openai/models/responses/response_custom_tool_call_item.rb +53 -0
- data/lib/openai/models/responses/response_custom_tool_call_output_item.rb +53 -0
- data/lib/openai/models/responses/response_function_tool_call_item.rb +31 -1
- data/lib/openai/models/responses/response_function_tool_call_output_item.rb +14 -6
- data/lib/openai/models/responses/response_input_message_item.rb +8 -20
- data/lib/openai/models/responses/response_item.rb +16 -1
- data/lib/openai/models/responses/response_item_list.rb +2 -2
- data/lib/openai/models/responses/response_output_item.rb +120 -1
- data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
- data/lib/openai/resources/conversations/items.rb +2 -2
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -2
- data/rbi/openai/models/conversations/conversation_item.rbi +1 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
- data/rbi/openai/models/responses/compacted_response.rbi +6 -1
- data/rbi/openai/models/responses/computer_action.rbi +71 -11
- data/rbi/openai/models/responses/response.rbi +6 -1
- data/rbi/openai/models/responses/response_computer_tool_call.rbi +71 -11
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +71 -65
- data/rbi/openai/models/responses/response_custom_tool_call_item.rbi +111 -0
- data/rbi/openai/models/responses/response_custom_tool_call_output_item.rbi +111 -0
- data/rbi/openai/models/responses/response_function_tool_call_item.rbi +81 -3
- data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +19 -18
- data/rbi/openai/models/responses/response_input_message_item.rbi +8 -49
- data/rbi/openai/models/responses/response_item.rbi +5 -1
- data/rbi/openai/models/responses/response_item_list.rbi +5 -1
- data/rbi/openai/models/responses/response_output_item.rbi +186 -1
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +6 -1
- data/rbi/openai/models/responses/response_output_item_done_event.rbi +6 -1
- data/sig/openai/models/conversations/conversation_item.rbs +1 -0
- data/sig/openai/models/responses/computer_action.rbs +53 -11
- data/sig/openai/models/responses/response_computer_tool_call.rbs +53 -11
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +23 -19
- data/sig/openai/models/responses/response_custom_tool_call_item.rbs +52 -0
- data/sig/openai/models/responses/response_custom_tool_call_output_item.rbs +52 -0
- data/sig/openai/models/responses/response_function_tool_call_item.rbs +38 -3
- data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +10 -7
- data/sig/openai/models/responses/response_input_message_item.rbs +7 -21
- data/sig/openai/models/responses/response_item.rbs +4 -0
- data/sig/openai/models/responses/response_output_item.rbs +86 -0
- metadata +8 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Responses
|
|
6
|
+
class ResponseCustomToolCallItem < OpenAI::Models::Responses::ResponseCustomToolCall
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
OpenAI::Responses::ResponseCustomToolCallItem,
|
|
11
|
+
OpenAI::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The unique ID of the custom tool call item.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
20
|
+
# Populated when items are returned via API.
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# The identifier of the actor that created the item.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :created_by
|
|
31
|
+
|
|
32
|
+
sig { params(created_by: String).void }
|
|
33
|
+
attr_writer :created_by
|
|
34
|
+
|
|
35
|
+
# A call to a custom tool created by the model.
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
id: String,
|
|
39
|
+
status:
|
|
40
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::OrSymbol,
|
|
41
|
+
created_by: String
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# The unique ID of the custom tool call item.
|
|
46
|
+
id:,
|
|
47
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
48
|
+
# Populated when items are returned via API.
|
|
49
|
+
status:,
|
|
50
|
+
# The identifier of the actor that created the item.
|
|
51
|
+
created_by: nil
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
id: String,
|
|
59
|
+
status:
|
|
60
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol,
|
|
61
|
+
created_by: String
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
69
|
+
# Populated when items are returned via API.
|
|
70
|
+
module Status
|
|
71
|
+
extend OpenAI::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
TaggedSymbol =
|
|
74
|
+
T.type_alias do
|
|
75
|
+
T.all(
|
|
76
|
+
Symbol,
|
|
77
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
81
|
+
|
|
82
|
+
IN_PROGRESS =
|
|
83
|
+
T.let(
|
|
84
|
+
:in_progress,
|
|
85
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
86
|
+
)
|
|
87
|
+
COMPLETED =
|
|
88
|
+
T.let(
|
|
89
|
+
:completed,
|
|
90
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
91
|
+
)
|
|
92
|
+
INCOMPLETE =
|
|
93
|
+
T.let(
|
|
94
|
+
:incomplete,
|
|
95
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
T::Array[
|
|
101
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
102
|
+
]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def self.values
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Responses
|
|
6
|
+
class ResponseCustomToolCallOutputItem < OpenAI::Models::Responses::ResponseCustomToolCallOutput
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem,
|
|
11
|
+
OpenAI::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The unique ID of the custom tool call output item.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
20
|
+
# Populated when items are returned via API.
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# The identifier of the actor that created the item.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :created_by
|
|
31
|
+
|
|
32
|
+
sig { params(created_by: String).void }
|
|
33
|
+
attr_writer :created_by
|
|
34
|
+
|
|
35
|
+
# The output of a custom tool call from your code, being sent back to the model.
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
id: String,
|
|
39
|
+
status:
|
|
40
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::OrSymbol,
|
|
41
|
+
created_by: String
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# The unique ID of the custom tool call output item.
|
|
46
|
+
id:,
|
|
47
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
48
|
+
# Populated when items are returned via API.
|
|
49
|
+
status:,
|
|
50
|
+
# The identifier of the actor that created the item.
|
|
51
|
+
created_by: nil
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
id: String,
|
|
59
|
+
status:
|
|
60
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol,
|
|
61
|
+
created_by: String
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
69
|
+
# Populated when items are returned via API.
|
|
70
|
+
module Status
|
|
71
|
+
extend OpenAI::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
TaggedSymbol =
|
|
74
|
+
T.type_alias do
|
|
75
|
+
T.all(
|
|
76
|
+
Symbol,
|
|
77
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
81
|
+
|
|
82
|
+
IN_PROGRESS =
|
|
83
|
+
T.let(
|
|
84
|
+
:in_progress,
|
|
85
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
86
|
+
)
|
|
87
|
+
COMPLETED =
|
|
88
|
+
T.let(
|
|
89
|
+
:completed,
|
|
90
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
91
|
+
)
|
|
92
|
+
INCOMPLETE =
|
|
93
|
+
T.let(
|
|
94
|
+
:incomplete,
|
|
95
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
T::Array[
|
|
101
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
102
|
+
]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def self.values
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -16,19 +16,97 @@ module OpenAI
|
|
|
16
16
|
sig { returns(String) }
|
|
17
17
|
attr_accessor :id
|
|
18
18
|
|
|
19
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
20
|
+
# Populated when items are returned via API.
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# The identifier of the actor that created the item.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :created_by
|
|
31
|
+
|
|
32
|
+
sig { params(created_by: String).void }
|
|
33
|
+
attr_writer :created_by
|
|
34
|
+
|
|
19
35
|
# A tool call to run a function. See the
|
|
20
36
|
# [function calling guide](https://platform.openai.com/docs/guides/function-calling)
|
|
21
37
|
# for more information.
|
|
22
|
-
sig
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
id: String,
|
|
41
|
+
status:
|
|
42
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::OrSymbol,
|
|
43
|
+
created_by: String
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
23
46
|
def self.new(
|
|
24
47
|
# The unique ID of the function tool call.
|
|
25
|
-
id
|
|
48
|
+
id:,
|
|
49
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
50
|
+
# Populated when items are returned via API.
|
|
51
|
+
status:,
|
|
52
|
+
# The identifier of the actor that created the item.
|
|
53
|
+
created_by: nil
|
|
26
54
|
)
|
|
27
55
|
end
|
|
28
56
|
|
|
29
|
-
sig
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
id: String,
|
|
61
|
+
status:
|
|
62
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol,
|
|
63
|
+
created_by: String
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
30
67
|
def to_hash
|
|
31
68
|
end
|
|
69
|
+
|
|
70
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
71
|
+
# Populated when items are returned via API.
|
|
72
|
+
module Status
|
|
73
|
+
extend OpenAI::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
TaggedSymbol =
|
|
76
|
+
T.type_alias do
|
|
77
|
+
T.all(
|
|
78
|
+
Symbol,
|
|
79
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
83
|
+
|
|
84
|
+
IN_PROGRESS =
|
|
85
|
+
T.let(
|
|
86
|
+
:in_progress,
|
|
87
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
88
|
+
)
|
|
89
|
+
COMPLETED =
|
|
90
|
+
T.let(
|
|
91
|
+
:completed,
|
|
92
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
93
|
+
)
|
|
94
|
+
INCOMPLETE =
|
|
95
|
+
T.let(
|
|
96
|
+
:incomplete,
|
|
97
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
override.returns(
|
|
102
|
+
T::Array[
|
|
103
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
104
|
+
]
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
def self.values
|
|
108
|
+
end
|
|
109
|
+
end
|
|
32
110
|
end
|
|
33
111
|
end
|
|
34
112
|
end
|
|
@@ -29,28 +29,25 @@ module OpenAI
|
|
|
29
29
|
end
|
|
30
30
|
attr_accessor :output
|
|
31
31
|
|
|
32
|
-
# The type of the function tool call output. Always `function_call_output`.
|
|
33
|
-
sig { returns(Symbol) }
|
|
34
|
-
attr_accessor :type
|
|
35
|
-
|
|
36
32
|
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
37
33
|
# Populated when items are returned via API.
|
|
38
34
|
sig do
|
|
39
35
|
returns(
|
|
40
|
-
|
|
41
|
-
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol
|
|
42
|
-
)
|
|
36
|
+
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol
|
|
43
37
|
)
|
|
44
38
|
end
|
|
45
|
-
|
|
39
|
+
attr_accessor :status
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
# The type of the function tool call output. Always `function_call_output`.
|
|
42
|
+
sig { returns(Symbol) }
|
|
43
|
+
attr_accessor :type
|
|
44
|
+
|
|
45
|
+
# The identifier of the actor that created the item.
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_reader :created_by
|
|
48
|
+
|
|
49
|
+
sig { params(created_by: String).void }
|
|
50
|
+
attr_writer :created_by
|
|
54
51
|
|
|
55
52
|
sig do
|
|
56
53
|
params(
|
|
@@ -60,6 +57,7 @@ module OpenAI
|
|
|
60
57
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Output::Variants,
|
|
61
58
|
status:
|
|
62
59
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::OrSymbol,
|
|
60
|
+
created_by: String,
|
|
63
61
|
type: Symbol
|
|
64
62
|
).returns(T.attached_class)
|
|
65
63
|
end
|
|
@@ -73,7 +71,9 @@ module OpenAI
|
|
|
73
71
|
output:,
|
|
74
72
|
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
75
73
|
# Populated when items are returned via API.
|
|
76
|
-
status
|
|
74
|
+
status:,
|
|
75
|
+
# The identifier of the actor that created the item.
|
|
76
|
+
created_by: nil,
|
|
77
77
|
# The type of the function tool call output. Always `function_call_output`.
|
|
78
78
|
type: :function_call_output
|
|
79
79
|
)
|
|
@@ -86,9 +86,10 @@ module OpenAI
|
|
|
86
86
|
call_id: String,
|
|
87
87
|
output:
|
|
88
88
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Output::Variants,
|
|
89
|
-
type: Symbol,
|
|
90
89
|
status:
|
|
91
|
-
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol
|
|
90
|
+
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol,
|
|
91
|
+
type: Symbol,
|
|
92
|
+
created_by: String
|
|
92
93
|
}
|
|
93
94
|
)
|
|
94
95
|
end
|
|
@@ -31,6 +31,10 @@ module OpenAI
|
|
|
31
31
|
end
|
|
32
32
|
attr_accessor :role
|
|
33
33
|
|
|
34
|
+
# The type of the message input. Always set to `message`.
|
|
35
|
+
sig { returns(Symbol) }
|
|
36
|
+
attr_accessor :type
|
|
37
|
+
|
|
34
38
|
# The status of item. One of `in_progress`, `completed`, or `incomplete`.
|
|
35
39
|
# Populated when items are returned via API.
|
|
36
40
|
sig do
|
|
@@ -50,23 +54,6 @@ module OpenAI
|
|
|
50
54
|
end
|
|
51
55
|
attr_writer :status
|
|
52
56
|
|
|
53
|
-
# The type of the message input. Always set to `message`.
|
|
54
|
-
sig do
|
|
55
|
-
returns(
|
|
56
|
-
T.nilable(
|
|
57
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
58
|
-
)
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
attr_reader :type
|
|
62
|
-
|
|
63
|
-
sig do
|
|
64
|
-
params(
|
|
65
|
-
type: OpenAI::Responses::ResponseInputMessageItem::Type::OrSymbol
|
|
66
|
-
).void
|
|
67
|
-
end
|
|
68
|
-
attr_writer :type
|
|
69
|
-
|
|
70
57
|
sig do
|
|
71
58
|
params(
|
|
72
59
|
id: String,
|
|
@@ -81,7 +68,7 @@ module OpenAI
|
|
|
81
68
|
role: OpenAI::Responses::ResponseInputMessageItem::Role::OrSymbol,
|
|
82
69
|
status:
|
|
83
70
|
OpenAI::Responses::ResponseInputMessageItem::Status::OrSymbol,
|
|
84
|
-
type:
|
|
71
|
+
type: Symbol
|
|
85
72
|
).returns(T.attached_class)
|
|
86
73
|
end
|
|
87
74
|
def self.new(
|
|
@@ -96,7 +83,7 @@ module OpenAI
|
|
|
96
83
|
# Populated when items are returned via API.
|
|
97
84
|
status: nil,
|
|
98
85
|
# The type of the message input. Always set to `message`.
|
|
99
|
-
type:
|
|
86
|
+
type: :message
|
|
100
87
|
)
|
|
101
88
|
end
|
|
102
89
|
|
|
@@ -108,10 +95,9 @@ module OpenAI
|
|
|
108
95
|
T::Array[OpenAI::Responses::ResponseInputContent::Variants],
|
|
109
96
|
role:
|
|
110
97
|
OpenAI::Responses::ResponseInputMessageItem::Role::TaggedSymbol,
|
|
98
|
+
type: Symbol,
|
|
111
99
|
status:
|
|
112
|
-
OpenAI::Responses::ResponseInputMessageItem::Status::TaggedSymbol
|
|
113
|
-
type:
|
|
114
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
100
|
+
OpenAI::Responses::ResponseInputMessageItem::Status::TaggedSymbol
|
|
115
101
|
}
|
|
116
102
|
)
|
|
117
103
|
end
|
|
@@ -192,33 +178,6 @@ module OpenAI
|
|
|
192
178
|
def self.values
|
|
193
179
|
end
|
|
194
180
|
end
|
|
195
|
-
|
|
196
|
-
# The type of the message input. Always set to `message`.
|
|
197
|
-
module Type
|
|
198
|
-
extend OpenAI::Internal::Type::Enum
|
|
199
|
-
|
|
200
|
-
TaggedSymbol =
|
|
201
|
-
T.type_alias do
|
|
202
|
-
T.all(Symbol, OpenAI::Responses::ResponseInputMessageItem::Type)
|
|
203
|
-
end
|
|
204
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
205
|
-
|
|
206
|
-
MESSAGE =
|
|
207
|
-
T.let(
|
|
208
|
-
:message,
|
|
209
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
sig do
|
|
213
|
-
override.returns(
|
|
214
|
-
T::Array[
|
|
215
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
216
|
-
]
|
|
217
|
-
)
|
|
218
|
-
end
|
|
219
|
-
def self.values
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
181
|
end
|
|
223
182
|
end
|
|
224
183
|
end
|
|
@@ -20,6 +20,8 @@ module OpenAI
|
|
|
20
20
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem,
|
|
21
21
|
OpenAI::Responses::ResponseToolSearchCall,
|
|
22
22
|
OpenAI::Responses::ResponseToolSearchOutputItem,
|
|
23
|
+
OpenAI::Responses::ResponseReasoningItem,
|
|
24
|
+
OpenAI::Responses::ResponseCompactionItem,
|
|
23
25
|
OpenAI::Responses::ResponseItem::ImageGenerationCall,
|
|
24
26
|
OpenAI::Responses::ResponseCodeInterpreterToolCall,
|
|
25
27
|
OpenAI::Responses::ResponseItem::LocalShellCall,
|
|
@@ -31,7 +33,9 @@ module OpenAI
|
|
|
31
33
|
OpenAI::Responses::ResponseItem::McpListTools,
|
|
32
34
|
OpenAI::Responses::ResponseItem::McpApprovalRequest,
|
|
33
35
|
OpenAI::Responses::ResponseItem::McpApprovalResponse,
|
|
34
|
-
OpenAI::Responses::ResponseItem::McpCall
|
|
36
|
+
OpenAI::Responses::ResponseItem::McpCall,
|
|
37
|
+
OpenAI::Responses::ResponseCustomToolCallItem,
|
|
38
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem
|
|
35
39
|
)
|
|
36
40
|
end
|
|
37
41
|
|
|
@@ -50,6 +50,8 @@ module OpenAI
|
|
|
50
50
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::OrHash,
|
|
51
51
|
OpenAI::Responses::ResponseToolSearchCall::OrHash,
|
|
52
52
|
OpenAI::Responses::ResponseToolSearchOutputItem::OrHash,
|
|
53
|
+
OpenAI::Responses::ResponseReasoningItem::OrHash,
|
|
54
|
+
OpenAI::Responses::ResponseCompactionItem::OrHash,
|
|
53
55
|
OpenAI::Responses::ResponseItem::ImageGenerationCall::OrHash,
|
|
54
56
|
OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
|
|
55
57
|
OpenAI::Responses::ResponseItem::LocalShellCall::OrHash,
|
|
@@ -61,7 +63,9 @@ module OpenAI
|
|
|
61
63
|
OpenAI::Responses::ResponseItem::McpListTools::OrHash,
|
|
62
64
|
OpenAI::Responses::ResponseItem::McpApprovalRequest::OrHash,
|
|
63
65
|
OpenAI::Responses::ResponseItem::McpApprovalResponse::OrHash,
|
|
64
|
-
OpenAI::Responses::ResponseItem::McpCall::OrHash
|
|
66
|
+
OpenAI::Responses::ResponseItem::McpCall::OrHash,
|
|
67
|
+
OpenAI::Responses::ResponseCustomToolCallItem::OrHash,
|
|
68
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::OrHash
|
|
65
69
|
)
|
|
66
70
|
],
|
|
67
71
|
first_id: String,
|