openai 0.18.1 → 0.19.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 +20 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/helpers/structured_output/boolean.rb +1 -0
- data/lib/openai/internal/conversation_cursor_page.rb +92 -0
- data/lib/openai/internal/transport/base_client.rb +1 -4
- data/lib/openai/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/openai/internal/util.rb +1 -1
- data/lib/openai/models/audio/transcription.rb +1 -4
- data/lib/openai/models/audio/transcription_create_params.rb +2 -7
- data/lib/openai/models/audio/transcription_text_done_event.rb +1 -4
- data/lib/openai/models/beta/assistant_create_params.rb +6 -19
- data/lib/openai/models/beta/assistant_stream_event.rb +6 -24
- data/lib/openai/models/beta/assistant_update_params.rb +1 -4
- data/lib/openai/models/beta/message_stream_event.rb +1 -4
- data/lib/openai/models/beta/run_step_stream_event.rb +1 -4
- data/lib/openai/models/beta/thread_create_and_run_params.rb +10 -32
- data/lib/openai/models/beta/thread_create_params.rb +7 -22
- data/lib/openai/models/beta/threads/message.rb +3 -10
- data/lib/openai/models/beta/threads/message_create_params.rb +2 -7
- data/lib/openai/models/beta/threads/run.rb +2 -7
- data/lib/openai/models/beta/threads/run_create_params.rb +3 -10
- data/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +1 -3
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +5 -17
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +1 -3
- data/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +4 -12
- data/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +1 -4
- data/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +1 -4
- data/lib/openai/models/beta/threads/text.rb +1 -4
- data/lib/openai/models/chat/chat_completion_chunk.rb +1 -3
- data/lib/openai/models/chat/chat_completion_custom_tool.rb +2 -7
- data/lib/openai/models/conversations/computer_screenshot_content.rb +38 -0
- data/lib/openai/models/conversations/container_file_citation_body.rb +58 -0
- data/lib/openai/models/conversations/conversation.rb +51 -0
- data/lib/openai/models/conversations/conversation_create_params.rb +39 -0
- data/lib/openai/models/conversations/conversation_delete_params.rb +16 -0
- data/lib/openai/models/conversations/conversation_deleted.rb +29 -0
- data/lib/openai/models/conversations/conversation_deleted_resource.rb +30 -0
- data/lib/openai/models/conversations/conversation_item.rb +568 -0
- data/lib/openai/models/conversations/conversation_item_list.rb +55 -0
- data/lib/openai/models/conversations/conversation_retrieve_params.rb +16 -0
- data/lib/openai/models/conversations/conversation_update_params.rb +31 -0
- data/lib/openai/models/conversations/file_citation_body.rb +42 -0
- data/lib/openai/models/conversations/input_file_content.rb +42 -0
- data/lib/openai/models/conversations/input_image_content.rb +62 -0
- data/lib/openai/models/conversations/input_text_content.rb +26 -0
- data/lib/openai/models/conversations/item_create_params.rb +37 -0
- data/lib/openai/models/conversations/item_delete_params.rb +22 -0
- data/lib/openai/models/conversations/item_list_params.rb +84 -0
- data/lib/openai/models/conversations/item_retrieve_params.rb +36 -0
- data/lib/openai/models/conversations/lob_prob.rb +35 -0
- data/lib/openai/models/conversations/message.rb +115 -0
- data/lib/openai/models/conversations/output_text_content.rb +57 -0
- data/lib/openai/models/conversations/refusal_content.rb +26 -0
- data/lib/openai/models/conversations/summary_text_content.rb +23 -0
- data/lib/openai/models/conversations/text_content.rb +23 -0
- data/lib/openai/models/conversations/top_log_prob.rb +29 -0
- data/lib/openai/models/conversations/url_citation_body.rb +50 -0
- data/lib/openai/models/eval_create_params.rb +6 -20
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +29 -53
- data/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb +1 -3
- data/lib/openai/models/evals/run_create_params.rb +18 -54
- data/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb +1 -4
- data/lib/openai/models/moderation.rb +5 -15
- data/lib/openai/models/responses/input_item_list_params.rb +1 -9
- data/lib/openai/models/responses/response.rb +26 -1
- data/lib/openai/models/responses/response_computer_tool_call.rb +2 -6
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +1 -3
- data/lib/openai/models/responses/response_conversation_param.rb +20 -0
- data/lib/openai/models/responses/response_create_params.rb +34 -1
- data/lib/openai/models/responses/response_input_item.rb +2 -7
- data/lib/openai/models/responses/response_input_message_item.rb +1 -4
- data/lib/openai/models/responses/response_output_item.rb +1 -3
- data/lib/openai/models/responses/response_output_message.rb +1 -3
- data/lib/openai/models/responses/response_output_text.rb +3 -10
- data/lib/openai/models/responses/response_stream_event.rb +4 -16
- data/lib/openai/models/responses/response_text_delta_event.rb +1 -3
- data/lib/openai/models/responses/response_text_done_event.rb +1 -3
- data/lib/openai/models/responses/tool.rb +145 -34
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/conversations/items.rb +141 -0
- data/lib/openai/resources/conversations.rb +112 -0
- data/lib/openai/resources/responses/input_items.rb +1 -3
- data/lib/openai/resources/responses.rb +6 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +31 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/errors.rbi +5 -5
- data/rbi/openai/internal/conversation_cursor_page.rbi +25 -0
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +60 -0
- data/rbi/openai/models/conversations/container_file_citation_body.rbi +82 -0
- data/rbi/openai/models/conversations/conversation.rbi +76 -0
- data/rbi/openai/models/conversations/conversation_create_params.rbi +144 -0
- data/rbi/openai/models/conversations/conversation_delete_params.rbi +32 -0
- data/rbi/openai/models/conversations/conversation_deleted.rbi +40 -0
- data/rbi/openai/models/conversations/conversation_deleted_resource.rbi +40 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +835 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +101 -0
- data/rbi/openai/models/conversations/conversation_retrieve_params.rbi +32 -0
- data/rbi/openai/models/conversations/conversation_update_params.rbi +56 -0
- data/rbi/openai/models/conversations/file_citation_body.rbi +61 -0
- data/rbi/openai/models/conversations/input_file_content.rbi +72 -0
- data/rbi/openai/models/conversations/input_image_content.rbi +113 -0
- data/rbi/openai/models/conversations/input_text_content.rbi +38 -0
- data/rbi/openai/models/conversations/item_create_params.rbi +150 -0
- data/rbi/openai/models/conversations/item_delete_params.rbi +40 -0
- data/rbi/openai/models/conversations/item_list_params.rbi +174 -0
- data/rbi/openai/models/conversations/item_retrieve_params.rbi +70 -0
- data/rbi/openai/models/conversations/lob_prob.rbi +50 -0
- data/rbi/openai/models/conversations/message.rbi +196 -0
- data/rbi/openai/models/conversations/output_text_content.rbi +110 -0
- data/rbi/openai/models/conversations/refusal_content.rbi +38 -0
- data/rbi/openai/models/conversations/summary_text_content.rbi +31 -0
- data/rbi/openai/models/conversations/text_content.rbi +28 -0
- data/rbi/openai/models/conversations/top_log_prob.rbi +41 -0
- data/rbi/openai/models/conversations/url_citation_body.rbi +74 -0
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +33 -33
- data/rbi/openai/models/responses/input_item_list_params.rbi +0 -11
- data/rbi/openai/models/responses/response.rbi +49 -0
- data/rbi/openai/models/responses/response_conversation_param.rbi +33 -0
- data/rbi/openai/models/responses/response_create_params.rbi +54 -0
- data/rbi/openai/models/responses/tool.rbi +243 -31
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/conversations/items.rbi +152 -0
- data/rbi/openai/resources/conversations.rbi +110 -0
- data/rbi/openai/resources/responses/input_items.rbi +0 -3
- data/rbi/openai/resources/responses.rbi +26 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/internal/conversation_cursor_page.rbs +15 -0
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +28 -0
- data/sig/openai/models/conversations/container_file_citation_body.rbs +47 -0
- data/sig/openai/models/conversations/conversation.rbs +37 -0
- data/sig/openai/models/conversations/conversation_create_params.rbs +33 -0
- data/sig/openai/models/conversations/conversation_delete_params.rbs +17 -0
- data/sig/openai/models/conversations/conversation_deleted.rbs +28 -0
- data/sig/openai/models/conversations/conversation_deleted_resource.rbs +28 -0
- data/sig/openai/models/conversations/conversation_item.rbs +403 -0
- data/sig/openai/models/conversations/conversation_item_list.rbs +44 -0
- data/sig/openai/models/conversations/conversation_retrieve_params.rbs +17 -0
- data/sig/openai/models/conversations/conversation_update_params.rbs +26 -0
- data/sig/openai/models/conversations/file_citation_body.rbs +37 -0
- data/sig/openai/models/conversations/input_file_content.rbs +41 -0
- data/sig/openai/models/conversations/input_image_content.rbs +49 -0
- data/sig/openai/models/conversations/input_text_content.rbs +17 -0
- data/sig/openai/models/conversations/item_create_params.rbs +37 -0
- data/sig/openai/models/conversations/item_delete_params.rbs +25 -0
- data/sig/openai/models/conversations/item_list_params.rbs +66 -0
- data/sig/openai/models/conversations/item_retrieve_params.rbs +37 -0
- data/sig/openai/models/conversations/lob_prob.rbs +37 -0
- data/sig/openai/models/conversations/message.rbs +95 -0
- data/sig/openai/models/conversations/output_text_content.rbs +52 -0
- data/sig/openai/models/conversations/refusal_content.rbs +17 -0
- data/sig/openai/models/conversations/summary_text_content.rbs +17 -0
- data/sig/openai/models/conversations/text_content.rbs +17 -0
- data/sig/openai/models/conversations/top_log_prob.rbs +28 -0
- data/sig/openai/models/conversations/url_citation_body.rbs +42 -0
- data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +22 -22
- data/sig/openai/models/responses/input_item_list_params.rbs +0 -7
- data/sig/openai/models/responses/response.rbs +15 -0
- data/sig/openai/models/responses/response_conversation_param.rbs +15 -0
- data/sig/openai/models/responses/response_create_params.rbs +14 -0
- data/sig/openai/models/responses/tool.rbs +83 -18
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/conversations/items.rbs +38 -0
- data/sig/openai/resources/conversations.rbs +31 -0
- data/sig/openai/resources/responses/input_items.rbs +0 -1
- data/sig/openai/resources/responses.rbs +2 -0
- metadata +95 -2
@@ -0,0 +1,403 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module ConversationItem = Conversations::ConversationItem
|
4
|
+
|
5
|
+
module Conversations
|
6
|
+
type conversation_item =
|
7
|
+
OpenAI::Conversations::Message
|
8
|
+
| OpenAI::Responses::ResponseFunctionToolCallItem
|
9
|
+
| OpenAI::Responses::ResponseFunctionToolCallOutputItem
|
10
|
+
| OpenAI::Responses::ResponseFileSearchToolCall
|
11
|
+
| OpenAI::Responses::ResponseFunctionWebSearch
|
12
|
+
| OpenAI::Conversations::ConversationItem::ImageGenerationCall
|
13
|
+
| OpenAI::Responses::ResponseComputerToolCall
|
14
|
+
| OpenAI::Responses::ResponseComputerToolCallOutputItem
|
15
|
+
| OpenAI::Responses::ResponseReasoningItem
|
16
|
+
| OpenAI::Responses::ResponseCodeInterpreterToolCall
|
17
|
+
| OpenAI::Conversations::ConversationItem::LocalShellCall
|
18
|
+
| OpenAI::Conversations::ConversationItem::LocalShellCallOutput
|
19
|
+
| OpenAI::Conversations::ConversationItem::McpListTools
|
20
|
+
| OpenAI::Conversations::ConversationItem::McpApprovalRequest
|
21
|
+
| OpenAI::Conversations::ConversationItem::McpApprovalResponse
|
22
|
+
| OpenAI::Conversations::ConversationItem::McpCall
|
23
|
+
| OpenAI::Responses::ResponseCustomToolCall
|
24
|
+
| OpenAI::Responses::ResponseCustomToolCallOutput
|
25
|
+
|
26
|
+
module ConversationItem
|
27
|
+
extend OpenAI::Internal::Type::Union
|
28
|
+
|
29
|
+
type image_generation_call =
|
30
|
+
{
|
31
|
+
id: String,
|
32
|
+
result: String?,
|
33
|
+
status: OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::status,
|
34
|
+
type: :image_generation_call
|
35
|
+
}
|
36
|
+
|
37
|
+
class ImageGenerationCall < OpenAI::Internal::Type::BaseModel
|
38
|
+
attr_accessor id: String
|
39
|
+
|
40
|
+
attr_accessor result: String?
|
41
|
+
|
42
|
+
attr_accessor status: OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::status
|
43
|
+
|
44
|
+
attr_accessor type: :image_generation_call
|
45
|
+
|
46
|
+
def initialize: (
|
47
|
+
id: String,
|
48
|
+
result: String?,
|
49
|
+
status: OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::status,
|
50
|
+
?type: :image_generation_call
|
51
|
+
) -> void
|
52
|
+
|
53
|
+
def to_hash: -> {
|
54
|
+
id: String,
|
55
|
+
result: String?,
|
56
|
+
status: OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::status,
|
57
|
+
type: :image_generation_call
|
58
|
+
}
|
59
|
+
|
60
|
+
type status = :in_progress | :completed | :generating | :failed
|
61
|
+
|
62
|
+
module Status
|
63
|
+
extend OpenAI::Internal::Type::Enum
|
64
|
+
|
65
|
+
IN_PROGRESS: :in_progress
|
66
|
+
COMPLETED: :completed
|
67
|
+
GENERATING: :generating
|
68
|
+
FAILED: :failed
|
69
|
+
|
70
|
+
def self?.values: -> ::Array[OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::status]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
type local_shell_call =
|
75
|
+
{
|
76
|
+
id: String,
|
77
|
+
action: OpenAI::Conversations::ConversationItem::LocalShellCall::Action,
|
78
|
+
call_id: String,
|
79
|
+
status: OpenAI::Models::Conversations::ConversationItem::LocalShellCall::status,
|
80
|
+
type: :local_shell_call
|
81
|
+
}
|
82
|
+
|
83
|
+
class LocalShellCall < OpenAI::Internal::Type::BaseModel
|
84
|
+
attr_accessor id: String
|
85
|
+
|
86
|
+
attr_accessor action: OpenAI::Conversations::ConversationItem::LocalShellCall::Action
|
87
|
+
|
88
|
+
attr_accessor call_id: String
|
89
|
+
|
90
|
+
attr_accessor status: OpenAI::Models::Conversations::ConversationItem::LocalShellCall::status
|
91
|
+
|
92
|
+
attr_accessor type: :local_shell_call
|
93
|
+
|
94
|
+
def initialize: (
|
95
|
+
id: String,
|
96
|
+
action: OpenAI::Conversations::ConversationItem::LocalShellCall::Action,
|
97
|
+
call_id: String,
|
98
|
+
status: OpenAI::Models::Conversations::ConversationItem::LocalShellCall::status,
|
99
|
+
?type: :local_shell_call
|
100
|
+
) -> void
|
101
|
+
|
102
|
+
def to_hash: -> {
|
103
|
+
id: String,
|
104
|
+
action: OpenAI::Conversations::ConversationItem::LocalShellCall::Action,
|
105
|
+
call_id: String,
|
106
|
+
status: OpenAI::Models::Conversations::ConversationItem::LocalShellCall::status,
|
107
|
+
type: :local_shell_call
|
108
|
+
}
|
109
|
+
|
110
|
+
type action =
|
111
|
+
{
|
112
|
+
command: ::Array[String],
|
113
|
+
env: ::Hash[Symbol, String],
|
114
|
+
type: :exec,
|
115
|
+
timeout_ms: Integer?,
|
116
|
+
user: String?,
|
117
|
+
working_directory: String?
|
118
|
+
}
|
119
|
+
|
120
|
+
class Action < OpenAI::Internal::Type::BaseModel
|
121
|
+
attr_accessor command: ::Array[String]
|
122
|
+
|
123
|
+
attr_accessor env: ::Hash[Symbol, String]
|
124
|
+
|
125
|
+
attr_accessor type: :exec
|
126
|
+
|
127
|
+
attr_accessor timeout_ms: Integer?
|
128
|
+
|
129
|
+
attr_accessor user: String?
|
130
|
+
|
131
|
+
attr_accessor working_directory: String?
|
132
|
+
|
133
|
+
def initialize: (
|
134
|
+
command: ::Array[String],
|
135
|
+
env: ::Hash[Symbol, String],
|
136
|
+
?timeout_ms: Integer?,
|
137
|
+
?user: String?,
|
138
|
+
?working_directory: String?,
|
139
|
+
?type: :exec
|
140
|
+
) -> void
|
141
|
+
|
142
|
+
def to_hash: -> {
|
143
|
+
command: ::Array[String],
|
144
|
+
env: ::Hash[Symbol, String],
|
145
|
+
type: :exec,
|
146
|
+
timeout_ms: Integer?,
|
147
|
+
user: String?,
|
148
|
+
working_directory: String?
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
type status = :in_progress | :completed | :incomplete
|
153
|
+
|
154
|
+
module Status
|
155
|
+
extend OpenAI::Internal::Type::Enum
|
156
|
+
|
157
|
+
IN_PROGRESS: :in_progress
|
158
|
+
COMPLETED: :completed
|
159
|
+
INCOMPLETE: :incomplete
|
160
|
+
|
161
|
+
def self?.values: -> ::Array[OpenAI::Models::Conversations::ConversationItem::LocalShellCall::status]
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
type local_shell_call_output =
|
166
|
+
{
|
167
|
+
id: String,
|
168
|
+
output: String,
|
169
|
+
type: :local_shell_call_output,
|
170
|
+
status: OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::status?
|
171
|
+
}
|
172
|
+
|
173
|
+
class LocalShellCallOutput < OpenAI::Internal::Type::BaseModel
|
174
|
+
attr_accessor id: String
|
175
|
+
|
176
|
+
attr_accessor output: String
|
177
|
+
|
178
|
+
attr_accessor type: :local_shell_call_output
|
179
|
+
|
180
|
+
attr_accessor status: OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::status?
|
181
|
+
|
182
|
+
def initialize: (
|
183
|
+
id: String,
|
184
|
+
output: String,
|
185
|
+
?status: OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::status?,
|
186
|
+
?type: :local_shell_call_output
|
187
|
+
) -> void
|
188
|
+
|
189
|
+
def to_hash: -> {
|
190
|
+
id: String,
|
191
|
+
output: String,
|
192
|
+
type: :local_shell_call_output,
|
193
|
+
status: OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::status?
|
194
|
+
}
|
195
|
+
|
196
|
+
type status = :in_progress | :completed | :incomplete
|
197
|
+
|
198
|
+
module Status
|
199
|
+
extend OpenAI::Internal::Type::Enum
|
200
|
+
|
201
|
+
IN_PROGRESS: :in_progress
|
202
|
+
COMPLETED: :completed
|
203
|
+
INCOMPLETE: :incomplete
|
204
|
+
|
205
|
+
def self?.values: -> ::Array[OpenAI::Models::Conversations::ConversationItem::LocalShellCallOutput::status]
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
type mcp_list_tools =
|
210
|
+
{
|
211
|
+
id: String,
|
212
|
+
server_label: String,
|
213
|
+
tools: ::Array[OpenAI::Conversations::ConversationItem::McpListTools::Tool],
|
214
|
+
type: :mcp_list_tools,
|
215
|
+
error: String?
|
216
|
+
}
|
217
|
+
|
218
|
+
class McpListTools < OpenAI::Internal::Type::BaseModel
|
219
|
+
attr_accessor id: String
|
220
|
+
|
221
|
+
attr_accessor server_label: String
|
222
|
+
|
223
|
+
attr_accessor tools: ::Array[OpenAI::Conversations::ConversationItem::McpListTools::Tool]
|
224
|
+
|
225
|
+
attr_accessor type: :mcp_list_tools
|
226
|
+
|
227
|
+
attr_accessor error: String?
|
228
|
+
|
229
|
+
def initialize: (
|
230
|
+
id: String,
|
231
|
+
server_label: String,
|
232
|
+
tools: ::Array[OpenAI::Conversations::ConversationItem::McpListTools::Tool],
|
233
|
+
?error: String?,
|
234
|
+
?type: :mcp_list_tools
|
235
|
+
) -> void
|
236
|
+
|
237
|
+
def to_hash: -> {
|
238
|
+
id: String,
|
239
|
+
server_label: String,
|
240
|
+
tools: ::Array[OpenAI::Conversations::ConversationItem::McpListTools::Tool],
|
241
|
+
type: :mcp_list_tools,
|
242
|
+
error: String?
|
243
|
+
}
|
244
|
+
|
245
|
+
type tool =
|
246
|
+
{
|
247
|
+
input_schema: top,
|
248
|
+
name: String,
|
249
|
+
annotations: top?,
|
250
|
+
description: String?
|
251
|
+
}
|
252
|
+
|
253
|
+
class Tool < OpenAI::Internal::Type::BaseModel
|
254
|
+
attr_accessor input_schema: top
|
255
|
+
|
256
|
+
attr_accessor name: String
|
257
|
+
|
258
|
+
attr_accessor annotations: top?
|
259
|
+
|
260
|
+
attr_accessor description: String?
|
261
|
+
|
262
|
+
def initialize: (
|
263
|
+
input_schema: top,
|
264
|
+
name: String,
|
265
|
+
?annotations: top?,
|
266
|
+
?description: String?
|
267
|
+
) -> void
|
268
|
+
|
269
|
+
def to_hash: -> {
|
270
|
+
input_schema: top,
|
271
|
+
name: String,
|
272
|
+
annotations: top?,
|
273
|
+
description: String?
|
274
|
+
}
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
type mcp_approval_request =
|
279
|
+
{
|
280
|
+
id: String,
|
281
|
+
arguments: String,
|
282
|
+
name: String,
|
283
|
+
server_label: String,
|
284
|
+
type: :mcp_approval_request
|
285
|
+
}
|
286
|
+
|
287
|
+
class McpApprovalRequest < OpenAI::Internal::Type::BaseModel
|
288
|
+
attr_accessor id: String
|
289
|
+
|
290
|
+
attr_accessor arguments: String
|
291
|
+
|
292
|
+
attr_accessor name: String
|
293
|
+
|
294
|
+
attr_accessor server_label: String
|
295
|
+
|
296
|
+
attr_accessor type: :mcp_approval_request
|
297
|
+
|
298
|
+
def initialize: (
|
299
|
+
id: String,
|
300
|
+
arguments: String,
|
301
|
+
name: String,
|
302
|
+
server_label: String,
|
303
|
+
?type: :mcp_approval_request
|
304
|
+
) -> void
|
305
|
+
|
306
|
+
def to_hash: -> {
|
307
|
+
id: String,
|
308
|
+
arguments: String,
|
309
|
+
name: String,
|
310
|
+
server_label: String,
|
311
|
+
type: :mcp_approval_request
|
312
|
+
}
|
313
|
+
end
|
314
|
+
|
315
|
+
type mcp_approval_response =
|
316
|
+
{
|
317
|
+
id: String,
|
318
|
+
approval_request_id: String,
|
319
|
+
approve: bool,
|
320
|
+
type: :mcp_approval_response,
|
321
|
+
reason: String?
|
322
|
+
}
|
323
|
+
|
324
|
+
class McpApprovalResponse < OpenAI::Internal::Type::BaseModel
|
325
|
+
attr_accessor id: String
|
326
|
+
|
327
|
+
attr_accessor approval_request_id: String
|
328
|
+
|
329
|
+
attr_accessor approve: bool
|
330
|
+
|
331
|
+
attr_accessor type: :mcp_approval_response
|
332
|
+
|
333
|
+
attr_accessor reason: String?
|
334
|
+
|
335
|
+
def initialize: (
|
336
|
+
id: String,
|
337
|
+
approval_request_id: String,
|
338
|
+
approve: bool,
|
339
|
+
?reason: String?,
|
340
|
+
?type: :mcp_approval_response
|
341
|
+
) -> void
|
342
|
+
|
343
|
+
def to_hash: -> {
|
344
|
+
id: String,
|
345
|
+
approval_request_id: String,
|
346
|
+
approve: bool,
|
347
|
+
type: :mcp_approval_response,
|
348
|
+
reason: String?
|
349
|
+
}
|
350
|
+
end
|
351
|
+
|
352
|
+
type mcp_call =
|
353
|
+
{
|
354
|
+
id: String,
|
355
|
+
arguments: String,
|
356
|
+
name: String,
|
357
|
+
server_label: String,
|
358
|
+
type: :mcp_call,
|
359
|
+
error: String?,
|
360
|
+
output: String?
|
361
|
+
}
|
362
|
+
|
363
|
+
class McpCall < OpenAI::Internal::Type::BaseModel
|
364
|
+
attr_accessor id: String
|
365
|
+
|
366
|
+
attr_accessor arguments: String
|
367
|
+
|
368
|
+
attr_accessor name: String
|
369
|
+
|
370
|
+
attr_accessor server_label: String
|
371
|
+
|
372
|
+
attr_accessor type: :mcp_call
|
373
|
+
|
374
|
+
attr_accessor error: String?
|
375
|
+
|
376
|
+
attr_accessor output: String?
|
377
|
+
|
378
|
+
def initialize: (
|
379
|
+
id: String,
|
380
|
+
arguments: String,
|
381
|
+
name: String,
|
382
|
+
server_label: String,
|
383
|
+
?error: String?,
|
384
|
+
?output: String?,
|
385
|
+
?type: :mcp_call
|
386
|
+
) -> void
|
387
|
+
|
388
|
+
def to_hash: -> {
|
389
|
+
id: String,
|
390
|
+
arguments: String,
|
391
|
+
name: String,
|
392
|
+
server_label: String,
|
393
|
+
type: :mcp_call,
|
394
|
+
error: String?,
|
395
|
+
output: String?
|
396
|
+
}
|
397
|
+
end
|
398
|
+
|
399
|
+
def self?.variants: -> ::Array[OpenAI::Models::Conversations::conversation_item]
|
400
|
+
end
|
401
|
+
end
|
402
|
+
end
|
403
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
class ConversationItemList = Conversations::ConversationItemList
|
4
|
+
|
5
|
+
module Conversations
|
6
|
+
type conversation_item_list =
|
7
|
+
{
|
8
|
+
data: ::Array[OpenAI::Models::Conversations::conversation_item],
|
9
|
+
first_id: String,
|
10
|
+
has_more: bool,
|
11
|
+
last_id: String,
|
12
|
+
object: :list
|
13
|
+
}
|
14
|
+
|
15
|
+
class ConversationItemList < OpenAI::Internal::Type::BaseModel
|
16
|
+
attr_accessor data: ::Array[OpenAI::Models::Conversations::conversation_item]
|
17
|
+
|
18
|
+
attr_accessor first_id: String
|
19
|
+
|
20
|
+
attr_accessor has_more: bool
|
21
|
+
|
22
|
+
attr_accessor last_id: String
|
23
|
+
|
24
|
+
attr_accessor object: :list
|
25
|
+
|
26
|
+
def initialize: (
|
27
|
+
data: ::Array[OpenAI::Models::Conversations::conversation_item],
|
28
|
+
first_id: String,
|
29
|
+
has_more: bool,
|
30
|
+
last_id: String,
|
31
|
+
?object: :list
|
32
|
+
) -> void
|
33
|
+
|
34
|
+
def to_hash: -> {
|
35
|
+
data: ::Array[OpenAI::Models::Conversations::conversation_item],
|
36
|
+
first_id: String,
|
37
|
+
has_more: bool,
|
38
|
+
last_id: String,
|
39
|
+
object: :list
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type conversation_retrieve_params =
|
5
|
+
{ } & OpenAI::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class ConversationRetrieveParams < 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,26 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type conversation_update_params =
|
5
|
+
{ metadata: ::Hash[Symbol, String] }
|
6
|
+
& OpenAI::Internal::Type::request_parameters
|
7
|
+
|
8
|
+
class ConversationUpdateParams < OpenAI::Internal::Type::BaseModel
|
9
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
10
|
+
include OpenAI::Internal::Type::RequestParameters
|
11
|
+
|
12
|
+
attr_accessor metadata: ::Hash[Symbol, String]
|
13
|
+
|
14
|
+
def initialize: (
|
15
|
+
metadata: ::Hash[Symbol, String],
|
16
|
+
?request_options: OpenAI::request_opts
|
17
|
+
) -> void
|
18
|
+
|
19
|
+
def to_hash: -> {
|
20
|
+
metadata: ::Hash[Symbol, String],
|
21
|
+
request_options: OpenAI::RequestOptions
|
22
|
+
}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type file_citation_body =
|
5
|
+
{
|
6
|
+
file_id: String,
|
7
|
+
filename: String,
|
8
|
+
index: Integer,
|
9
|
+
type: :file_citation
|
10
|
+
}
|
11
|
+
|
12
|
+
class FileCitationBody < OpenAI::Internal::Type::BaseModel
|
13
|
+
attr_accessor file_id: String
|
14
|
+
|
15
|
+
attr_accessor filename: String
|
16
|
+
|
17
|
+
attr_accessor index: Integer
|
18
|
+
|
19
|
+
attr_accessor type: :file_citation
|
20
|
+
|
21
|
+
def initialize: (
|
22
|
+
file_id: String,
|
23
|
+
filename: String,
|
24
|
+
index: Integer,
|
25
|
+
?type: :file_citation
|
26
|
+
) -> void
|
27
|
+
|
28
|
+
def to_hash: -> {
|
29
|
+
file_id: String,
|
30
|
+
filename: String,
|
31
|
+
index: Integer,
|
32
|
+
type: :file_citation
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type input_file_content =
|
5
|
+
{
|
6
|
+
file_id: String?,
|
7
|
+
type: :input_file,
|
8
|
+
file_url: String,
|
9
|
+
filename: String
|
10
|
+
}
|
11
|
+
|
12
|
+
class InputFileContent < OpenAI::Internal::Type::BaseModel
|
13
|
+
attr_accessor file_id: String?
|
14
|
+
|
15
|
+
attr_accessor type: :input_file
|
16
|
+
|
17
|
+
attr_reader file_url: String?
|
18
|
+
|
19
|
+
def file_url=: (String) -> String
|
20
|
+
|
21
|
+
attr_reader filename: String?
|
22
|
+
|
23
|
+
def filename=: (String) -> String
|
24
|
+
|
25
|
+
def initialize: (
|
26
|
+
file_id: String?,
|
27
|
+
?file_url: String,
|
28
|
+
?filename: String,
|
29
|
+
?type: :input_file
|
30
|
+
) -> void
|
31
|
+
|
32
|
+
def to_hash: -> {
|
33
|
+
file_id: String?,
|
34
|
+
type: :input_file,
|
35
|
+
file_url: String,
|
36
|
+
filename: String
|
37
|
+
}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type input_image_content =
|
5
|
+
{
|
6
|
+
detail: OpenAI::Models::Conversations::InputImageContent::detail,
|
7
|
+
file_id: String?,
|
8
|
+
image_url: String?,
|
9
|
+
type: :input_image
|
10
|
+
}
|
11
|
+
|
12
|
+
class InputImageContent < OpenAI::Internal::Type::BaseModel
|
13
|
+
attr_accessor detail: OpenAI::Models::Conversations::InputImageContent::detail
|
14
|
+
|
15
|
+
attr_accessor file_id: String?
|
16
|
+
|
17
|
+
attr_accessor image_url: String?
|
18
|
+
|
19
|
+
attr_accessor type: :input_image
|
20
|
+
|
21
|
+
def initialize: (
|
22
|
+
detail: OpenAI::Models::Conversations::InputImageContent::detail,
|
23
|
+
file_id: String?,
|
24
|
+
image_url: String?,
|
25
|
+
?type: :input_image
|
26
|
+
) -> void
|
27
|
+
|
28
|
+
def to_hash: -> {
|
29
|
+
detail: OpenAI::Models::Conversations::InputImageContent::detail,
|
30
|
+
file_id: String?,
|
31
|
+
image_url: String?,
|
32
|
+
type: :input_image
|
33
|
+
}
|
34
|
+
|
35
|
+
type detail = :low | :high | :auto
|
36
|
+
|
37
|
+
module Detail
|
38
|
+
extend OpenAI::Internal::Type::Enum
|
39
|
+
|
40
|
+
LOW: :low
|
41
|
+
HIGH: :high
|
42
|
+
AUTO: :auto
|
43
|
+
|
44
|
+
def self?.values: -> ::Array[OpenAI::Models::Conversations::InputImageContent::detail]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type input_text_content = { text: String, type: :input_text }
|
5
|
+
|
6
|
+
class InputTextContent < OpenAI::Internal::Type::BaseModel
|
7
|
+
attr_accessor text: String
|
8
|
+
|
9
|
+
attr_accessor type: :input_text
|
10
|
+
|
11
|
+
def initialize: (text: String, ?type: :input_text) -> void
|
12
|
+
|
13
|
+
def to_hash: -> { text: String, type: :input_text }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type item_create_params =
|
5
|
+
{
|
6
|
+
items: ::Array[OpenAI::Models::Responses::response_input_item],
|
7
|
+
include: ::Array[OpenAI::Models::Responses::response_includable]
|
8
|
+
}
|
9
|
+
& OpenAI::Internal::Type::request_parameters
|
10
|
+
|
11
|
+
class ItemCreateParams < OpenAI::Internal::Type::BaseModel
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
14
|
+
|
15
|
+
attr_accessor items: ::Array[OpenAI::Models::Responses::response_input_item]
|
16
|
+
|
17
|
+
attr_reader include: ::Array[OpenAI::Models::Responses::response_includable]?
|
18
|
+
|
19
|
+
def include=: (
|
20
|
+
::Array[OpenAI::Models::Responses::response_includable]
|
21
|
+
) -> ::Array[OpenAI::Models::Responses::response_includable]
|
22
|
+
|
23
|
+
def initialize: (
|
24
|
+
items: ::Array[OpenAI::Models::Responses::response_input_item],
|
25
|
+
?include: ::Array[OpenAI::Models::Responses::response_includable],
|
26
|
+
?request_options: OpenAI::request_opts
|
27
|
+
) -> void
|
28
|
+
|
29
|
+
def to_hash: -> {
|
30
|
+
items: ::Array[OpenAI::Models::Responses::response_input_item],
|
31
|
+
include: ::Array[OpenAI::Models::Responses::response_includable],
|
32
|
+
request_options: OpenAI::RequestOptions
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type item_delete_params =
|
5
|
+
{ conversation_id: String } & OpenAI::Internal::Type::request_parameters
|
6
|
+
|
7
|
+
class ItemDeleteParams < OpenAI::Internal::Type::BaseModel
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
attr_accessor conversation_id: String
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
conversation_id: String,
|
15
|
+
?request_options: OpenAI::request_opts
|
16
|
+
) -> void
|
17
|
+
|
18
|
+
def to_hash: -> {
|
19
|
+
conversation_id: String,
|
20
|
+
request_options: OpenAI::RequestOptions
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|