openai 0.110.0 → 0.112.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 (255) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/beta/agent.rb +2 -2
  5. data/lib/openai/models/beta/agent_create_params.rb +2 -2
  6. data/lib/openai/models/beta/agent_session.rb +2 -2
  7. data/lib/openai/models/beta/agent_tool.rb +18 -1
  8. data/lib/openai/models/beta/agent_tool_param.rb +18 -1
  9. data/lib/openai/models/beta/agent_update_params.rb +2 -2
  10. data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
  11. data/lib/openai/models/beta/beta_response_input_file.rb +23 -1
  12. data/lib/openai/models/beta/beta_response_input_file_content.rb +23 -1
  13. data/lib/openai/models/beta/beta_response_input_image.rb +23 -1
  14. data/lib/openai/models/beta/beta_response_input_image_content.rb +23 -1
  15. data/lib/openai/models/beta/beta_response_input_text.rb +23 -1
  16. data/lib/openai/models/beta/beta_response_input_text_content.rb +23 -1
  17. data/lib/openai/models/beta/beta_response_item.rb +28 -1
  18. data/lib/openai/models/beta/beta_response_output_item.rb +28 -1
  19. data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +26 -15
  20. data/lib/openai/models/beta/beta_tool.rb +26 -15
  21. data/lib/openai/models/beta/persisted_agent_tool.rb +18 -1
  22. data/lib/openai/models/beta/persisted_agent_tool_param.rb +18 -1
  23. data/lib/openai/models/chat/chat_completion_content_part.rb +23 -1
  24. data/lib/openai/models/chat/chat_completion_content_part_image.rb +23 -1
  25. data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +23 -1
  26. data/lib/openai/models/chat/chat_completion_content_part_text.rb +23 -1
  27. data/lib/openai/models/conversations/computer_screenshot_content.rb +23 -1
  28. data/lib/openai/models/decision_create_params.rb +802 -28
  29. data/lib/openai/models/decision_input_json.rb +45 -0
  30. data/lib/openai/models/decision_input_message.rb +304 -48
  31. data/lib/openai/models/decision_input_part.rb +4 -1
  32. data/lib/openai/models/decision_question_input_image.rb +54 -0
  33. data/lib/openai/models/decision_question_input_part.rb +23 -0
  34. data/lib/openai/models/decision_question_input_text.rb +21 -0
  35. data/lib/openai/models/image_edit_params.rb +20 -4
  36. data/lib/openai/models/image_generate_params.rb +23 -7
  37. data/lib/openai/models/image_model.rb +2 -0
  38. data/lib/openai/models/live/client_delegation.rb +20 -1
  39. data/lib/openai/models/live/client_event.rb +4 -4
  40. data/lib/openai/models/live/commentary_append_event.rb +1 -1
  41. data/lib/openai/models/live/decision_assistant_message.rb +154 -0
  42. data/lib/openai/models/live/decision_choice_option.rb +35 -0
  43. data/lib/openai/models/live/decision_developer_message.rb +70 -0
  44. data/lib/openai/models/live/decision_input_text.rb +26 -0
  45. data/lib/openai/models/live/decision_item_create_event.rb +490 -131
  46. data/lib/openai/models/live/decision_item_created_event.rb +486 -131
  47. data/lib/openai/models/live/decision_json_object.rb +10 -0
  48. data/lib/openai/models/live/decision_question.rb +172 -0
  49. data/lib/openai/models/live/decision_stored_assistant_message.rb +152 -0
  50. data/lib/openai/models/live/decision_stored_developer_message.rb +68 -0
  51. data/lib/openai/models/live/decision_stored_system_message.rb +68 -0
  52. data/lib/openai/models/live/decision_stored_user_message.rb +195 -0
  53. data/lib/openai/models/live/decision_system_message.rb +70 -0
  54. data/lib/openai/models/live/decision_trigger.rb +6 -185
  55. data/lib/openai/models/live/decision_user_message.rb +193 -0
  56. data/lib/openai/models/live/decisions_delegation_config.rb +5 -177
  57. data/lib/openai/models/live/decisions_delegation_update_config.rb +5 -184
  58. data/lib/openai/models/live/fork_client_event.rb +4 -4
  59. data/lib/openai/models/live/fork_server_event.rb +2 -2
  60. data/lib/openai/models/live/fork_session_config.rb +20 -1
  61. data/lib/openai/models/live/input_audio_muted_event.rb +3 -2
  62. data/lib/openai/models/live/input_audio_unmute_event.rb +2 -1
  63. data/lib/openai/models/live/input_audio_unmuted_event.rb +3 -2
  64. data/lib/openai/models/live/instructions_append_event.rb +5 -2
  65. data/lib/openai/models/live/media_session_config.rb +39 -2
  66. data/lib/openai/models/live/media_session_fork_config.rb +20 -1
  67. data/lib/openai/models/live/server_event.rb +2 -2
  68. data/lib/openai/models/live/session_accept_params.rb +39 -2
  69. data/lib/openai/models/live/session_config.rb +39 -2
  70. data/lib/openai/models/live/session_resource.rb +39 -2
  71. data/lib/openai/models/live/session_update_config.rb +41 -2
  72. data/lib/openai/models/live/sideband_client_event.rb +4 -4
  73. data/lib/openai/models/live/sideband_server_event.rb +2 -2
  74. data/lib/openai/models/live/thinking_append_event.rb +1 -1
  75. data/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb +10 -12
  76. data/lib/openai/models/realtime/realtime_error_event.rb +1 -1
  77. data/lib/openai/models/realtime/realtime_server_event.rb +1 -1
  78. data/lib/openai/models/realtime/realtime_translation_server_event.rb +1 -1
  79. data/lib/openai/models/responses/response_input_file.rb +23 -1
  80. data/lib/openai/models/responses/response_input_file_content.rb +23 -1
  81. data/lib/openai/models/responses/response_input_image.rb +23 -1
  82. data/lib/openai/models/responses/response_input_image_content.rb +23 -1
  83. data/lib/openai/models/responses/response_input_text.rb +23 -1
  84. data/lib/openai/models/responses/response_input_text_content.rb +23 -1
  85. data/lib/openai/models/responses/response_tool_search_output_item_param.rb +26 -15
  86. data/lib/openai/models/responses/tool.rb +26 -15
  87. data/lib/openai/models.rb +8 -0
  88. data/lib/openai/resources/beta/agents.rb +2 -2
  89. data/lib/openai/resources/beta/responses.rb +2 -2
  90. data/lib/openai/resources/decisions.rb +5 -6
  91. data/lib/openai/resources/images.rb +18 -6
  92. data/lib/openai/resources/live/forks.rb +2 -2
  93. data/lib/openai/resources/live/sideband.rb +2 -2
  94. data/lib/openai/resources/live.rb +2 -2
  95. data/lib/openai/resources/realtime/translations.rb +2 -2
  96. data/lib/openai/resources/realtime.rb +2 -2
  97. data/lib/openai/resources/responses.rb +2 -2
  98. data/lib/openai/version.rb +1 -1
  99. data/lib/openai.rb +16 -0
  100. data/rbi/openai/models/beta/agent.rbi +2 -1
  101. data/rbi/openai/models/beta/agent_create_params.rbi +6 -3
  102. data/rbi/openai/models/beta/agent_session.rbi +2 -1
  103. data/rbi/openai/models/beta/agent_tool.rbi +40 -1
  104. data/rbi/openai/models/beta/agent_tool_param.rbi +40 -1
  105. data/rbi/openai/models/beta/agent_update_params.rbi +6 -3
  106. data/rbi/openai/models/beta/agents/session_create_params.rbi +6 -3
  107. data/rbi/openai/models/beta/beta_response_input_file.rbi +31 -1
  108. data/rbi/openai/models/beta/beta_response_input_file_content.rbi +39 -1
  109. data/rbi/openai/models/beta/beta_response_input_image.rbi +31 -1
  110. data/rbi/openai/models/beta/beta_response_input_image_content.rbi +39 -1
  111. data/rbi/openai/models/beta/beta_response_input_text.rbi +31 -1
  112. data/rbi/openai/models/beta/beta_response_input_text_content.rbi +39 -1
  113. data/rbi/openai/models/beta/beta_response_item.rbi +58 -1
  114. data/rbi/openai/models/beta/beta_response_output_item.rbi +58 -1
  115. data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +24 -15
  116. data/rbi/openai/models/beta/beta_tool.rbi +24 -15
  117. data/rbi/openai/models/beta/persisted_agent_tool.rbi +40 -1
  118. data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +40 -1
  119. data/rbi/openai/models/chat/chat_completion_content_part.rbi +43 -1
  120. data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +41 -1
  121. data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +46 -1
  122. data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +39 -1
  123. data/rbi/openai/models/conversations/computer_screenshot_content.rbi +48 -1
  124. data/rbi/openai/models/decision_create_params.rbi +1273 -26
  125. data/rbi/openai/models/decision_input_json.rbi +75 -0
  126. data/rbi/openai/models/decision_input_message.rbi +455 -52
  127. data/rbi/openai/models/decision_input_part.rbi +2 -1
  128. data/rbi/openai/models/decision_question_input_image.rbi +82 -0
  129. data/rbi/openai/models/decision_question_input_part.rbi +25 -0
  130. data/rbi/openai/models/decision_question_input_text.rbi +49 -0
  131. data/rbi/openai/models/image_edit_params.rbi +12 -3
  132. data/rbi/openai/models/image_generate_params.rbi +15 -6
  133. data/rbi/openai/models/live/client_delegation.rbi +23 -1
  134. data/rbi/openai/models/live/commentary_append_event.rbi +1 -1
  135. data/rbi/openai/models/live/decision_assistant_message.rbi +247 -0
  136. data/rbi/openai/models/live/decision_choice_option.rbi +67 -0
  137. data/rbi/openai/models/live/decision_developer_message.rbi +109 -0
  138. data/rbi/openai/models/live/decision_input_text.rbi +55 -0
  139. data/rbi/openai/models/live/decision_item_create_event.rbi +765 -184
  140. data/rbi/openai/models/live/decision_item_created_event.rbi +737 -184
  141. data/rbi/openai/models/live/decision_json_object.rbi +16 -0
  142. data/rbi/openai/models/live/decision_question.rbi +300 -0
  143. data/rbi/openai/models/live/decision_stored_assistant_message.rbi +245 -0
  144. data/rbi/openai/models/live/decision_stored_developer_message.rbi +107 -0
  145. data/rbi/openai/models/live/decision_stored_system_message.rbi +107 -0
  146. data/rbi/openai/models/live/decision_stored_user_message.rbi +333 -0
  147. data/rbi/openai/models/live/decision_system_message.rbi +109 -0
  148. data/rbi/openai/models/live/decision_trigger.rbi +11 -320
  149. data/rbi/openai/models/live/decision_user_message.rbi +320 -0
  150. data/rbi/openai/models/live/decisions_delegation_config.rbi +10 -321
  151. data/rbi/openai/models/live/decisions_delegation_update_config.rbi +13 -324
  152. data/rbi/openai/models/live/fork_session_config.rbi +27 -1
  153. data/rbi/openai/models/live/input_audio_muted_event.rbi +3 -2
  154. data/rbi/openai/models/live/input_audio_unmute_event.rbi +2 -1
  155. data/rbi/openai/models/live/input_audio_unmuted_event.rbi +3 -2
  156. data/rbi/openai/models/live/instructions_append_event.rbi +5 -2
  157. data/rbi/openai/models/live/media_session_config.rbi +44 -2
  158. data/rbi/openai/models/live/media_session_fork_config.rbi +27 -1
  159. data/rbi/openai/models/live/session_accept_params.rbi +44 -2
  160. data/rbi/openai/models/live/session_config.rbi +44 -2
  161. data/rbi/openai/models/live/session_resource.rbi +44 -2
  162. data/rbi/openai/models/live/session_update_config.rbi +54 -2
  163. data/rbi/openai/models/live/thinking_append_event.rbi +1 -1
  164. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbi +10 -12
  165. data/rbi/openai/models/realtime/realtime_error_event.rbi +1 -1
  166. data/rbi/openai/models/responses/response_input_file.rbi +31 -1
  167. data/rbi/openai/models/responses/response_input_file_content.rbi +39 -1
  168. data/rbi/openai/models/responses/response_input_image.rbi +33 -1
  169. data/rbi/openai/models/responses/response_input_image_content.rbi +41 -1
  170. data/rbi/openai/models/responses/response_input_text.rbi +31 -1
  171. data/rbi/openai/models/responses/response_input_text_content.rbi +39 -1
  172. data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +24 -15
  173. data/rbi/openai/models/responses/tool.rbi +24 -15
  174. data/rbi/openai/models.rbi +8 -0
  175. data/rbi/openai/resources/beta/agents.rbi +4 -2
  176. data/rbi/openai/resources/beta/responses.rbi +8 -1
  177. data/rbi/openai/resources/decisions.rbi +4 -5
  178. data/rbi/openai/resources/images.rbi +18 -6
  179. data/rbi/openai/resources/live/forks.rbi +8 -1
  180. data/rbi/openai/resources/live/sideband.rbi +8 -1
  181. data/rbi/openai/resources/live.rbi +8 -1
  182. data/rbi/openai/resources/realtime/translations.rbi +8 -1
  183. data/rbi/openai/resources/realtime.rbi +8 -1
  184. data/rbi/openai/resources/responses.rbi +8 -1
  185. data/sig/openai/models/beta/agent_tool.rbs +14 -0
  186. data/sig/openai/models/beta/agent_tool_param.rbs +14 -0
  187. data/sig/openai/models/beta/beta_response_input_file.rbs +34 -3
  188. data/sig/openai/models/beta/beta_response_input_file_content.rbs +34 -3
  189. data/sig/openai/models/beta/beta_response_input_image.rbs +34 -3
  190. data/sig/openai/models/beta/beta_response_input_image_content.rbs +34 -3
  191. data/sig/openai/models/beta/beta_response_input_text.rbs +34 -3
  192. data/sig/openai/models/beta/beta_response_input_text_content.rbs +34 -3
  193. data/sig/openai/models/beta/beta_response_item.rbs +34 -3
  194. data/sig/openai/models/beta/beta_response_output_item.rbs +34 -3
  195. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +24 -15
  196. data/sig/openai/models/beta/beta_tool.rbs +24 -15
  197. data/sig/openai/models/beta/persisted_agent_tool.rbs +14 -0
  198. data/sig/openai/models/beta/persisted_agent_tool_param.rbs +14 -0
  199. data/sig/openai/models/chat/chat_completion_content_part.rbs +34 -3
  200. data/sig/openai/models/chat/chat_completion_content_part_image.rbs +34 -3
  201. data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +34 -3
  202. data/sig/openai/models/chat/chat_completion_content_part_text.rbs +34 -3
  203. data/sig/openai/models/conversations/computer_screenshot_content.rbs +34 -3
  204. data/sig/openai/models/decision_create_params.rbs +610 -24
  205. data/sig/openai/models/decision_input_json.rbs +34 -0
  206. data/sig/openai/models/decision_input_message.rbs +264 -35
  207. data/sig/openai/models/decision_input_part.rbs +3 -1
  208. data/sig/openai/models/decision_question_input_image.rbs +51 -0
  209. data/sig/openai/models/decision_question_input_part.rbs +14 -0
  210. data/sig/openai/models/decision_question_input_text.rbs +15 -0
  211. data/sig/openai/models/image_edit_params.rbs +8 -2
  212. data/sig/openai/models/image_generate_params.rbs +10 -4
  213. data/sig/openai/models/live/client_delegation.rbs +30 -3
  214. data/sig/openai/models/live/decision_assistant_message.rbs +134 -0
  215. data/sig/openai/models/live/decision_choice_option.rbs +37 -0
  216. data/sig/openai/models/live/decision_developer_message.rbs +67 -0
  217. data/sig/openai/models/live/decision_input_text.rbs +20 -0
  218. data/sig/openai/models/live/decision_item_create_event.rbs +413 -131
  219. data/sig/openai/models/live/decision_item_created_event.rbs +401 -131
  220. data/sig/openai/models/live/decision_json_object.rbs +9 -0
  221. data/sig/openai/models/live/decision_question.rbs +164 -0
  222. data/sig/openai/models/live/decision_stored_assistant_message.rbs +131 -0
  223. data/sig/openai/models/live/decision_stored_developer_message.rbs +64 -0
  224. data/sig/openai/models/live/decision_stored_system_message.rbs +64 -0
  225. data/sig/openai/models/live/decision_stored_user_message.rbs +177 -0
  226. data/sig/openai/models/live/decision_system_message.rbs +67 -0
  227. data/sig/openai/models/live/decision_trigger.rbs +8 -171
  228. data/sig/openai/models/live/decision_user_message.rbs +180 -0
  229. data/sig/openai/models/live/decisions_delegation_config.rbs +6 -167
  230. data/sig/openai/models/live/decisions_delegation_update_config.rbs +8 -169
  231. data/sig/openai/models/live/fork_session_config.rbs +26 -0
  232. data/sig/openai/models/live/media_session_config.rbs +53 -4
  233. data/sig/openai/models/live/media_session_fork_config.rbs +26 -0
  234. data/sig/openai/models/live/session_accept_params.rbs +53 -4
  235. data/sig/openai/models/live/session_config.rbs +53 -4
  236. data/sig/openai/models/live/session_resource.rbs +53 -4
  237. data/sig/openai/models/live/session_update_config.rbs +52 -0
  238. data/sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbs +10 -12
  239. data/sig/openai/models/responses/response_input_file.rbs +34 -3
  240. data/sig/openai/models/responses/response_input_file_content.rbs +34 -3
  241. data/sig/openai/models/responses/response_input_image.rbs +34 -3
  242. data/sig/openai/models/responses/response_input_image_content.rbs +34 -3
  243. data/sig/openai/models/responses/response_input_text.rbs +34 -3
  244. data/sig/openai/models/responses/response_input_text_content.rbs +34 -3
  245. data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +24 -15
  246. data/sig/openai/models/responses/tool.rbs +24 -15
  247. data/sig/openai/models.rbs +9 -1
  248. data/sig/openai/resources/beta/responses.rbs +2 -1
  249. data/sig/openai/resources/live/forks.rbs +2 -1
  250. data/sig/openai/resources/live/sideband.rbs +2 -1
  251. data/sig/openai/resources/live.rbs +2 -1
  252. data/sig/openai/resources/realtime/translations.rbs +2 -1
  253. data/sig/openai/resources/realtime.rbs +2 -1
  254. data/sig/openai/resources/responses.rbs +2 -1
  255. metadata +49 -1
