openai 0.17.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 +50 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/helpers/structured_output/array_of.rb +2 -10
- data/lib/openai/helpers/structured_output/base_model.rb +4 -11
- data/lib/openai/helpers/structured_output/boolean.rb +1 -0
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +19 -3
- data/lib/openai/helpers/structured_output/union_of.rb +2 -10
- 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/batch_create_params.rb +38 -1
- 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 +12 -34
- 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 +4 -9
- data/lib/openai/models/beta/threads/run_create_params.rb +5 -12
- 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.rb +6 -6
- data/lib/openai/models/chat/chat_completion_chunk.rb +7 -9
- data/lib/openai/models/chat/chat_completion_custom_tool.rb +2 -7
- data/lib/openai/models/chat/completion_create_params.rb +7 -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/file_create_params.rb +37 -1
- data/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb +1 -4
- data/lib/openai/models/graders/text_similarity_grader.rb +6 -5
- data/lib/openai/models/moderation.rb +5 -15
- data/lib/openai/models/reasoning.rb +1 -1
- data/lib/openai/models/responses/input_item_list_params.rb +1 -9
- data/lib/openai/models/responses/response.rb +32 -9
- 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 +40 -9
- 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/upload_create_params.rb +37 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/batches.rb +3 -1
- data/lib/openai/resources/conversations/items.rb +141 -0
- data/lib/openai/resources/conversations.rb +112 -0
- data/lib/openai/resources/files.rb +4 -2
- data/lib/openai/resources/responses/input_items.rb +1 -3
- data/lib/openai/resources/responses.rb +8 -4
- data/lib/openai/resources/uploads.rb +3 -1
- 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/helpers/structured_output/array_of.rbi +0 -3
- data/rbi/openai/helpers/structured_output/json_schema_converter.rbi +10 -0
- data/rbi/openai/internal/conversation_cursor_page.rbi +25 -0
- data/rbi/openai/models/batch_create_params.rbi +60 -0
- data/rbi/openai/models/beta/thread_create_and_run_params.rbi +3 -3
- data/rbi/openai/models/beta/threads/run.rbi +3 -3
- data/rbi/openai/models/beta/threads/run_create_params.rbi +3 -3
- data/rbi/openai/models/chat/chat_completion.rbi +6 -9
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +6 -9
- data/rbi/openai/models/chat/completion_create_params.rbi +8 -11
- 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/file_create_params.rbi +56 -0
- data/rbi/openai/models/graders/text_similarity_grader.rbi +11 -6
- data/rbi/openai/models/reasoning.rbi +1 -1
- data/rbi/openai/models/responses/input_item_list_params.rbi +0 -11
- data/rbi/openai/models/responses/response.rbi +57 -11
- data/rbi/openai/models/responses/response_conversation_param.rbi +33 -0
- data/rbi/openai/models/responses/response_create_params.rbi +62 -11
- data/rbi/openai/models/responses/tool.rbi +243 -31
- data/rbi/openai/models/upload_create_params.rbi +56 -0
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/batches.rbi +5 -0
- data/rbi/openai/resources/beta/threads/runs.rbi +2 -2
- data/rbi/openai/resources/beta/threads.rbi +2 -2
- data/rbi/openai/resources/chat/completions.rbi +6 -8
- data/rbi/openai/resources/conversations/items.rbi +152 -0
- data/rbi/openai/resources/conversations.rbi +110 -0
- data/rbi/openai/resources/files.rbi +5 -1
- data/rbi/openai/resources/responses/input_items.rbi +0 -3
- data/rbi/openai/resources/responses.rbi +32 -8
- data/rbi/openai/resources/uploads.rbi +4 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/internal/conversation_cursor_page.rbs +15 -0
- data/sig/openai/models/batch_create_params.rbs +22 -1
- 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/file_create_params.rbs +22 -1
- data/sig/openai/models/graders/text_similarity_grader.rbs +3 -1
- 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/upload_create_params.rbs +22 -1
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/batches.rbs +1 -0
- data/sig/openai/resources/conversations/items.rbs +38 -0
- data/sig/openai/resources/conversations.rbs +31 -0
- data/sig/openai/resources/files.rbs +1 -0
- data/sig/openai/resources/responses/input_items.rbs +0 -1
- data/sig/openai/resources/responses.rbs +2 -0
- data/sig/openai/resources/uploads.rbs +1 -0
- metadata +95 -2
@@ -0,0 +1,42 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Conversations
|
4
|
+
type url_citation_body =
|
5
|
+
{
|
6
|
+
end_index: Integer,
|
7
|
+
start_index: Integer,
|
8
|
+
title: String,
|
9
|
+
type: :url_citation,
|
10
|
+
url: String
|
11
|
+
}
|
12
|
+
|
13
|
+
class URLCitationBody < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor end_index: Integer
|
15
|
+
|
16
|
+
attr_accessor start_index: Integer
|
17
|
+
|
18
|
+
attr_accessor title: String
|
19
|
+
|
20
|
+
attr_accessor type: :url_citation
|
21
|
+
|
22
|
+
attr_accessor url: String
|
23
|
+
|
24
|
+
def initialize: (
|
25
|
+
end_index: Integer,
|
26
|
+
start_index: Integer,
|
27
|
+
title: String,
|
28
|
+
url: String,
|
29
|
+
?type: :url_citation
|
30
|
+
) -> void
|
31
|
+
|
32
|
+
def to_hash: -> {
|
33
|
+
end_index: Integer,
|
34
|
+
start_index: Integer,
|
35
|
+
title: String,
|
36
|
+
type: :url_citation,
|
37
|
+
url: String
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -195,46 +195,46 @@ module OpenAI
|
|
195
195
|
|
196
196
|
type template =
|
197
197
|
OpenAI::Responses::EasyInputMessage
|
198
|
-
| OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
198
|
+
| OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem
|
199
199
|
|
200
200
|
module Template
|
201
201
|
extend OpenAI::Internal::Type::Union
|
202
202
|
|
203
|
-
type
|
203
|
+
type eval_item =
|
204
204
|
{
|
205
|
-
content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
206
|
-
role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
207
|
-
type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
205
|
+
content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::content,
|
206
|
+
role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::role,
|
207
|
+
type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_
|
208
208
|
}
|
209
209
|
|
210
|
-
class
|
211
|
-
attr_accessor content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
210
|
+
class EvalItem < OpenAI::Internal::Type::BaseModel
|
211
|
+
attr_accessor content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::content
|
212
212
|
|
213
|
-
attr_accessor role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
213
|
+
attr_accessor role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::role
|
214
214
|
|
215
|
-
attr_reader type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
215
|
+
attr_reader type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_?
|
216
216
|
|
217
217
|
def type=: (
|
218
|
-
OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
219
|
-
) -> OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
218
|
+
OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_
|
219
|
+
) -> OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_
|
220
220
|
|
221
221
|
def initialize: (
|
222
|
-
content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
223
|
-
role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
224
|
-
?type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
222
|
+
content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::content,
|
223
|
+
role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::role,
|
224
|
+
?type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_
|
225
225
|
) -> void
|
226
226
|
|
227
227
|
def to_hash: -> {
|
228
|
-
content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
229
|
-
role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
230
|
-
type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
228
|
+
content: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::content,
|
229
|
+
role: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::role,
|
230
|
+
type: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_
|
231
231
|
}
|
232
232
|
|
233
233
|
type content =
|
234
234
|
String
|
235
235
|
| OpenAI::Responses::ResponseInputText
|
236
|
-
| OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
237
|
-
| OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
236
|
+
| OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::OutputText
|
237
|
+
| OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::Content::InputImage
|
238
238
|
| ::Array[top]
|
239
239
|
|
240
240
|
module Content
|
@@ -277,7 +277,7 @@ module OpenAI
|
|
277
277
|
}
|
278
278
|
end
|
279
279
|
|
280
|
-
def self?.variants: -> ::Array[OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
280
|
+
def self?.variants: -> ::Array[OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::content]
|
281
281
|
|
282
282
|
AnArrayOfInputTextAndInputImageArray: OpenAI::Internal::Type::Converter
|
283
283
|
end
|
@@ -292,7 +292,7 @@ module OpenAI
|
|
292
292
|
SYSTEM: :system
|
293
293
|
DEVELOPER: :developer
|
294
294
|
|
295
|
-
def self?.values: -> ::Array[OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
295
|
+
def self?.values: -> ::Array[OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::role]
|
296
296
|
end
|
297
297
|
|
298
298
|
type type_ = :message
|
@@ -302,7 +302,7 @@ module OpenAI
|
|
302
302
|
|
303
303
|
MESSAGE: :message
|
304
304
|
|
305
|
-
def self?.values: -> ::Array[OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::
|
305
|
+
def self?.values: -> ::Array[OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template::Template::EvalItem::type_]
|
306
306
|
end
|
307
307
|
end
|
308
308
|
|
@@ -3,7 +3,8 @@ module OpenAI
|
|
3
3
|
type file_create_params =
|
4
4
|
{
|
5
5
|
file: OpenAI::Internal::file_input,
|
6
|
-
purpose: OpenAI::Models::file_purpose
|
6
|
+
purpose: OpenAI::Models::file_purpose,
|
7
|
+
expires_after: OpenAI::FileCreateParams::ExpiresAfter
|
7
8
|
}
|
8
9
|
& OpenAI::Internal::Type::request_parameters
|
9
10
|
|
@@ -15,17 +16,37 @@ module OpenAI
|
|
15
16
|
|
16
17
|
attr_accessor purpose: OpenAI::Models::file_purpose
|
17
18
|
|
19
|
+
attr_reader expires_after: OpenAI::FileCreateParams::ExpiresAfter?
|
20
|
+
|
21
|
+
def expires_after=: (
|
22
|
+
OpenAI::FileCreateParams::ExpiresAfter
|
23
|
+
) -> OpenAI::FileCreateParams::ExpiresAfter
|
24
|
+
|
18
25
|
def initialize: (
|
19
26
|
file: OpenAI::Internal::file_input,
|
20
27
|
purpose: OpenAI::Models::file_purpose,
|
28
|
+
?expires_after: OpenAI::FileCreateParams::ExpiresAfter,
|
21
29
|
?request_options: OpenAI::request_opts
|
22
30
|
) -> void
|
23
31
|
|
24
32
|
def to_hash: -> {
|
25
33
|
file: OpenAI::Internal::file_input,
|
26
34
|
purpose: OpenAI::Models::file_purpose,
|
35
|
+
expires_after: OpenAI::FileCreateParams::ExpiresAfter,
|
27
36
|
request_options: OpenAI::RequestOptions
|
28
37
|
}
|
38
|
+
|
39
|
+
type expires_after = { anchor: :created_at, seconds: Integer }
|
40
|
+
|
41
|
+
class ExpiresAfter < OpenAI::Internal::Type::BaseModel
|
42
|
+
attr_accessor anchor: :created_at
|
43
|
+
|
44
|
+
attr_accessor seconds: Integer
|
45
|
+
|
46
|
+
def initialize: (seconds: Integer, ?anchor: :created_at) -> void
|
47
|
+
|
48
|
+
def to_hash: -> { anchor: :created_at, seconds: Integer }
|
49
|
+
end
|
29
50
|
end
|
30
51
|
end
|
31
52
|
end
|
@@ -40,7 +40,8 @@ module OpenAI
|
|
40
40
|
}
|
41
41
|
|
42
42
|
type evaluation_metric =
|
43
|
-
:
|
43
|
+
:cosine
|
44
|
+
| :fuzzy_match
|
44
45
|
| :bleu
|
45
46
|
| :gleu
|
46
47
|
| :meteor
|
@@ -54,6 +55,7 @@ module OpenAI
|
|
54
55
|
module EvaluationMetric
|
55
56
|
extend OpenAI::Internal::Type::Enum
|
56
57
|
|
58
|
+
COSINE: :cosine
|
57
59
|
FUZZY_MATCH: :fuzzy_match
|
58
60
|
BLEU: :bleu
|
59
61
|
GLEU: :gleu
|
@@ -4,7 +4,6 @@ module OpenAI
|
|
4
4
|
type input_item_list_params =
|
5
5
|
{
|
6
6
|
after: String,
|
7
|
-
before: String,
|
8
7
|
include: ::Array[OpenAI::Models::Responses::response_includable],
|
9
8
|
limit: Integer,
|
10
9
|
order: OpenAI::Models::Responses::InputItemListParams::order
|
@@ -19,10 +18,6 @@ module OpenAI
|
|
19
18
|
|
20
19
|
def after=: (String) -> String
|
21
20
|
|
22
|
-
attr_reader before: String?
|
23
|
-
|
24
|
-
def before=: (String) -> String
|
25
|
-
|
26
21
|
attr_reader include: ::Array[OpenAI::Models::Responses::response_includable]?
|
27
22
|
|
28
23
|
def include=: (
|
@@ -41,7 +36,6 @@ module OpenAI
|
|
41
36
|
|
42
37
|
def initialize: (
|
43
38
|
?after: String,
|
44
|
-
?before: String,
|
45
39
|
?include: ::Array[OpenAI::Models::Responses::response_includable],
|
46
40
|
?limit: Integer,
|
47
41
|
?order: OpenAI::Models::Responses::InputItemListParams::order,
|
@@ -50,7 +44,6 @@ module OpenAI
|
|
50
44
|
|
51
45
|
def to_hash: -> {
|
52
46
|
after: String,
|
53
|
-
before: String,
|
54
47
|
include: ::Array[OpenAI::Models::Responses::response_includable],
|
55
48
|
limit: Integer,
|
56
49
|
order: OpenAI::Models::Responses::InputItemListParams::order,
|
@@ -18,6 +18,7 @@ module OpenAI
|
|
18
18
|
tools: ::Array[OpenAI::Models::Responses::tool],
|
19
19
|
top_p: Float?,
|
20
20
|
background: bool?,
|
21
|
+
conversation: OpenAI::Responses::Response::Conversation?,
|
21
22
|
max_output_tokens: Integer?,
|
22
23
|
max_tool_calls: Integer?,
|
23
24
|
previous_response_id: String?,
|
@@ -65,6 +66,8 @@ module OpenAI
|
|
65
66
|
|
66
67
|
attr_accessor background: bool?
|
67
68
|
|
69
|
+
attr_accessor conversation: OpenAI::Responses::Response::Conversation?
|
70
|
+
|
68
71
|
attr_accessor max_output_tokens: Integer?
|
69
72
|
|
70
73
|
attr_accessor max_tool_calls: Integer?
|
@@ -126,6 +129,7 @@ module OpenAI
|
|
126
129
|
tools: ::Array[OpenAI::Models::Responses::tool],
|
127
130
|
top_p: Float?,
|
128
131
|
?background: bool?,
|
132
|
+
?conversation: OpenAI::Responses::Response::Conversation?,
|
129
133
|
?max_output_tokens: Integer?,
|
130
134
|
?max_tool_calls: Integer?,
|
131
135
|
?previous_response_id: String?,
|
@@ -159,6 +163,7 @@ module OpenAI
|
|
159
163
|
tools: ::Array[OpenAI::Models::Responses::tool],
|
160
164
|
top_p: Float?,
|
161
165
|
background: bool?,
|
166
|
+
conversation: OpenAI::Responses::Response::Conversation?,
|
162
167
|
max_output_tokens: Integer?,
|
163
168
|
max_tool_calls: Integer?,
|
164
169
|
previous_response_id: String?,
|
@@ -232,6 +237,16 @@ module OpenAI
|
|
232
237
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::Response::tool_choice]
|
233
238
|
end
|
234
239
|
|
240
|
+
type conversation = { id: String }
|
241
|
+
|
242
|
+
class Conversation < OpenAI::Internal::Type::BaseModel
|
243
|
+
attr_accessor id: String
|
244
|
+
|
245
|
+
def initialize: (id: String) -> void
|
246
|
+
|
247
|
+
def to_hash: -> { id: String }
|
248
|
+
end
|
249
|
+
|
235
250
|
type service_tier = :auto | :default | :flex | :scale | :priority
|
236
251
|
|
237
252
|
module ServiceTier
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Responses
|
4
|
+
type response_conversation_param = { id: String }
|
5
|
+
|
6
|
+
class ResponseConversationParam < OpenAI::Internal::Type::BaseModel
|
7
|
+
attr_accessor id: String
|
8
|
+
|
9
|
+
def initialize: (id: String) -> void
|
10
|
+
|
11
|
+
def to_hash: -> { id: String }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -4,6 +4,7 @@ module OpenAI
|
|
4
4
|
type response_create_params =
|
5
5
|
{
|
6
6
|
background: bool?,
|
7
|
+
conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?,
|
7
8
|
include: ::Array[OpenAI::Models::Responses::response_includable]?,
|
8
9
|
input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
9
10
|
instructions: String?,
|
@@ -37,6 +38,8 @@ module OpenAI
|
|
37
38
|
|
38
39
|
attr_accessor background: bool?
|
39
40
|
|
41
|
+
attr_accessor conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?
|
42
|
+
|
40
43
|
attr_accessor include: ::Array[OpenAI::Models::Responses::response_includable]?
|
41
44
|
|
42
45
|
attr_reader input: OpenAI::Models::Responses::ResponseCreateParams::input?
|
@@ -113,6 +116,7 @@ module OpenAI
|
|
113
116
|
|
114
117
|
def initialize: (
|
115
118
|
?background: bool?,
|
119
|
+
?conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?,
|
116
120
|
?include: ::Array[OpenAI::Models::Responses::response_includable]?,
|
117
121
|
?input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
118
122
|
?instructions: String?,
|
@@ -142,6 +146,7 @@ module OpenAI
|
|
142
146
|
|
143
147
|
def to_hash: -> {
|
144
148
|
background: bool?,
|
149
|
+
conversation: OpenAI::Models::Responses::ResponseCreateParams::conversation?,
|
145
150
|
include: ::Array[OpenAI::Models::Responses::response_includable]?,
|
146
151
|
input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
147
152
|
instructions: String?,
|
@@ -169,6 +174,15 @@ module OpenAI
|
|
169
174
|
request_options: OpenAI::RequestOptions
|
170
175
|
}
|
171
176
|
|
177
|
+
type conversation =
|
178
|
+
String | OpenAI::Responses::ResponseConversationParam
|
179
|
+
|
180
|
+
module Conversation
|
181
|
+
extend OpenAI::Internal::Type::Union
|
182
|
+
|
183
|
+
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseCreateParams::conversation]
|
184
|
+
end
|
185
|
+
|
172
186
|
type input = String | OpenAI::Models::Responses::response_input
|
173
187
|
|
174
188
|
module Input
|
@@ -18,23 +18,33 @@ module OpenAI
|
|
18
18
|
type mcp =
|
19
19
|
{
|
20
20
|
server_label: String,
|
21
|
-
server_url: String,
|
22
21
|
type: :mcp,
|
23
22
|
allowed_tools: OpenAI::Models::Responses::Tool::Mcp::allowed_tools?,
|
23
|
+
authorization: String,
|
24
|
+
connector_id: OpenAI::Models::Responses::Tool::Mcp::connector_id,
|
24
25
|
headers: ::Hash[Symbol, String]?,
|
25
26
|
require_approval: OpenAI::Models::Responses::Tool::Mcp::require_approval?,
|
26
|
-
server_description: String
|
27
|
+
server_description: String,
|
28
|
+
server_url: String
|
27
29
|
}
|
28
30
|
|
29
31
|
class Mcp < OpenAI::Internal::Type::BaseModel
|
30
32
|
attr_accessor server_label: String
|
31
33
|
|
32
|
-
attr_accessor server_url: String
|
33
|
-
|
34
34
|
attr_accessor type: :mcp
|
35
35
|
|
36
36
|
attr_accessor allowed_tools: OpenAI::Models::Responses::Tool::Mcp::allowed_tools?
|
37
37
|
|
38
|
+
attr_reader authorization: String?
|
39
|
+
|
40
|
+
def authorization=: (String) -> String
|
41
|
+
|
42
|
+
attr_reader connector_id: OpenAI::Models::Responses::Tool::Mcp::connector_id?
|
43
|
+
|
44
|
+
def connector_id=: (
|
45
|
+
OpenAI::Models::Responses::Tool::Mcp::connector_id
|
46
|
+
) -> OpenAI::Models::Responses::Tool::Mcp::connector_id
|
47
|
+
|
38
48
|
attr_accessor headers: ::Hash[Symbol, String]?
|
39
49
|
|
40
50
|
attr_accessor require_approval: OpenAI::Models::Responses::Tool::Mcp::require_approval?
|
@@ -43,43 +53,59 @@ module OpenAI
|
|
43
53
|
|
44
54
|
def server_description=: (String) -> String
|
45
55
|
|
56
|
+
attr_reader server_url: String?
|
57
|
+
|
58
|
+
def server_url=: (String) -> String
|
59
|
+
|
46
60
|
def initialize: (
|
47
61
|
server_label: String,
|
48
|
-
server_url: String,
|
49
62
|
?allowed_tools: OpenAI::Models::Responses::Tool::Mcp::allowed_tools?,
|
63
|
+
?authorization: String,
|
64
|
+
?connector_id: OpenAI::Models::Responses::Tool::Mcp::connector_id,
|
50
65
|
?headers: ::Hash[Symbol, String]?,
|
51
66
|
?require_approval: OpenAI::Models::Responses::Tool::Mcp::require_approval?,
|
52
67
|
?server_description: String,
|
68
|
+
?server_url: String,
|
53
69
|
?type: :mcp
|
54
70
|
) -> void
|
55
71
|
|
56
72
|
def to_hash: -> {
|
57
73
|
server_label: String,
|
58
|
-
server_url: String,
|
59
74
|
type: :mcp,
|
60
75
|
allowed_tools: OpenAI::Models::Responses::Tool::Mcp::allowed_tools?,
|
76
|
+
authorization: String,
|
77
|
+
connector_id: OpenAI::Models::Responses::Tool::Mcp::connector_id,
|
61
78
|
headers: ::Hash[Symbol, String]?,
|
62
79
|
require_approval: OpenAI::Models::Responses::Tool::Mcp::require_approval?,
|
63
|
-
server_description: String
|
80
|
+
server_description: String,
|
81
|
+
server_url: String
|
64
82
|
}
|
65
83
|
|
66
84
|
type allowed_tools =
|
67
85
|
::Array[String]
|
68
|
-
| OpenAI::Responses::Tool::Mcp::AllowedTools::
|
86
|
+
| OpenAI::Responses::Tool::Mcp::AllowedTools::McpToolFilter
|
69
87
|
|
70
88
|
module AllowedTools
|
71
89
|
extend OpenAI::Internal::Type::Union
|
72
90
|
|
73
|
-
type
|
91
|
+
type mcp_tool_filter =
|
92
|
+
{ read_only: bool, tool_names: ::Array[String] }
|
93
|
+
|
94
|
+
class McpToolFilter < OpenAI::Internal::Type::BaseModel
|
95
|
+
attr_reader read_only: bool?
|
96
|
+
|
97
|
+
def read_only=: (bool) -> bool
|
74
98
|
|
75
|
-
class McpAllowedToolsFilter < OpenAI::Internal::Type::BaseModel
|
76
99
|
attr_reader tool_names: ::Array[String]?
|
77
100
|
|
78
101
|
def tool_names=: (::Array[String]) -> ::Array[String]
|
79
102
|
|
80
|
-
def initialize: (
|
103
|
+
def initialize: (
|
104
|
+
?read_only: bool,
|
105
|
+
?tool_names: ::Array[String]
|
106
|
+
) -> void
|
81
107
|
|
82
|
-
def to_hash: -> { tool_names: ::Array[String] }
|
108
|
+
def to_hash: -> { read_only: bool, tool_names: ::Array[String] }
|
83
109
|
end
|
84
110
|
|
85
111
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::Tool::Mcp::allowed_tools]
|
@@ -87,6 +113,31 @@ module OpenAI
|
|
87
113
|
StringArray: OpenAI::Internal::Type::Converter
|
88
114
|
end
|
89
115
|
|
116
|
+
type connector_id =
|
117
|
+
:connector_dropbox
|
118
|
+
| :connector_gmail
|
119
|
+
| :connector_googlecalendar
|
120
|
+
| :connector_googledrive
|
121
|
+
| :connector_microsoftteams
|
122
|
+
| :connector_outlookcalendar
|
123
|
+
| :connector_outlookemail
|
124
|
+
| :connector_sharepoint
|
125
|
+
|
126
|
+
module ConnectorID
|
127
|
+
extend OpenAI::Internal::Type::Enum
|
128
|
+
|
129
|
+
CONNECTOR_DROPBOX: :connector_dropbox
|
130
|
+
CONNECTOR_GMAIL: :connector_gmail
|
131
|
+
CONNECTOR_GOOGLECALENDAR: :connector_googlecalendar
|
132
|
+
CONNECTOR_GOOGLEDRIVE: :connector_googledrive
|
133
|
+
CONNECTOR_MICROSOFTTEAMS: :connector_microsoftteams
|
134
|
+
CONNECTOR_OUTLOOKCALENDAR: :connector_outlookcalendar
|
135
|
+
CONNECTOR_OUTLOOKEMAIL: :connector_outlookemail
|
136
|
+
CONNECTOR_SHAREPOINT: :connector_sharepoint
|
137
|
+
|
138
|
+
def self?.values: -> ::Array[OpenAI::Models::Responses::Tool::Mcp::connector_id]
|
139
|
+
end
|
140
|
+
|
90
141
|
type require_approval =
|
91
142
|
OpenAI::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter
|
92
143
|
| OpenAI::Models::Responses::Tool::Mcp::RequireApproval::mcp_tool_approval_setting
|
@@ -123,28 +174,42 @@ module OpenAI
|
|
123
174
|
never: OpenAI::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
124
175
|
}
|
125
176
|
|
126
|
-
type always = { tool_names: ::Array[String] }
|
177
|
+
type always = { read_only: bool, tool_names: ::Array[String] }
|
127
178
|
|
128
179
|
class Always < OpenAI::Internal::Type::BaseModel
|
180
|
+
attr_reader read_only: bool?
|
181
|
+
|
182
|
+
def read_only=: (bool) -> bool
|
183
|
+
|
129
184
|
attr_reader tool_names: ::Array[String]?
|
130
185
|
|
131
186
|
def tool_names=: (::Array[String]) -> ::Array[String]
|
132
187
|
|
133
|
-
def initialize: (
|
188
|
+
def initialize: (
|
189
|
+
?read_only: bool,
|
190
|
+
?tool_names: ::Array[String]
|
191
|
+
) -> void
|
134
192
|
|
135
|
-
def to_hash: -> { tool_names: ::Array[String] }
|
193
|
+
def to_hash: -> { read_only: bool, tool_names: ::Array[String] }
|
136
194
|
end
|
137
195
|
|
138
|
-
type never = { tool_names: ::Array[String] }
|
196
|
+
type never = { read_only: bool, tool_names: ::Array[String] }
|
139
197
|
|
140
198
|
class Never < OpenAI::Internal::Type::BaseModel
|
199
|
+
attr_reader read_only: bool?
|
200
|
+
|
201
|
+
def read_only=: (bool) -> bool
|
202
|
+
|
141
203
|
attr_reader tool_names: ::Array[String]?
|
142
204
|
|
143
205
|
def tool_names=: (::Array[String]) -> ::Array[String]
|
144
206
|
|
145
|
-
def initialize: (
|
207
|
+
def initialize: (
|
208
|
+
?read_only: bool,
|
209
|
+
?tool_names: ::Array[String]
|
210
|
+
) -> void
|
146
211
|
|
147
|
-
def to_hash: -> { tool_names: ::Array[String] }
|
212
|
+
def to_hash: -> { read_only: bool, tool_names: ::Array[String] }
|
148
213
|
end
|
149
214
|
end
|
150
215
|
|
@@ -5,7 +5,8 @@ module OpenAI
|
|
5
5
|
bytes: Integer,
|
6
6
|
filename: String,
|
7
7
|
mime_type: String,
|
8
|
-
purpose: OpenAI::Models::file_purpose
|
8
|
+
purpose: OpenAI::Models::file_purpose,
|
9
|
+
expires_after: OpenAI::UploadCreateParams::ExpiresAfter
|
9
10
|
}
|
10
11
|
& OpenAI::Internal::Type::request_parameters
|
11
12
|
|
@@ -21,11 +22,18 @@ module OpenAI
|
|
21
22
|
|
22
23
|
attr_accessor purpose: OpenAI::Models::file_purpose
|
23
24
|
|
25
|
+
attr_reader expires_after: OpenAI::UploadCreateParams::ExpiresAfter?
|
26
|
+
|
27
|
+
def expires_after=: (
|
28
|
+
OpenAI::UploadCreateParams::ExpiresAfter
|
29
|
+
) -> OpenAI::UploadCreateParams::ExpiresAfter
|
30
|
+
|
24
31
|
def initialize: (
|
25
32
|
bytes: Integer,
|
26
33
|
filename: String,
|
27
34
|
mime_type: String,
|
28
35
|
purpose: OpenAI::Models::file_purpose,
|
36
|
+
?expires_after: OpenAI::UploadCreateParams::ExpiresAfter,
|
29
37
|
?request_options: OpenAI::request_opts
|
30
38
|
) -> void
|
31
39
|
|
@@ -34,8 +42,21 @@ module OpenAI
|
|
34
42
|
filename: String,
|
35
43
|
mime_type: String,
|
36
44
|
purpose: OpenAI::Models::file_purpose,
|
45
|
+
expires_after: OpenAI::UploadCreateParams::ExpiresAfter,
|
37
46
|
request_options: OpenAI::RequestOptions
|
38
47
|
}
|
48
|
+
|
49
|
+
type expires_after = { anchor: :created_at, seconds: Integer }
|
50
|
+
|
51
|
+
class ExpiresAfter < OpenAI::Internal::Type::BaseModel
|
52
|
+
attr_accessor anchor: :created_at
|
53
|
+
|
54
|
+
attr_accessor seconds: Integer
|
55
|
+
|
56
|
+
def initialize: (seconds: Integer, ?anchor: :created_at) -> void
|
57
|
+
|
58
|
+
def to_hash: -> { anchor: :created_at, seconds: Integer }
|
59
|
+
end
|
39
60
|
end
|
40
61
|
end
|
41
62
|
end
|
data/sig/openai/models.rbs
CHANGED
@@ -51,6 +51,8 @@ module OpenAI
|
|
51
51
|
|
52
52
|
module Containers = OpenAI::Models::Containers
|
53
53
|
|
54
|
+
module Conversations = OpenAI::Models::Conversations
|
55
|
+
|
54
56
|
class CreateEmbeddingResponse = OpenAI::Models::CreateEmbeddingResponse
|
55
57
|
|
56
58
|
module CustomToolInputFormat = OpenAI::Models::CustomToolInputFormat
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
6
6
|
endpoint: OpenAI::Models::BatchCreateParams::endpoint,
|
7
7
|
input_file_id: String,
|
8
8
|
?metadata: OpenAI::Models::metadata?,
|
9
|
+
?output_expires_after: OpenAI::BatchCreateParams::OutputExpiresAfter,
|
9
10
|
?request_options: OpenAI::request_opts
|
10
11
|
) -> OpenAI::Batch
|
11
12
|
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Resources
|
3
|
+
class Conversations
|
4
|
+
class Items
|
5
|
+
def create: (
|
6
|
+
String conversation_id,
|
7
|
+
items: ::Array[OpenAI::Models::Responses::response_input_item],
|
8
|
+
?include: ::Array[OpenAI::Models::Responses::response_includable],
|
9
|
+
?request_options: OpenAI::request_opts
|
10
|
+
) -> OpenAI::Conversations::ConversationItemList
|
11
|
+
|
12
|
+
def retrieve: (
|
13
|
+
String item_id,
|
14
|
+
conversation_id: String,
|
15
|
+
?include: ::Array[OpenAI::Models::Responses::response_includable],
|
16
|
+
?request_options: OpenAI::request_opts
|
17
|
+
) -> OpenAI::Models::Conversations::conversation_item
|
18
|
+
|
19
|
+
def list: (
|
20
|
+
String conversation_id,
|
21
|
+
?after: String,
|
22
|
+
?include: ::Array[OpenAI::Models::Responses::response_includable],
|
23
|
+
?limit: Integer,
|
24
|
+
?order: OpenAI::Models::Conversations::ItemListParams::order,
|
25
|
+
?request_options: OpenAI::request_opts
|
26
|
+
) -> OpenAI::Internal::ConversationCursorPage[OpenAI::Models::Conversations::conversation_item]
|
27
|
+
|
28
|
+
def delete: (
|
29
|
+
String item_id,
|
30
|
+
conversation_id: String,
|
31
|
+
?request_options: OpenAI::request_opts
|
32
|
+
) -> OpenAI::Conversations::Conversation
|
33
|
+
|
34
|
+
def initialize: (client: OpenAI::Client) -> void
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Resources
|
3
|
+
class Conversations
|
4
|
+
attr_reader items: OpenAI::Resources::Conversations::Items
|
5
|
+
|
6
|
+
def create: (
|
7
|
+
?items: ::Array[OpenAI::Models::Responses::response_input_item]?,
|
8
|
+
?metadata: OpenAI::Models::metadata?,
|
9
|
+
?request_options: OpenAI::request_opts
|
10
|
+
) -> OpenAI::Conversations::Conversation
|
11
|
+
|
12
|
+
def retrieve: (
|
13
|
+
String conversation_id,
|
14
|
+
?request_options: OpenAI::request_opts
|
15
|
+
) -> OpenAI::Conversations::Conversation
|
16
|
+
|
17
|
+
def update: (
|
18
|
+
String conversation_id,
|
19
|
+
metadata: ::Hash[Symbol, String],
|
20
|
+
?request_options: OpenAI::request_opts
|
21
|
+
) -> OpenAI::Conversations::Conversation
|
22
|
+
|
23
|
+
def delete: (
|
24
|
+
String conversation_id,
|
25
|
+
?request_options: OpenAI::request_opts
|
26
|
+
) -> OpenAI::Conversations::ConversationDeletedResource
|
27
|
+
|
28
|
+
def initialize: (client: OpenAI::Client) -> void
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|