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.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -0
  3. data/README.md +1 -1
  4. data/lib/openai/client.rb +4 -0
  5. data/lib/openai/helpers/structured_output/array_of.rb +2 -10
  6. data/lib/openai/helpers/structured_output/base_model.rb +4 -11
  7. data/lib/openai/helpers/structured_output/boolean.rb +1 -0
  8. data/lib/openai/helpers/structured_output/json_schema_converter.rb +19 -3
  9. data/lib/openai/helpers/structured_output/union_of.rb +2 -10
  10. data/lib/openai/internal/conversation_cursor_page.rb +92 -0
  11. data/lib/openai/internal/transport/base_client.rb +1 -4
  12. data/lib/openai/internal/transport/pooled_net_requester.rb +1 -9
  13. data/lib/openai/internal/util.rb +1 -1
  14. data/lib/openai/models/audio/transcription.rb +1 -4
  15. data/lib/openai/models/audio/transcription_create_params.rb +2 -7
  16. data/lib/openai/models/audio/transcription_text_done_event.rb +1 -4
  17. data/lib/openai/models/batch_create_params.rb +38 -1
  18. data/lib/openai/models/beta/assistant_create_params.rb +6 -19
  19. data/lib/openai/models/beta/assistant_stream_event.rb +6 -24
  20. data/lib/openai/models/beta/assistant_update_params.rb +1 -4
  21. data/lib/openai/models/beta/message_stream_event.rb +1 -4
  22. data/lib/openai/models/beta/run_step_stream_event.rb +1 -4
  23. data/lib/openai/models/beta/thread_create_and_run_params.rb +12 -34
  24. data/lib/openai/models/beta/thread_create_params.rb +7 -22
  25. data/lib/openai/models/beta/threads/message.rb +3 -10
  26. data/lib/openai/models/beta/threads/message_create_params.rb +2 -7
  27. data/lib/openai/models/beta/threads/run.rb +4 -9
  28. data/lib/openai/models/beta/threads/run_create_params.rb +5 -12
  29. data/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +1 -3
  30. data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +5 -17
  31. data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +1 -3
  32. data/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +4 -12
  33. data/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +1 -4
  34. data/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +1 -4
  35. data/lib/openai/models/beta/threads/text.rb +1 -4
  36. data/lib/openai/models/chat/chat_completion.rb +6 -6
  37. data/lib/openai/models/chat/chat_completion_chunk.rb +7 -9
  38. data/lib/openai/models/chat/chat_completion_custom_tool.rb +2 -7
  39. data/lib/openai/models/chat/completion_create_params.rb +7 -7
  40. data/lib/openai/models/conversations/computer_screenshot_content.rb +38 -0
  41. data/lib/openai/models/conversations/container_file_citation_body.rb +58 -0
  42. data/lib/openai/models/conversations/conversation.rb +51 -0
  43. data/lib/openai/models/conversations/conversation_create_params.rb +39 -0
  44. data/lib/openai/models/conversations/conversation_delete_params.rb +16 -0
  45. data/lib/openai/models/conversations/conversation_deleted.rb +29 -0
  46. data/lib/openai/models/conversations/conversation_deleted_resource.rb +30 -0
  47. data/lib/openai/models/conversations/conversation_item.rb +568 -0
  48. data/lib/openai/models/conversations/conversation_item_list.rb +55 -0
  49. data/lib/openai/models/conversations/conversation_retrieve_params.rb +16 -0
  50. data/lib/openai/models/conversations/conversation_update_params.rb +31 -0
  51. data/lib/openai/models/conversations/file_citation_body.rb +42 -0
  52. data/lib/openai/models/conversations/input_file_content.rb +42 -0
  53. data/lib/openai/models/conversations/input_image_content.rb +62 -0
  54. data/lib/openai/models/conversations/input_text_content.rb +26 -0
  55. data/lib/openai/models/conversations/item_create_params.rb +37 -0
  56. data/lib/openai/models/conversations/item_delete_params.rb +22 -0
  57. data/lib/openai/models/conversations/item_list_params.rb +84 -0
  58. data/lib/openai/models/conversations/item_retrieve_params.rb +36 -0
  59. data/lib/openai/models/conversations/lob_prob.rb +35 -0
  60. data/lib/openai/models/conversations/message.rb +115 -0
  61. data/lib/openai/models/conversations/output_text_content.rb +57 -0
  62. data/lib/openai/models/conversations/refusal_content.rb +26 -0
  63. data/lib/openai/models/conversations/summary_text_content.rb +23 -0
  64. data/lib/openai/models/conversations/text_content.rb +23 -0
  65. data/lib/openai/models/conversations/top_log_prob.rb +29 -0
  66. data/lib/openai/models/conversations/url_citation_body.rb +50 -0
  67. data/lib/openai/models/eval_create_params.rb +6 -20
  68. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +29 -53
  69. data/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb +1 -3
  70. data/lib/openai/models/evals/run_create_params.rb +18 -54
  71. data/lib/openai/models/file_create_params.rb +37 -1
  72. data/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb +1 -4
  73. data/lib/openai/models/graders/text_similarity_grader.rb +6 -5
  74. data/lib/openai/models/moderation.rb +5 -15
  75. data/lib/openai/models/reasoning.rb +1 -1
  76. data/lib/openai/models/responses/input_item_list_params.rb +1 -9
  77. data/lib/openai/models/responses/response.rb +32 -9
  78. data/lib/openai/models/responses/response_computer_tool_call.rb +2 -6
  79. data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +1 -3
  80. data/lib/openai/models/responses/response_conversation_param.rb +20 -0
  81. data/lib/openai/models/responses/response_create_params.rb +40 -9
  82. data/lib/openai/models/responses/response_input_item.rb +2 -7
  83. data/lib/openai/models/responses/response_input_message_item.rb +1 -4
  84. data/lib/openai/models/responses/response_output_item.rb +1 -3
  85. data/lib/openai/models/responses/response_output_message.rb +1 -3
  86. data/lib/openai/models/responses/response_output_text.rb +3 -10
  87. data/lib/openai/models/responses/response_stream_event.rb +4 -16
  88. data/lib/openai/models/responses/response_text_delta_event.rb +1 -3
  89. data/lib/openai/models/responses/response_text_done_event.rb +1 -3
  90. data/lib/openai/models/responses/tool.rb +145 -34
  91. data/lib/openai/models/upload_create_params.rb +37 -1
  92. data/lib/openai/models.rb +2 -0
  93. data/lib/openai/resources/batches.rb +3 -1
  94. data/lib/openai/resources/conversations/items.rb +141 -0
  95. data/lib/openai/resources/conversations.rb +112 -0
  96. data/lib/openai/resources/files.rb +4 -2
  97. data/lib/openai/resources/responses/input_items.rb +1 -3
  98. data/lib/openai/resources/responses.rb +8 -4
  99. data/lib/openai/resources/uploads.rb +3 -1
  100. data/lib/openai/version.rb +1 -1
  101. data/lib/openai.rb +31 -0
  102. data/rbi/openai/client.rbi +3 -0
  103. data/rbi/openai/errors.rbi +5 -5
  104. data/rbi/openai/helpers/structured_output/array_of.rbi +0 -3
  105. data/rbi/openai/helpers/structured_output/json_schema_converter.rbi +10 -0
  106. data/rbi/openai/internal/conversation_cursor_page.rbi +25 -0
  107. data/rbi/openai/models/batch_create_params.rbi +60 -0
  108. data/rbi/openai/models/beta/thread_create_and_run_params.rbi +3 -3
  109. data/rbi/openai/models/beta/threads/run.rbi +3 -3
  110. data/rbi/openai/models/beta/threads/run_create_params.rbi +3 -3
  111. data/rbi/openai/models/chat/chat_completion.rbi +6 -9
  112. data/rbi/openai/models/chat/chat_completion_chunk.rbi +6 -9
  113. data/rbi/openai/models/chat/completion_create_params.rbi +8 -11
  114. data/rbi/openai/models/conversations/computer_screenshot_content.rbi +60 -0
  115. data/rbi/openai/models/conversations/container_file_citation_body.rbi +82 -0
  116. data/rbi/openai/models/conversations/conversation.rbi +76 -0
  117. data/rbi/openai/models/conversations/conversation_create_params.rbi +144 -0
  118. data/rbi/openai/models/conversations/conversation_delete_params.rbi +32 -0
  119. data/rbi/openai/models/conversations/conversation_deleted.rbi +40 -0
  120. data/rbi/openai/models/conversations/conversation_deleted_resource.rbi +40 -0
  121. data/rbi/openai/models/conversations/conversation_item.rbi +835 -0
  122. data/rbi/openai/models/conversations/conversation_item_list.rbi +101 -0
  123. data/rbi/openai/models/conversations/conversation_retrieve_params.rbi +32 -0
  124. data/rbi/openai/models/conversations/conversation_update_params.rbi +56 -0
  125. data/rbi/openai/models/conversations/file_citation_body.rbi +61 -0
  126. data/rbi/openai/models/conversations/input_file_content.rbi +72 -0
  127. data/rbi/openai/models/conversations/input_image_content.rbi +113 -0
  128. data/rbi/openai/models/conversations/input_text_content.rbi +38 -0
  129. data/rbi/openai/models/conversations/item_create_params.rbi +150 -0
  130. data/rbi/openai/models/conversations/item_delete_params.rbi +40 -0
  131. data/rbi/openai/models/conversations/item_list_params.rbi +174 -0
  132. data/rbi/openai/models/conversations/item_retrieve_params.rbi +70 -0
  133. data/rbi/openai/models/conversations/lob_prob.rbi +50 -0
  134. data/rbi/openai/models/conversations/message.rbi +196 -0
  135. data/rbi/openai/models/conversations/output_text_content.rbi +110 -0
  136. data/rbi/openai/models/conversations/refusal_content.rbi +38 -0
  137. data/rbi/openai/models/conversations/summary_text_content.rbi +31 -0
  138. data/rbi/openai/models/conversations/text_content.rbi +28 -0
  139. data/rbi/openai/models/conversations/top_log_prob.rbi +41 -0
  140. data/rbi/openai/models/conversations/url_citation_body.rbi +74 -0
  141. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +33 -33
  142. data/rbi/openai/models/file_create_params.rbi +56 -0
  143. data/rbi/openai/models/graders/text_similarity_grader.rbi +11 -6
  144. data/rbi/openai/models/reasoning.rbi +1 -1
  145. data/rbi/openai/models/responses/input_item_list_params.rbi +0 -11
  146. data/rbi/openai/models/responses/response.rbi +57 -11
  147. data/rbi/openai/models/responses/response_conversation_param.rbi +33 -0
  148. data/rbi/openai/models/responses/response_create_params.rbi +62 -11
  149. data/rbi/openai/models/responses/tool.rbi +243 -31
  150. data/rbi/openai/models/upload_create_params.rbi +56 -0
  151. data/rbi/openai/models.rbi +2 -0
  152. data/rbi/openai/resources/batches.rbi +5 -0
  153. data/rbi/openai/resources/beta/threads/runs.rbi +2 -2
  154. data/rbi/openai/resources/beta/threads.rbi +2 -2
  155. data/rbi/openai/resources/chat/completions.rbi +6 -8
  156. data/rbi/openai/resources/conversations/items.rbi +152 -0
  157. data/rbi/openai/resources/conversations.rbi +110 -0
  158. data/rbi/openai/resources/files.rbi +5 -1
  159. data/rbi/openai/resources/responses/input_items.rbi +0 -3
  160. data/rbi/openai/resources/responses.rbi +32 -8
  161. data/rbi/openai/resources/uploads.rbi +4 -0
  162. data/sig/openai/client.rbs +2 -0
  163. data/sig/openai/internal/conversation_cursor_page.rbs +15 -0
  164. data/sig/openai/models/batch_create_params.rbs +22 -1
  165. data/sig/openai/models/conversations/computer_screenshot_content.rbs +28 -0
  166. data/sig/openai/models/conversations/container_file_citation_body.rbs +47 -0
  167. data/sig/openai/models/conversations/conversation.rbs +37 -0
  168. data/sig/openai/models/conversations/conversation_create_params.rbs +33 -0
  169. data/sig/openai/models/conversations/conversation_delete_params.rbs +17 -0
  170. data/sig/openai/models/conversations/conversation_deleted.rbs +28 -0
  171. data/sig/openai/models/conversations/conversation_deleted_resource.rbs +28 -0
  172. data/sig/openai/models/conversations/conversation_item.rbs +403 -0
  173. data/sig/openai/models/conversations/conversation_item_list.rbs +44 -0
  174. data/sig/openai/models/conversations/conversation_retrieve_params.rbs +17 -0
  175. data/sig/openai/models/conversations/conversation_update_params.rbs +26 -0
  176. data/sig/openai/models/conversations/file_citation_body.rbs +37 -0
  177. data/sig/openai/models/conversations/input_file_content.rbs +41 -0
  178. data/sig/openai/models/conversations/input_image_content.rbs +49 -0
  179. data/sig/openai/models/conversations/input_text_content.rbs +17 -0
  180. data/sig/openai/models/conversations/item_create_params.rbs +37 -0
  181. data/sig/openai/models/conversations/item_delete_params.rbs +25 -0
  182. data/sig/openai/models/conversations/item_list_params.rbs +66 -0
  183. data/sig/openai/models/conversations/item_retrieve_params.rbs +37 -0
  184. data/sig/openai/models/conversations/lob_prob.rbs +37 -0
  185. data/sig/openai/models/conversations/message.rbs +95 -0
  186. data/sig/openai/models/conversations/output_text_content.rbs +52 -0
  187. data/sig/openai/models/conversations/refusal_content.rbs +17 -0
  188. data/sig/openai/models/conversations/summary_text_content.rbs +17 -0
  189. data/sig/openai/models/conversations/text_content.rbs +17 -0
  190. data/sig/openai/models/conversations/top_log_prob.rbs +28 -0
  191. data/sig/openai/models/conversations/url_citation_body.rbs +42 -0
  192. data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +22 -22
  193. data/sig/openai/models/file_create_params.rbs +22 -1
  194. data/sig/openai/models/graders/text_similarity_grader.rbs +3 -1
  195. data/sig/openai/models/responses/input_item_list_params.rbs +0 -7
  196. data/sig/openai/models/responses/response.rbs +15 -0
  197. data/sig/openai/models/responses/response_conversation_param.rbs +15 -0
  198. data/sig/openai/models/responses/response_create_params.rbs +14 -0
  199. data/sig/openai/models/responses/tool.rbs +83 -18
  200. data/sig/openai/models/upload_create_params.rbs +22 -1
  201. data/sig/openai/models.rbs +2 -0
  202. data/sig/openai/resources/batches.rbs +1 -0
  203. data/sig/openai/resources/conversations/items.rbs +38 -0
  204. data/sig/openai/resources/conversations.rbs +31 -0
  205. data/sig/openai/resources/files.rbs +1 -0
  206. data/sig/openai/resources/responses/input_items.rbs +0 -1
  207. data/sig/openai/resources/responses.rbs +2 -0
  208. data/sig/openai/resources/uploads.rbs +1 -0
  209. 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 will be processed with the corresponding service
248
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
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 10MB will be dropped.
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 will be processed with the corresponding service
595
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
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