@@ -8,12 +8,11 @@ module OpenAI
8
8
  include OpenAI::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute input
11
- # The text or images to evaluate for every question. Provide a text string or user
12
- # messages containing text and images. Images can be base64 data URLs or publicly
13
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
14
- # one request. Files, audio, tools, and item references are not supported.
11
+ # The input to evaluate for every question. Provide a text string or an ordered
12
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
13
+ # Each tool output must identify a matching call by call ID.
15
14
  #
16
- # @return [String, Array<OpenAI::Models::DecisionInputMessage>]
15
+ # @return [String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>]
17
16
  required :input, union: -> { OpenAI::DecisionCreateParams::Input }
18
17
 
19
18
  # @!attribute model
@@ -23,7 +22,7 @@ module OpenAI
23
22
  required :model, String
24
23
 
25
24
  # @!attribute questions
26
- # Ask 1–200 questions about the input. Each question can be a predicate, choice,
25
+ # Ask 1–400 questions about the input. Each question can be a predicate, choice,
27
26
  # or score. Answers come back in the same order.
28
27
  #
29
28
  # @return [Array<OpenAI::Models::DecisionCreateParams::Question::Predicate, OpenAI::Models::DecisionCreateParams::Question::Choice, OpenAI::Models::DecisionCreateParams::Question::Score>]
