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
@@ -226,6 +226,8 @@ module OpenAI
|
|
226
226
|
optional :safety_identifier, String
|
227
227
|
|
228
228
|
# @!attribute seed
|
229
|
+
# @deprecated
|
230
|
+
#
|
229
231
|
# This feature is in Beta. If specified, our system will make a best effort to
|
230
232
|
# sample deterministically, such that repeated requests with the same `seed` and
|
231
233
|
# parameters should return the same result. Determinism is not guaranteed, and you
|
@@ -244,9 +246,8 @@ module OpenAI
|
|
244
246
|
# - If set to 'default', then the request will be processed with the standard
|
245
247
|
# pricing and performance for the selected model.
|
246
248
|
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
247
|
-
# 'priority', then the request
|
248
|
-
#
|
249
|
-
# Priority processing.
|
249
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
250
|
+
# will be processed with the corresponding service tier.
|
250
251
|
# - When not set, the default behavior is 'auto'.
|
251
252
|
#
|
252
253
|
# When the `service_tier` parameter is set, the response body will include the
|
@@ -271,7 +272,7 @@ module OpenAI
|
|
271
272
|
# our [model distillation](https://platform.openai.com/docs/guides/distillation)
|
272
273
|
# or [evals](https://platform.openai.com/docs/guides/evals) products.
|
273
274
|
#
|
274
|
-
# Supports text and image inputs. Note: image inputs over
|
275
|
+
# Supports text and image inputs. Note: image inputs over 8MB will be dropped.
|
275
276
|
#
|
276
277
|
# @return [Boolean, nil]
|
277
278
|
optional :store, OpenAI::Internal::Type::Boolean, nil?: true
|
@@ -591,9 +592,8 @@ module OpenAI
|
|
591
592
|
# - If set to 'default', then the request will be processed with the standard
|
592
593
|
# pricing and performance for the selected model.
|
593
594
|
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
594
|
-
# 'priority', then the request
|
595
|
-
#
|
596
|
-
# Priority processing.
|
595
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
596
|
+
# will be processed with the corresponding service tier.
|
597
597
|
# - When not set, the default behavior is 'auto'.
|
598
598
|
#
|
599
599
|
# When the `service_tier` parameter is set, the response body will include the
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ComputerScreenshotContent < OpenAI::Internal::Type::BaseModel
|
7
|
+
# @!attribute file_id
|
8
|
+
# The identifier of an uploaded file that contains the screenshot.
|
9
|
+
#
|
10
|
+
# @return [String, nil]
|
11
|
+
required :file_id, String, nil?: true
|
12
|
+
|
13
|
+
# @!attribute image_url
|
14
|
+
# The URL of the screenshot image.
|
15
|
+
#
|
16
|
+
# @return [String, nil]
|
17
|
+
required :image_url, String, nil?: true
|
18
|
+
|
19
|
+
# @!attribute type
|
20
|
+
# Specifies the event type. For a computer screenshot, this property is always set
|
21
|
+
# to `computer_screenshot`.
|
22
|
+
#
|
23
|
+
# @return [Symbol, :computer_screenshot]
|
24
|
+
required :type, const: :computer_screenshot
|
25
|
+
|
26
|
+
# @!method initialize(file_id:, image_url:, type: :computer_screenshot)
|
27
|
+
# Some parameter documentations has been truncated, see
|
28
|
+
# {OpenAI::Models::Conversations::ComputerScreenshotContent} for more details.
|
29
|
+
#
|
30
|
+
# @param file_id [String, nil] The identifier of an uploaded file that contains the screenshot.
|
31
|
+
#
|
32
|
+
# @param image_url [String, nil] The URL of the screenshot image.
|
33
|
+
#
|
34
|
+
# @param type [Symbol, :computer_screenshot] Specifies the event type. For a computer screenshot, this property is always set
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ContainerFileCitationBody < OpenAI::Internal::Type::BaseModel
|
7
|
+
# @!attribute container_id
|
8
|
+
# The ID of the container file.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
required :container_id, String
|
12
|
+
|
13
|
+
# @!attribute end_index
|
14
|
+
# The index of the last character of the container file citation in the message.
|
15
|
+
#
|
16
|
+
# @return [Integer]
|
17
|
+
required :end_index, Integer
|
18
|
+
|
19
|
+
# @!attribute file_id
|
20
|
+
# The ID of the file.
|
21
|
+
#
|
22
|
+
# @return [String]
|
23
|
+
required :file_id, String
|
24
|
+
|
25
|
+
# @!attribute filename
|
26
|
+
# The filename of the container file cited.
|
27
|
+
#
|
28
|
+
# @return [String]
|
29
|
+
required :filename, String
|
30
|
+
|
31
|
+
# @!attribute start_index
|
32
|
+
# The index of the first character of the container file citation in the message.
|
33
|
+
#
|
34
|
+
# @return [Integer]
|
35
|
+
required :start_index, Integer
|
36
|
+
|
37
|
+
# @!attribute type
|
38
|
+
# The type of the container file citation. Always `container_file_citation`.
|
39
|
+
#
|
40
|
+
# @return [Symbol, :container_file_citation]
|
41
|
+
required :type, const: :container_file_citation
|
42
|
+
|
43
|
+
# @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation)
|
44
|
+
# @param container_id [String] The ID of the container file.
|
45
|
+
#
|
46
|
+
# @param end_index [Integer] The index of the last character of the container file citation in the message.
|
47
|
+
#
|
48
|
+
# @param file_id [String] The ID of the file.
|
49
|
+
#
|
50
|
+
# @param filename [String] The filename of the container file cited.
|
51
|
+
#
|
52
|
+
# @param start_index [Integer] The index of the first character of the container file citation in the message.
|
53
|
+
#
|
54
|
+
# @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`.
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
# @see OpenAI::Resources::Conversations#create
|
7
|
+
class Conversation < OpenAI::Internal::Type::BaseModel
|
8
|
+
# @!attribute id
|
9
|
+
# The unique ID of the conversation.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
required :id, String
|
13
|
+
|
14
|
+
# @!attribute created_at
|
15
|
+
# The time at which the conversation was created, measured in seconds since the
|
16
|
+
# Unix epoch.
|
17
|
+
#
|
18
|
+
# @return [Integer]
|
19
|
+
required :created_at, Integer
|
20
|
+
|
21
|
+
# @!attribute metadata
|
22
|
+
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
23
|
+
# for storing additional information about the object in a structured format, and
|
24
|
+
# querying for objects via API or the dashboard. Keys are strings with a maximum
|
25
|
+
# length of 64 characters. Values are strings with a maximum length of 512
|
26
|
+
# characters.
|
27
|
+
#
|
28
|
+
# @return [Object]
|
29
|
+
required :metadata, OpenAI::Internal::Type::Unknown
|
30
|
+
|
31
|
+
# @!attribute object
|
32
|
+
# The object type, which is always `conversation`.
|
33
|
+
#
|
34
|
+
# @return [Symbol, :conversation]
|
35
|
+
required :object, const: :conversation
|
36
|
+
|
37
|
+
# @!method initialize(id:, created_at:, metadata:, object: :conversation)
|
38
|
+
# Some parameter documentations has been truncated, see
|
39
|
+
# {OpenAI::Models::Conversations::Conversation} for more details.
|
40
|
+
#
|
41
|
+
# @param id [String] The unique ID of the conversation.
|
42
|
+
#
|
43
|
+
# @param created_at [Integer] The time at which the conversation was created, measured in seconds since the Un
|
44
|
+
#
|
45
|
+
# @param metadata [Object] Set of 16 key-value pairs that can be attached to an object. This can be
|
46
|
+
#
|
47
|
+
# @param object [Symbol, :conversation] The object type, which is always `conversation`.
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
# @see OpenAI::Resources::Conversations#create
|
7
|
+
class ConversationCreateParams < OpenAI::Internal::Type::BaseModel
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
# @!attribute items
|
12
|
+
# Initial items to include in the conversation context. You may add up to 20 items
|
13
|
+
# at a time.
|
14
|
+
#
|
15
|
+
# @return [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil]
|
16
|
+
optional :items,
|
17
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseInputItem] },
|
18
|
+
nil?: true
|
19
|
+
|
20
|
+
# @!attribute metadata
|
21
|
+
# Set of 16 key-value pairs that can be attached to an object. Useful for storing
|
22
|
+
# additional information about the object in a structured format.
|
23
|
+
#
|
24
|
+
# @return [Hash{Symbol=>String}, nil]
|
25
|
+
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
26
|
+
|
27
|
+
# @!method initialize(items: nil, metadata: nil, request_options: {})
|
28
|
+
# Some parameter documentations has been truncated, see
|
29
|
+
# {OpenAI::Models::Conversations::ConversationCreateParams} for more details.
|
30
|
+
#
|
31
|
+
# @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context.
|
32
|
+
#
|
33
|
+
# @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. Useful for
|
34
|
+
#
|
35
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
# @see OpenAI::Resources::Conversations#delete
|
7
|
+
class ConversationDeleteParams < OpenAI::Internal::Type::BaseModel
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
10
|
+
|
11
|
+
# @!method initialize(request_options: {})
|
12
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
class ConversationDeleted < OpenAI::Internal::Type::BaseModel
|
7
|
+
# @!attribute id
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
required :id, String
|
11
|
+
|
12
|
+
# @!attribute deleted
|
13
|
+
#
|
14
|
+
# @return [Boolean]
|
15
|
+
required :deleted, OpenAI::Internal::Type::Boolean
|
16
|
+
|
17
|
+
# @!attribute object
|
18
|
+
#
|
19
|
+
# @return [Symbol, :"conversation.deleted"]
|
20
|
+
required :object, const: :"conversation.deleted"
|
21
|
+
|
22
|
+
# @!method initialize(id:, deleted:, object: :"conversation.deleted")
|
23
|
+
# @param id [String]
|
24
|
+
# @param deleted [Boolean]
|
25
|
+
# @param object [Symbol, :"conversation.deleted"]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Conversations
|
6
|
+
# @see OpenAI::Resources::Conversations#delete
|
7
|
+
class ConversationDeletedResource < OpenAI::Internal::Type::BaseModel
|
8
|
+
# @!attribute id
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
required :id, String
|
12
|
+
|
13
|
+
# @!attribute deleted
|
14
|
+
#
|
15
|
+
# @return [Boolean]
|
16
|
+
required :deleted, OpenAI::Internal::Type::Boolean
|
17
|
+
|
18
|
+
# @!attribute object
|
19
|
+
#
|
20
|
+
# @return [Symbol, :"conversation.deleted"]
|
21
|
+
required :object, const: :"conversation.deleted"
|
22
|
+
|
23
|
+
# @!method initialize(id:, deleted:, object: :"conversation.deleted")
|
24
|
+
# @param id [String]
|
25
|
+
# @param deleted [Boolean]
|
26
|
+
# @param object [Symbol, :"conversation.deleted"]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|