@@ -57,17 +56,16 @@ module OpenAI
57
56
  optional :safety_identifier, String, nil?: true
58
57
 
59
58
  # @!method initialize(input:, model:, questions:, prompt_cache_key: nil, prompt_cache_options: nil, safety_identifier: nil, request_options: {})
60
- # @param input [String, Array<OpenAI::Models::DecisionInputMessage>]
61
- # The text or images to evaluate for every question. Provide a text string or user
62
- # messages containing text and images. Images can be base64 data URLs or publicly
63
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
64
- # one request. Files, audio, tools, and item references are not supported.
59
+ # @param input [String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>]
60
+ # The input to evaluate for every question. Provide a text string or an ordered
61
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
62
+ # Each tool output must identify a matching call by call ID.
65
63
  #
66
64
  # @param model [String]
67
65
  # The model to use. Only `gpt-6-luna` is supported.
68
66
  #
69
67
  # @param questions [Array<OpenAI::Models::DecisionCreateParams::Question::Predicate, OpenAI::Models::DecisionCreateParams::Question::Choice, OpenAI::Models::DecisionCreateParams::Question::Score>]
70
- # Ask 1–200 questions about the input. Each question can be a predicate, choice,
68
+ # Ask 1–400 questions about the input. Each question can be a predicate, choice,
71
69
  # or score. Answers come back in the same order.
72
70
  #
73
71
  # @param prompt_cache_key [String, nil]
@@ -90,22 +88,734 @@ module OpenAI
90
88
  #
91
89
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
92
90
 
93
- # The text or images to evaluate for every question. Provide a text string or user
94
- # messages containing text and images. Images can be base64 data URLs or publicly
95
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
96
- # one request. Files, audio, tools, and item references are not supported.
91
+ # The input to evaluate for every question. Provide a text string or an ordered
92
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
93
+ # Each tool output must identify a matching call by call ID.
97
94
  module Input
98
95
  extend OpenAI::Internal::Type::Union
99
96
 
100
97
  variant String
101
98
 
102
- variant -> { OpenAI::Models::DecisionCreateParams::Input::DecisionInputMessageArray }
99
+ variant -> { OpenAI::Models::DecisionCreateParams::Input::UnionMember1Array }
100
+
101
+ # A user message containing input text, images, or JSON.
102
+ module UnionMember1
103
+ extend OpenAI::Internal::Type::Union
104
+
105
+ discriminator :type
106
+
107
+ # A user message containing input text, images, or JSON.
108
+ variant :message, -> { OpenAI::DecisionInputMessage }
109
+
110
+ # A developer message containing input text.
111
+ variant :message, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage }
112
+
113
+ # A system message containing input text.
114
+ variant :message, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage }
115
+
116
+ # An assistant message containing output text or refusals.
117
+ variant :message, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage }
118
+
119
+ variant :function_call, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall }
120
+
121
+ variant(
122
+ :function_call_output,
123
+ -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput }
124
+ )
125
+
126
+ variant :custom_tool_call, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall }
127
+
128
+ variant(
129
+ :custom_tool_call_output,
130
+ -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput }
131
+ )
132
+
133
+ class DecisionInputUserMessage < OpenAI::Internal::Type::BaseModel
134
+ # @!attribute content
135
+ # A text string or an ordered list of text, image, and JSON parts.
136
+ #
137
+ # @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>]
138
+ required(
139
+ :content,
140
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content }
141
+ )
142
+
143
+ # @!attribute role
144
+ #
145
+ # @return [Symbol, :user]
146
+ required :role, const: :user
147
+
148
+ # @!attribute type
149
+ #
150
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type, nil]
151
+ optional(
152
+ :type,
153
+ enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type }
154
+ )
155
+
156
+ # @!method initialize(content:, type: nil, role: :user)
157
+ # A user message containing input text, images, or JSON.
158
+ #
159
+ # @param content [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>]
160
+ # A text string or an ordered list of text, image, and JSON parts.
161
+ #
162
+ # @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type]
163
+ #
164
+ # @param role [Symbol, :user]
165
+
166
+ # A text string or an ordered list of text, image, and JSON parts.
167
+ #
168
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage#content
169
+ module Content
170
+ extend OpenAI::Internal::Type::Union
171
+
172
+ variant String
173
+
174
+ variant(
175
+ -> {
176
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content::DecisionInputPartArray
177
+ }
178
+ )
179
+
180
+ # @!method self.variants
181
+ # @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>)]
182
+
183
+ # @type [OpenAI::Internal::Type::Converter]
184
+ DecisionInputPartArray = OpenAI::Internal::Type::ArrayOf[union: -> { OpenAI::DecisionInputPart }]
185
+ end
186
+
187
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage#type
188
+ module Type
189
+ extend OpenAI::Internal::Type::Enum
190
+
191
+ MESSAGE = :message
192
+
193
+ # @!method self.values
194
+ # @return [Array<Symbol>]
195
+ end
196
+ end
197
+
198
+ class DecisionInputDeveloperMessage < OpenAI::Internal::Type::BaseModel
199
+ # @!attribute content
200
+ # A text string or an ordered list of input text parts.
201
+ #
202
+ # @return [String, Array<OpenAI::Models::DecisionInputText>]
203
+ required(
204
+ :content,
205
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content }
206
+ )
207
+
208
+ # @!attribute role
209
+ #
210
+ # @return [Symbol, :developer]
211
+ required :role, const: :developer
212
+
213
+ # @!attribute type
214
+ #
215
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type, nil]
216
+ optional(
217
+ :type,
218
+ enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type }
219
+ )
220
+
221
+ # @!method initialize(content:, type: nil, role: :developer)
222
+ # A developer message containing input text.
223
+ #
224
+ # @param content [String, Array<OpenAI::Models::DecisionInputText>]
225
+ # A text string or an ordered list of input text parts.
226
+ #
227
+ # @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type]
228
+ #
229
+ # @param role [Symbol, :developer]
230
+
231
+ # A text string or an ordered list of input text parts.
232
+ #
233
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage#content
234
+ module Content
235
+ extend OpenAI::Internal::Type::Union
236
+
237
+ variant String
238
+
239
+ variant(
240
+ -> {
241
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content::DecisionInputTextArray
242
+ }
243
+ )
244
+
245
+ # @!method self.variants
246
+ # @return [Array(String, Array<OpenAI::Models::DecisionInputText>)]
247
+
248
+ # @type [OpenAI::Internal::Type::Converter]
249
+ DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputText }]
250
+ end
251
+
252
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage#type
253
+ module Type
254
+ extend OpenAI::Internal::Type::Enum
255
+
256
+ MESSAGE = :message
257
+
258
+ # @!method self.values
259
+ # @return [Array<Symbol>]
260
+ end
261
+ end
262
+
263
+ class DecisionInputSystemMessage < OpenAI::Internal::Type::BaseModel
264
+ # @!attribute content
265
+ # A text string or an ordered list of input text parts.
266
+ #
267
+ # @return [String, Array<OpenAI::Models::DecisionInputText>]
268
+ required(
269
+ :content,
270
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content }
271
+ )
272
+
273
+ # @!attribute role
274
+ #
275
+ # @return [Symbol, :system]
276
+ required :role, const: :system
277
+
278
+ # @!attribute type
279
+ #
280
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type, nil]
281
+ optional(
282
+ :type,
283
+ enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type }
284
+ )
285
+
286
+ # @!method initialize(content:, type: nil, role: :system)
287
+ # A system message containing input text.
288
+ #
289
+ # @param content [String, Array<OpenAI::Models::DecisionInputText>]
290
+ # A text string or an ordered list of input text parts.
291
+ #
292
+ # @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type]
293
+ #
294
+ # @param role [Symbol, :system]
295
+
296
+ # A text string or an ordered list of input text parts.
297
+ #
298
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage#content
299
+ module Content
300
+ extend OpenAI::Internal::Type::Union
301
+
302
+ variant String
303
+
304
+ variant(
305
+ -> {
306
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content::DecisionInputTextArray
307
+ }
308
+ )
309
+
310
+ # @!method self.variants
311
+ # @return [Array(String, Array<OpenAI::Models::DecisionInputText>)]
312
+
313
+ # @type [OpenAI::Internal::Type::Converter]
314
+ DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputText }]
315
+ end
316
+
317
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage#type
318
+ module Type
319
+ extend OpenAI::Internal::Type::Enum
320
+
321
+ MESSAGE = :message
322
+
323
+ # @!method self.values
324
+ # @return [Array<Symbol>]
325
+ end
326
+ end
327
+
328
+ class DecisionInputAssistantMessage < OpenAI::Internal::Type::BaseModel
329
+ # @!attribute content
330
+ # A text string or an ordered list of output text and refusal parts.
331
+ #
332
+ # @return [String, Array<OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal>]
333
+ required(
334
+ :content,
335
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content }
336
+ )
337
+
338
+ # @!attribute role
339
+ #
340
+ # @return [Symbol, :assistant]
341
+ required :role, const: :assistant
342
+
343
+ # @!attribute phase
344
+ # The phase of an assistant message.
345
+ #
346
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase, nil]
347
+ optional(
348
+ :phase,
349
+ enum: -> {
350
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase
351
+ },
352
+ nil?: true
353
+ )
354
+
355
+ # @!attribute type
356
+ #
357
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type, nil]
358
+ optional(
359
+ :type,
360
+ enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type }
361
+ )
362
+
363
+ # @!method initialize(content:, phase: nil, type: nil, role: :assistant)
364
+ # An assistant message containing output text or refusals.
365
+ #
366
+ # @param content [String, Array<OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal>]
367
+ # A text string or an ordered list of output text and refusal parts.
368
+ #
369
+ # @param phase [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase, nil]
370
+ # The phase of an assistant message.
371
+ #
372
+ # @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type]
373
+ #
374
+ # @param role [Symbol, :assistant]
375
+
376
+ # A text string or an ordered list of output text and refusal parts.
377
+ #
378
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage#content
379
+ module Content
380
+ extend OpenAI::Internal::Type::Union
381
+
382
+ variant String
383
+
384
+ variant(
385
+ -> {
386
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::PartsArray
387
+ }
388
+ )
389
+
390
+ module Part
391
+ extend OpenAI::Internal::Type::Union
392
+
393
+ discriminator :type
394
+
395
+ variant(
396
+ :output_text,
397
+ -> {
398
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText
399
+ }
400
+ )
401
+
402
+ variant(
403
+ :refusal,
404
+ -> {
405
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal
406
+ }
407
+ )
408
+
409
+ class OutputText < OpenAI::Internal::Type::BaseModel
410
+ # @!attribute text
411
+ #
412
+ # @return [String]
413
+ required :text, String
414
+
415
+ # @!attribute type
416
+ #
417
+ # @return [Symbol, :output_text]
418
+ required :type, const: :output_text
419
+
420
+ # @!method initialize(text:, type: :output_text)
421
+ # @param text [String]
422
+ # @param type [Symbol, :output_text]
423
+ end
424
+
425
+ class Refusal < OpenAI::Internal::Type::BaseModel
426
+ # @!attribute refusal
427
+ #
428
+ # @return [String]
429
+ required :refusal, String
430
+
431
+ # @!attribute type
432
+ #
433
+ # @return [Symbol, :refusal]
434
+ required :type, const: :refusal
435
+
436
+ # @!method initialize(refusal:, type: :refusal)
437
+ # @param refusal [String]
438
+ # @param type [Symbol, :refusal]
439
+ end
440
+
441
+ # @!method self.variants
442
+ # @return [Array(OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal)]
443
+ end
444
+
445
+ # @!method self.variants
446
+ # @return [Array(String, Array<OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal>)]
447
+
448
+ # @type [OpenAI::Internal::Type::Converter]
449
+ PartsArray = OpenAI::Internal::Type::ArrayOf[
450
+ union: -> {
451
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part
452
+ }
453
+ ]
454
+ end
455
+
456
+ # The phase of an assistant message.
457
+ #
458
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage#phase
459
+ module Phase
460
+ extend OpenAI::Internal::Type::Enum
461
+
462
+ COMMENTARY = :commentary
463
+ FINAL_ANSWER = :final_answer
464
+
465
+ # @!method self.values
466
+ # @return [Array<Symbol>]
467
+ end
468
+
469
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage#type
470
+ module Type
471
+ extend OpenAI::Internal::Type::Enum
472
+
473
+ MESSAGE = :message
474
+
475
+ # @!method self.values
476
+ # @return [Array<Symbol>]
477
+ end
478
+ end
479
+
480
+ class FunctionCall < OpenAI::Internal::Type::BaseModel
481
+ # @!attribute arguments
482
+ #
483
+ # @return [String]
484
+ required :arguments, String
485
+
486
+ # @!attribute call_id
487
+ #
488
+ # @return [String]
489
+ required :call_id, String
490
+
491
+ # @!attribute name
492
+ #
493
+ # @return [String]
494
+ required :name, String
495
+
496
+ # @!attribute type
497
+ #
498
+ # @return [Symbol, :function_call]
499
+ required :type, const: :function_call
500
+
501
+ # @!attribute id
502
+ #
503
+ # @return [String, nil]
504
+ optional :id, String, nil?: true
505
+
506
+ # @!attribute namespace
507
+ #
508
+ # @return [String, nil]
509
+ optional :namespace, String, nil?: true
510
+
511
+ # @!attribute status
512
+ #
513
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status, nil]
514
+ optional(
515
+ :status,
516
+ enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status },
517
+ nil?: true
518
+ )
519
+
520
+ # @!method initialize(arguments:, call_id:, name:, id: nil, namespace: nil, status: nil, type: :function_call)
521
+ # @param arguments [String]
522
+ # @param call_id [String]
523
+ # @param name [String]
524
+ # @param id [String, nil]
525
+ # @param namespace [String, nil]
526
+ # @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status, nil]
527
+ # @param type [Symbol, :function_call]
528
+
529
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall#status
530
+ module Status
531
+ extend OpenAI::Internal::Type::Enum
532
+
533
+ IN_PROGRESS = :in_progress
534
+ COMPLETED = :completed
535
+ INCOMPLETE = :incomplete
536
+
537
+ # @!method self.values
538
+ # @return [Array<Symbol>]
539
+ end
540
+ end
541
+
542
+ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel
543
+ # @!attribute call_id
544
+ #
545
+ # @return [String]
546
+ required :call_id, String
547
+
548
+ # @!attribute output
549
+ # Text evidence or an ordered list of text and image parts.
550
+ #
551
+ # @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
552
+ required(
553
+ :output,
554
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output }
555
+ )
556
+
557
+ # @!attribute type
558
+ #
559
+ # @return [Symbol, :function_call_output]
560
+ required :type, const: :function_call_output
561
+
562
+ # @!attribute id
563
+ #
564
+ # @return [String, nil]
565
+ optional :id, String, nil?: true
566
+
567
+ # @!attribute status
568
+ #
569
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status, nil]
570
+ optional(
571
+ :status,
572
+ enum: -> {
573
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status
574
+ },
575
+ nil?: true
576
+ )
577
+
578
+ # @!method initialize(call_id:, output:, id: nil, status: nil, type: :function_call_output)
579
+ # @param call_id [String]
580
+ #
581
+ # @param output [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
582
+ # Text evidence or an ordered list of text and image parts.
583
+ #
584
+ # @param id [String, nil]
585
+ #
586
+ # @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status, nil]
587
+ #
588
+ # @param type [Symbol, :function_call_output]
589
+
590
+ # Text evidence or an ordered list of text and image parts.
591
+ #
592
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput#output
593
+ module Output
594
+ extend OpenAI::Internal::Type::Union
595
+
596
+ variant String
597
+
598
+ variant(
599
+ -> {
600
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::PartsArray
601
+ }
602
+ )
603
+
604
+ # An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
605
+ # File IDs are not supported.
606
+ module Part
607
+ extend OpenAI::Internal::Type::Union
608
+
609
+ discriminator :type
610
+
611
+ variant :input_text, -> { OpenAI::DecisionInputText }
612
+
613
+ # An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
614
+ variant :input_image, -> { OpenAI::DecisionInputImage }
615
+
616
+ # @!method self.variants
617
+ # @return [Array(OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage)]
618
+ end
619
+
620
+ # @!method self.variants
621
+ # @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>)]
622
+
623
+ # @type [OpenAI::Internal::Type::Converter]
624
+ PartsArray = OpenAI::Internal::Type::ArrayOf[
625
+ union: -> {
626
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Part
627
+ }
628
+ ]
629
+ end
630
+
631
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput#status
632
+ module Status
633
+ extend OpenAI::Internal::Type::Enum
634
+
635
+ IN_PROGRESS = :in_progress
636
+ COMPLETED = :completed
637
+ INCOMPLETE = :incomplete
638
+
639
+ # @!method self.values
640
+ # @return [Array<Symbol>]
641
+ end
642
+ end
643
+
644
+ class CustomToolCall < OpenAI::Internal::Type::BaseModel
645
+ # @!attribute call_id
646
+ #
647
+ # @return [String]
648
+ required :call_id, String
649
+
650
+ # @!attribute input
651
+ #
652
+ # @return [String]
653
+ required :input, String
654
+
655
+ # @!attribute name
656
+ #
657
+ # @return [String]
658
+ required :name, String
659
+
660
+ # @!attribute type
661
+ #
662
+ # @return [Symbol, :custom_tool_call]
663
+ required :type, const: :custom_tool_call
664
+
665
+ # @!attribute id
666
+ #
667
+ # @return [String, nil]
668
+ optional :id, String, nil?: true
669
+
670
+ # @!attribute namespace
671
+ #
672
+ # @return [String, nil]
673
+ optional :namespace, String, nil?: true
674
+
675
+ # @!attribute status
676
+ #
677
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status, nil]
678
+ optional(
679
+ :status,
680
+ enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status },
681
+ nil?: true
682
+ )
683
+
684
+ # @!method initialize(call_id:, input:, name:, id: nil, namespace: nil, status: nil, type: :custom_tool_call)
685
+ # @param call_id [String]
686
+ # @param input [String]
687
+ # @param name [String]
688
+ # @param id [String, nil]
689
+ # @param namespace [String, nil]
690
+ # @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status, nil]
691
+ # @param type [Symbol, :custom_tool_call]
692
+
693
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall#status
694
+ module Status
695
+ extend OpenAI::Internal::Type::Enum
696
+
697
+ IN_PROGRESS = :in_progress
698
+ COMPLETED = :completed
699
+ INCOMPLETE = :incomplete
700
+
701
+ # @!method self.values
702
+ # @return [Array<Symbol>]
703
+ end
704
+ end
705
+
706
+ class CustomToolCallOutput < OpenAI::Internal::Type::BaseModel
707
+ # @!attribute call_id
708
+ #
709
+ # @return [String]
710
+ required :call_id, String
711
+
712
+ # @!attribute output
713
+ # Text evidence or an ordered list of text and image parts.
714
+ #
715
+ # @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
716
+ required(
717
+ :output,
718
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output }
719
+ )
720
+
721
+ # @!attribute type
722
+ #
723
+ # @return [Symbol, :custom_tool_call_output]
724
+ required :type, const: :custom_tool_call_output
725
+
726
+ # @!attribute id
727
+ #
728
+ # @return [String, nil]
729
+ optional :id, String, nil?: true
730
+
731
+ # @!attribute status
732
+ #
733
+ # @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status, nil]
734
+ optional(
735
+ :status,
736
+ enum: -> {
737
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status
738
+ },
739
+ nil?: true
740
+ )
741
+
742
+ # @!method initialize(call_id:, output:, id: nil, status: nil, type: :custom_tool_call_output)
743
+ # @param call_id [String]
744
+ #
745
+ # @param output [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
746
+ # Text evidence or an ordered list of text and image parts.
747
+ #
748
+ # @param id [String, nil]
749
+ #
750
+ # @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status, nil]
751
+ #
752
+ # @param type [Symbol, :custom_tool_call_output]
753
+
754
+ # Text evidence or an ordered list of text and image parts.
755
+ #
756
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput#output
757
+ module Output
758
+ extend OpenAI::Internal::Type::Union
759
+
760
+ variant String
761
+
762
+ variant(
763
+ -> {
764
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::PartsArray
765
+ }
766
+ )
767
+
768
+ # An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
769
+ # File IDs are not supported.
770
+ module Part
771
+ extend OpenAI::Internal::Type::Union
772
+
773
+ discriminator :type
774
+
775
+ variant :input_text, -> { OpenAI::DecisionInputText }
776
+
777
+ # An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
778
+ variant :input_image, -> { OpenAI::DecisionInputImage }
779
+
780
+ # @!method self.variants
781
+ # @return [Array(OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage)]
782
+ end
783
+
784
+ # @!method self.variants
785
+ # @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>)]
786
+
787
+ # @type [OpenAI::Internal::Type::Converter]
788
+ PartsArray = OpenAI::Internal::Type::ArrayOf[
789
+ union: -> {
790
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Part
791
+ }
792
+ ]
793
+ end
794
+
795
+ # @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput#status
796
+ module Status
797
+ extend OpenAI::Internal::Type::Enum
798
+
799
+ IN_PROGRESS = :in_progress
800
+ COMPLETED = :completed
801
+ INCOMPLETE = :incomplete
802
+
803
+ # @!method self.values
804
+ # @return [Array<Symbol>]
805
+ end
806
+ end
807
+
808
+ # @!method self.variants
809
+ # @return [Array(OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput)]
810
+ end
103
811
 
104
812
  # @!method self.variants
105
- # @return [Array(String, Array<OpenAI::Models::DecisionInputMessage>)]
813
+ # @return [Array(String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>)]
106
814
 
107
815
  # @type [OpenAI::Internal::Type::Converter]
108
- DecisionInputMessageArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputMessage }]
816
+ UnionMember1Array = OpenAI::Internal::Type::ArrayOf[
817
+ union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1 }
818
+ ]
109
819
  end
110
820
 
111
821
  # A question about the request's input, with an optional correlation name.
@@ -126,8 +836,8 @@ module OpenAI
126
836
  class Predicate < OpenAI::Internal::Type::BaseModel
127
837
  # @!attribute instructions
128
838
  #
129
- # @return [String]
130
- required :instructions, String
839
+ # @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
840
+ required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Predicate::Instructions }
131
841
 
132
842
  # @!attribute type
133
843
  # The type of the object. Always `predicate`.
@@ -143,12 +853,33 @@ module OpenAI
143
853
  # @!method initialize(instructions:, name: nil, type: :predicate)
144
854
  # Estimate how likely it is that a statement about the input is true.
145
855
  #
146
- # @param instructions [String]
856
+ # @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
147
857
  #
148
858
  # @param name [String]
149
859
  #
150
860
  # @param type [Symbol, :predicate]
151
861
  # The type of the object. Always `predicate`.
862
+
863
+ # @see OpenAI::Models::DecisionCreateParams::Question::Predicate#instructions
864
+ module Instructions
865
+ extend OpenAI::Internal::Type::Union
866
+
867
+ variant String
868
+
869
+ variant(
870
+ -> {
871
+ OpenAI::Models::DecisionCreateParams::Question::Predicate::Instructions::DecisionQuestionInputPartArray
872
+ }
873
+ )
874
+
875
+ # @!method self.variants
876
+ # @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
877
+
878
+ # @type [OpenAI::Internal::Type::Converter]
879
+ DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
880
+ union: -> { OpenAI::DecisionQuestionInputPart }
881
+ ]
882
+ end
152
883
  end
153
884
 
154
885
  class Choice < OpenAI::Internal::Type::BaseModel
@@ -163,8 +894,8 @@ module OpenAI
163
894
 
164
895
  # @!attribute instructions
165
896
  #
166
- # @return [String]
167
- required :instructions, String
897
+ # @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
898
+ required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Choice::Instructions }
168
899
 
169
900
  # @!attribute type
170
901
  # The type of the object. Always `choice`.
@@ -183,7 +914,7 @@ module OpenAI
183
914
  # @param choices [Array<OpenAI::Models::DecisionCreateParams::Question::Choice::Choice>]
184
915
  # Provide between 2 and 255 choices. Each choice must be unique.
185
916
  #
186
- # @param instructions [String]
917
+ # @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
187
918
  #
188
919
  # @param name [String]
189
920
  #
@@ -221,13 +952,34 @@ module OpenAI
221
952
  # @return [Array(String, Boolean)]
222
953
  end
223
954
  end
955
+
956
+ # @see OpenAI::Models::DecisionCreateParams::Question::Choice#instructions
957
+ module Instructions
958
+ extend OpenAI::Internal::Type::Union
959
+
960
+ variant String
961
+
962
+ variant(
963
+ -> {
964
+ OpenAI::Models::DecisionCreateParams::Question::Choice::Instructions::DecisionQuestionInputPartArray
965
+ }
966
+ )
967
+
968
+ # @!method self.variants
969
+ # @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
970
+
971
+ # @type [OpenAI::Internal::Type::Converter]
972
+ DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
973
+ union: -> { OpenAI::DecisionQuestionInputPart }
974
+ ]
975
+ end
224
976
  end
225
977
 
226
978
  class Score < OpenAI::Internal::Type::BaseModel
227
979
  # @!attribute instructions
228
980
  #
229
- # @return [String]
230
- required :instructions, String
981
+ # @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
982
+ required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Score::Instructions }
231
983
 
232
984
  # @!attribute levels
233
985
  #
@@ -251,7 +1003,7 @@ module OpenAI
251
1003
  # @!method initialize(instructions:, levels:, name: nil, type: :score)
252
1004
  # Rate the input against the supplied ordered levels.
253
1005
  #
254
- # @param instructions [String]
1006
+ # @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
255
1007
  #
256
1008
  # @param levels [Array<OpenAI::Models::DecisionCreateParams::Question::Score::Level>]
257
1009
  #
@@ -259,6 +1011,28 @@ module OpenAI
259
1011
  #
260
1012
  # @param type [Symbol, :score]
261
1013
  # The type of the object. Always `score`.
1014
+
1015
+ # @see OpenAI::Models::DecisionCreateParams::Question::Score#instructions
1016
+ module Instructions
1017
+ extend OpenAI::Internal::Type::Union
1018
+
1019
+ variant String
1020
+
1021
+ variant(
1022
+ -> {
1023
+ OpenAI::Models::DecisionCreateParams::Question::Score::Instructions::DecisionQuestionInputPartArray
1024
+ }
1025
+ )
1026
+
1027
+ # @!method self.variants
1028
+ # @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
1029
+
1030
+ # @type [OpenAI::Internal::Type::Converter]
1031
+ DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
1032
+ union: -> { OpenAI::DecisionQuestionInputPart }
1033
+ ]
1034
+ end
1035
+
262
1036
  class Level < OpenAI::Internal::Type::BaseModel
263
1037
  # @!attribute label
264
1038
  #