openai 0.130.0 → 1.1.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 (446) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +49 -0
  3. data/README.md +39 -3
  4. data/lib/openai/client.rb +0 -4
  5. data/lib/openai/helpers/agents/session_stream.rb +5 -0
  6. data/lib/openai/helpers/beta/agents/result.rb +8 -0
  7. data/lib/openai/internal/type/union.rb +5 -1
  8. data/lib/openai/models/batch_create_params.rb +6 -19
  9. data/lib/openai/models/beta/agent_session.rb +40 -1
  10. data/lib/openai/models/beta/agent_session_budget_reached_event.rb +48 -0
  11. data/lib/openai/models/beta/agent_session_event.rb +4 -1
  12. data/lib/openai/models/beta/agents/session_create_params.rb +33 -1
  13. data/lib/openai/models/beta/agents/session_update_params.rb +33 -1
  14. data/lib/openai/models/beta/beta_compacted_response.rb +3 -3
  15. data/lib/openai/models/beta/beta_response.rb +0 -18
  16. data/lib/openai/models/beta/beta_responses_client_event.rb +0 -26
  17. data/lib/openai/models/beta/response_compact_params.rb +0 -18
  18. data/lib/openai/models/beta/response_create_params.rb +0 -18
  19. data/lib/openai/models/beta/session_turn_error.rb +3 -0
  20. data/lib/openai/models/chat/completion_create_params.rb +8 -6
  21. data/lib/openai/models/chat_model.rb +0 -12
  22. data/lib/openai/models/completion_create_params.rb +4 -2
  23. data/lib/openai/models/graders/multi_grader.rb +11 -15
  24. data/lib/openai/models/image_edit_completed_event.rb +9 -17
  25. data/lib/openai/models/image_edit_partial_image_event.rb +9 -17
  26. data/lib/openai/models/image_gen_completed_event.rb +9 -17
  27. data/lib/openai/models/image_gen_partial_image_event.rb +9 -17
  28. data/lib/openai/models/images_response.rb +8 -14
  29. data/lib/openai/models/live/responses_delegation_config.rb +47 -21
  30. data/lib/openai/models/live/responses_delegation_update_config.rb +47 -21
  31. data/lib/openai/models/responses/compacted_response.rb +3 -3
  32. data/lib/openai/models/responses/response_compact_params.rb +0 -18
  33. data/lib/openai/models.rb +0 -32
  34. data/lib/openai/providers/vertex.rb +9 -6
  35. data/lib/openai/resources/batches.rb +2 -6
  36. data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
  37. data/lib/openai/resources/beta/agents/sessions.rb +15 -3
  38. data/lib/openai/resources/beta.rb +0 -10
  39. data/lib/openai/resources/chat/completions.rb +8 -6
  40. data/lib/openai/resources/completions.rb +4 -2
  41. data/lib/openai/version.rb +1 -1
  42. data/lib/openai.rb +1 -114
  43. data/rbi/openai/client.rbi +0 -3
  44. data/rbi/openai/models/batch_create_params.rbi +6 -19
  45. data/rbi/openai/models/beta/agent_session.rbi +66 -0
  46. data/rbi/openai/models/beta/agent_session_budget_reached_event.rbi +83 -0
  47. data/rbi/openai/models/beta/agent_session_event.rbi +1 -0
  48. data/rbi/openai/models/beta/agents/session_create_params.rbi +56 -0
  49. data/rbi/openai/models/beta/agents/session_update_params.rbi +56 -0
  50. data/rbi/openai/models/beta/beta_compacted_response.rbi +22 -20
  51. data/rbi/openai/models/beta/beta_response.rbi +0 -3
  52. data/rbi/openai/models/beta/beta_responses_client_event.rbi +0 -12
  53. data/rbi/openai/models/beta/response_compact_params.rbi +0 -9
  54. data/rbi/openai/models/beta/response_create_params.rbi +0 -6
  55. data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
  56. data/rbi/openai/models/chat/completion_create_params.rbi +8 -6
  57. data/rbi/openai/models/chat_model.rbi +0 -3
  58. data/rbi/openai/models/completion_create_params.rbi +4 -2
  59. data/rbi/openai/models/graders/multi_grader.rbi +32 -27
  60. data/rbi/openai/models/image_edit_completed_event.rbi +11 -8
  61. data/rbi/openai/models/image_edit_partial_image_event.rbi +11 -8
  62. data/rbi/openai/models/image_gen_completed_event.rbi +11 -8
  63. data/rbi/openai/models/image_gen_partial_image_event.rbi +11 -8
  64. data/rbi/openai/models/images_response.rbi +6 -6
  65. data/rbi/openai/models/live/responses_delegation_config.rbi +54 -30
  66. data/rbi/openai/models/live/responses_delegation_update_config.rbi +54 -30
  67. data/rbi/openai/models/responses/compacted_response.rbi +19 -17
  68. data/rbi/openai/models/responses/response_compact_params.rbi +0 -12
  69. data/rbi/openai/models.rbi +0 -32
  70. data/rbi/openai/resources/batches.rbi +2 -6
  71. data/rbi/openai/resources/beta/agents/sessions.rbi +12 -0
  72. data/rbi/openai/resources/beta.rbi +0 -8
  73. data/rbi/openai/resources/chat/completions.rbi +8 -6
  74. data/rbi/openai/resources/completions.rbi +4 -2
  75. data/sig/openai/client.rbs +0 -2
  76. data/sig/openai/models/batch_create_params.rbs +4 -14
  77. data/sig/openai/models/beta/agent_session.rbs +33 -1
  78. data/sig/openai/models/beta/agent_session_budget_reached_event.rbs +52 -0
  79. data/sig/openai/models/beta/agent_session_event.rbs +1 -0
  80. data/sig/openai/models/beta/agents/session_create_params.rbs +23 -0
  81. data/sig/openai/models/beta/agents/session_update_params.rbs +23 -0
  82. data/sig/openai/models/beta/beta_compacted_response.rbs +4 -4
  83. data/sig/openai/models/beta/beta_response.rbs +0 -6
  84. data/sig/openai/models/beta/beta_responses_client_event.rbs +0 -6
  85. data/sig/openai/models/beta/response_compact_params.rbs +0 -6
  86. data/sig/openai/models/beta/response_create_params.rbs +0 -6
  87. data/sig/openai/models/beta/session_turn_error.rbs +4 -0
  88. data/sig/openai/models/chat/completion_create_params.rbs +8 -6
  89. data/sig/openai/models/chat_model.rbs +0 -6
  90. data/sig/openai/models/completion_create_params.rbs +4 -2
  91. data/sig/openai/models/graders/multi_grader.rbs +7 -12
  92. data/sig/openai/models/image_edit_completed_event.rbs +11 -9
  93. data/sig/openai/models/image_edit_partial_image_event.rbs +11 -9
  94. data/sig/openai/models/image_gen_completed_event.rbs +11 -9
  95. data/sig/openai/models/image_gen_partial_image_event.rbs +11 -9
  96. data/sig/openai/models/images_response.rbs +5 -7
  97. data/sig/openai/models/live/responses_delegation_config.rbs +50 -18
  98. data/sig/openai/models/live/responses_delegation_update_config.rbs +50 -18
  99. data/sig/openai/models/responses/compacted_response.rbs +4 -4
  100. data/sig/openai/models/responses/response_compact_params.rbs +0 -6
  101. data/sig/openai/models.rbs +0 -32
  102. data/sig/openai/resources/beta/agents/sessions.rbs +3 -0
  103. data/sig/openai/resources/beta.rbs +0 -4
  104. metadata +4 -343
  105. data/lib/openai/models/beta/assistant.rb +0 -270
  106. data/lib/openai/models/beta/assistant_create_params.rb +0 -448
  107. data/lib/openai/models/beta/assistant_delete_params.rb +0 -22
  108. data/lib/openai/models/beta/assistant_deleted.rb +0 -30
  109. data/lib/openai/models/beta/assistant_list_params.rb +0 -80
  110. data/lib/openai/models/beta/assistant_response_format_option.rb +0 -50
  111. data/lib/openai/models/beta/assistant_retrieve_params.rb +0 -22
  112. data/lib/openai/models/beta/assistant_stream_event.rb +0 -688
  113. data/lib/openai/models/beta/assistant_tool.rb +0 -22
  114. data/lib/openai/models/beta/assistant_tool_choice.rb +0 -43
  115. data/lib/openai/models/beta/assistant_tool_choice_function.rb +0 -19
  116. data/lib/openai/models/beta/assistant_tool_choice_option.rb +0 -42
  117. data/lib/openai/models/beta/assistant_update_params.rb +0 -450
  118. data/lib/openai/models/beta/code_interpreter_tool.rb +0 -19
  119. data/lib/openai/models/beta/file_search_tool.rb +0 -123
  120. data/lib/openai/models/beta/function_tool.rb +0 -26
  121. data/lib/openai/models/beta/message_stream_event.rb +0 -159
  122. data/lib/openai/models/beta/run_step_stream_event.rb +0 -201
  123. data/lib/openai/models/beta/run_stream_event.rb +0 -288
  124. data/lib/openai/models/beta/thread.rb +0 -133
  125. data/lib/openai/models/beta/thread_create_and_run_params.rb +0 -857
  126. data/lib/openai/models/beta/thread_create_params.rb +0 -443
  127. data/lib/openai/models/beta/thread_delete_params.rb +0 -22
  128. data/lib/openai/models/beta/thread_deleted.rb +0 -30
  129. data/lib/openai/models/beta/thread_retrieve_params.rb +0 -22
  130. data/lib/openai/models/beta/thread_stream_event.rb +0 -41
  131. data/lib/openai/models/beta/thread_update_params.rb +0 -114
  132. data/lib/openai/models/beta/threads/annotation.rb +0 -27
  133. data/lib/openai/models/beta/threads/annotation_delta.rb +0 -27
  134. data/lib/openai/models/beta/threads/file_citation_annotation.rb +0 -68
  135. data/lib/openai/models/beta/threads/file_citation_delta_annotation.rb +0 -86
  136. data/lib/openai/models/beta/threads/file_path_annotation.rb +0 -67
  137. data/lib/openai/models/beta/threads/file_path_delta_annotation.rb +0 -76
  138. data/lib/openai/models/beta/threads/image_file.rb +0 -51
  139. data/lib/openai/models/beta/threads/image_file_content_block.rb +0 -32
  140. data/lib/openai/models/beta/threads/image_file_delta.rb +0 -51
  141. data/lib/openai/models/beta/threads/image_file_delta_block.rb +0 -41
  142. data/lib/openai/models/beta/threads/image_url.rb +0 -49
  143. data/lib/openai/models/beta/threads/image_url_content_block.rb +0 -30
  144. data/lib/openai/models/beta/threads/image_url_delta.rb +0 -49
  145. data/lib/openai/models/beta/threads/image_url_delta_block.rb +0 -39
  146. data/lib/openai/models/beta/threads/message.rb +0 -272
  147. data/lib/openai/models/beta/threads/message_content.rb +0 -33
  148. data/lib/openai/models/beta/threads/message_content_delta.rb +0 -33
  149. data/lib/openai/models/beta/threads/message_content_part_param.rb +0 -30
  150. data/lib/openai/models/beta/threads/message_create_params.rb +0 -172
  151. data/lib/openai/models/beta/threads/message_delete_params.rb +0 -30
  152. data/lib/openai/models/beta/threads/message_deleted.rb +0 -32
  153. data/lib/openai/models/beta/threads/message_delta.rb +0 -48
  154. data/lib/openai/models/beta/threads/message_delta_event.rb +0 -42
  155. data/lib/openai/models/beta/threads/message_list_params.rb +0 -98
  156. data/lib/openai/models/beta/threads/message_retrieve_params.rb +0 -30
  157. data/lib/openai/models/beta/threads/message_update_params.rb +0 -51
  158. data/lib/openai/models/beta/threads/refusal_content_block.rb +0 -30
  159. data/lib/openai/models/beta/threads/refusal_delta_block.rb +0 -39
  160. data/lib/openai/models/beta/threads/required_action_function_tool_call.rb +0 -73
  161. data/lib/openai/models/beta/threads/run.rb +0 -557
  162. data/lib/openai/models/beta/threads/run_cancel_params.rb +0 -30
  163. data/lib/openai/models/beta/threads/run_create_params.rb +0 -565
  164. data/lib/openai/models/beta/threads/run_list_params.rb +0 -89
  165. data/lib/openai/models/beta/threads/run_retrieve_params.rb +0 -30
  166. data/lib/openai/models/beta/threads/run_status.rb +0 -29
  167. data/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +0 -69
  168. data/lib/openai/models/beta/threads/run_update_params.rb +0 -51
  169. data/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb +0 -43
  170. data/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb +0 -54
  171. data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +0 -161
  172. data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +0 -107
  173. data/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +0 -207
  174. data/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb +0 -52
  175. data/lib/openai/models/beta/threads/runs/function_tool_call.rb +0 -78
  176. data/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb +0 -87
  177. data/lib/openai/models/beta/threads/runs/message_creation_step_details.rb +0 -48
  178. data/lib/openai/models/beta/threads/runs/run_step.rb +0 -311
  179. data/lib/openai/models/beta/threads/runs/run_step_delta.rb +0 -45
  180. data/lib/openai/models/beta/threads/runs/run_step_delta_event.rb +0 -46
  181. data/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +0 -47
  182. data/lib/openai/models/beta/threads/runs/run_step_include.rb +0 -22
  183. data/lib/openai/models/beta/threads/runs/step_list_params.rb +0 -122
  184. data/lib/openai/models/beta/threads/runs/step_retrieve_params.rb +0 -65
  185. data/lib/openai/models/beta/threads/runs/tool_call.rb +0 -28
  186. data/lib/openai/models/beta/threads/runs/tool_call_delta.rb +0 -28
  187. data/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb +0 -41
  188. data/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +0 -38
  189. data/lib/openai/models/beta/threads/text.rb +0 -28
  190. data/lib/openai/models/beta/threads/text_content_block.rb +0 -30
  191. data/lib/openai/models/beta/threads/text_content_block_param.rb +0 -32
  192. data/lib/openai/models/beta/threads/text_delta.rb +0 -31
  193. data/lib/openai/models/beta/threads/text_delta_block.rb +0 -39
  194. data/lib/openai/models/image_input_reference_param.rb +0 -24
  195. data/lib/openai/models/video.rb +0 -161
  196. data/lib/openai/models/video_create_character_params.rb +0 -40
  197. data/lib/openai/models/video_create_character_response.rb +0 -36
  198. data/lib/openai/models/video_create_error.rb +0 -166
  199. data/lib/openai/models/video_create_params.rb +0 -85
  200. data/lib/openai/models/video_delete_params.rb +0 -20
  201. data/lib/openai/models/video_delete_response.rb +0 -38
  202. data/lib/openai/models/video_download_content_params.rb +0 -42
  203. data/lib/openai/models/video_edit_params.rb +0 -68
  204. data/lib/openai/models/video_extend_params.rb +0 -79
  205. data/lib/openai/models/video_get_character_params.rb +0 -20
  206. data/lib/openai/models/video_get_character_response.rb +0 -36
  207. data/lib/openai/models/video_list_params.rb +0 -55
  208. data/lib/openai/models/video_model.rb +0 -38
  209. data/lib/openai/models/video_remix_params.rb +0 -30
  210. data/lib/openai/models/video_retrieve_params.rb +0 -20
  211. data/lib/openai/models/video_seconds.rb +0 -16
  212. data/lib/openai/models/video_size.rb +0 -17
  213. data/lib/openai/resources/beta/assistants.rb +0 -320
  214. data/lib/openai/resources/beta/threads/messages.rb +0 -236
  215. data/lib/openai/resources/beta/threads/runs/steps.rb +0 -141
  216. data/lib/openai/resources/beta/threads/runs.rb +0 -623
  217. data/lib/openai/resources/beta/threads.rb +0 -444
  218. data/lib/openai/resources/videos.rb +0 -354
  219. data/rbi/openai/models/beta/assistant.rbi +0 -411
  220. data/rbi/openai/models/beta/assistant_create_params.rbi +0 -776
  221. data/rbi/openai/models/beta/assistant_delete_params.rbi +0 -53
  222. data/rbi/openai/models/beta/assistant_deleted.rbi +0 -60
  223. data/rbi/openai/models/beta/assistant_list_params.rbi +0 -132
  224. data/rbi/openai/models/beta/assistant_response_format_option.rbi +0 -49
  225. data/rbi/openai/models/beta/assistant_retrieve_params.rbi +0 -53
  226. data/rbi/openai/models/beta/assistant_stream_event.rbi +0 -1277
  227. data/rbi/openai/models/beta/assistant_tool.rbi +0 -28
  228. data/rbi/openai/models/beta/assistant_tool_choice.rbi +0 -79
  229. data/rbi/openai/models/beta/assistant_tool_choice_function.rbi +0 -49
  230. data/rbi/openai/models/beta/assistant_tool_choice_option.rbi +0 -53
  231. data/rbi/openai/models/beta/assistant_update_params.rbi +0 -556
  232. data/rbi/openai/models/beta/code_interpreter_tool.rbi +0 -49
  233. data/rbi/openai/models/beta/file_search_tool.rbi +0 -223
  234. data/rbi/openai/models/beta/function_tool.rbi +0 -59
  235. data/rbi/openai/models/beta/message_stream_event.rbi +0 -288
  236. data/rbi/openai/models/beta/run_step_stream_event.rbi +0 -378
  237. data/rbi/openai/models/beta/run_stream_event.rbi +0 -537
  238. data/rbi/openai/models/beta/thread.rbi +0 -255
  239. data/rbi/openai/models/beta/thread_create_and_run_params.rbi +0 -1461
  240. data/rbi/openai/models/beta/thread_create_params.rbi +0 -823
  241. data/rbi/openai/models/beta/thread_delete_params.rbi +0 -53
  242. data/rbi/openai/models/beta/thread_deleted.rbi +0 -60
  243. data/rbi/openai/models/beta/thread_retrieve_params.rbi +0 -53
  244. data/rbi/openai/models/beta/thread_stream_event.rbi +0 -75
  245. data/rbi/openai/models/beta/thread_update_params.rbi +0 -240
  246. data/rbi/openai/models/beta/threads/annotation.rbi +0 -34
  247. data/rbi/openai/models/beta/threads/annotation_delta.rbi +0 -34
  248. data/rbi/openai/models/beta/threads/file_citation_annotation.rbi +0 -132
  249. data/rbi/openai/models/beta/threads/file_citation_delta_annotation.rbi +0 -166
  250. data/rbi/openai/models/beta/threads/file_path_annotation.rbi +0 -131
  251. data/rbi/openai/models/beta/threads/file_path_delta_annotation.rbi +0 -153
  252. data/rbi/openai/models/beta/threads/image_file.rbi +0 -88
  253. data/rbi/openai/models/beta/threads/image_file_content_block.rbi +0 -66
  254. data/rbi/openai/models/beta/threads/image_file_delta.rbi +0 -91
  255. data/rbi/openai/models/beta/threads/image_file_delta_block.rbi +0 -75
  256. data/rbi/openai/models/beta/threads/image_url.rbi +0 -86
  257. data/rbi/openai/models/beta/threads/image_url_content_block.rbi +0 -64
  258. data/rbi/openai/models/beta/threads/image_url_delta.rbi +0 -89
  259. data/rbi/openai/models/beta/threads/image_url_delta_block.rbi +0 -73
  260. data/rbi/openai/models/beta/threads/message.rbi +0 -433
  261. data/rbi/openai/models/beta/threads/message_content.rbi +0 -36
  262. data/rbi/openai/models/beta/threads/message_content_delta.rbi +0 -36
  263. data/rbi/openai/models/beta/threads/message_content_part_param.rbi +0 -35
  264. data/rbi/openai/models/beta/threads/message_create_params.rbi +0 -299
  265. data/rbi/openai/models/beta/threads/message_delete_params.rbi +0 -64
  266. data/rbi/openai/models/beta/threads/message_deleted.rbi +0 -64
  267. data/rbi/openai/models/beta/threads/message_delta.rbi +0 -106
  268. data/rbi/openai/models/beta/threads/message_delta_event.rbi +0 -76
  269. data/rbi/openai/models/beta/threads/message_list_params.rbi +0 -157
  270. data/rbi/openai/models/beta/threads/message_retrieve_params.rbi +0 -64
  271. data/rbi/openai/models/beta/threads/message_update_params.rbi +0 -88
  272. data/rbi/openai/models/beta/threads/refusal_content_block.rbi +0 -61
  273. data/rbi/openai/models/beta/threads/refusal_delta_block.rbi +0 -73
  274. data/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi +0 -130
  275. data/rbi/openai/models/beta/threads/run.rbi +0 -803
  276. data/rbi/openai/models/beta/threads/run_cancel_params.rbi +0 -64
  277. data/rbi/openai/models/beta/threads/run_create_params.rbi +0 -825
  278. data/rbi/openai/models/beta/threads/run_list_params.rbi +0 -144
  279. data/rbi/openai/models/beta/threads/run_retrieve_params.rbi +0 -64
  280. data/rbi/openai/models/beta/threads/run_status.rbi +0 -39
  281. data/rbi/openai/models/beta/threads/run_submit_tool_outputs_params.rbi +0 -132
  282. data/rbi/openai/models/beta/threads/run_update_params.rbi +0 -88
  283. data/rbi/openai/models/beta/threads/runs/code_interpreter_logs.rbi +0 -79
  284. data/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi +0 -118
  285. data/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi +0 -315
  286. data/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbi +0 -210
  287. data/rbi/openai/models/beta/threads/runs/file_search_tool_call.rbi +0 -409
  288. data/rbi/openai/models/beta/threads/runs/file_search_tool_call_delta.rbi +0 -89
  289. data/rbi/openai/models/beta/threads/runs/function_tool_call.rbi +0 -138
  290. data/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi +0 -161
  291. data/rbi/openai/models/beta/threads/runs/message_creation_step_details.rbi +0 -111
  292. data/rbi/openai/models/beta/threads/runs/run_step.rbi +0 -422
  293. data/rbi/openai/models/beta/threads/runs/run_step_delta.rbi +0 -91
  294. data/rbi/openai/models/beta/threads/runs/run_step_delta_event.rbi +0 -82
  295. data/rbi/openai/models/beta/threads/runs/run_step_delta_message_delta.rbi +0 -113
  296. data/rbi/openai/models/beta/threads/runs/run_step_include.rbi +0 -37
  297. data/rbi/openai/models/beta/threads/runs/step_list_params.rbi +0 -181
  298. data/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi +0 -105
  299. data/rbi/openai/models/beta/threads/runs/tool_call.rbi +0 -37
  300. data/rbi/openai/models/beta/threads/runs/tool_call_delta.rbi +0 -37
  301. data/rbi/openai/models/beta/threads/runs/tool_call_delta_object.rbi +0 -91
  302. data/rbi/openai/models/beta/threads/runs/tool_calls_step_details.rbi +0 -77
  303. data/rbi/openai/models/beta/threads/text.rbi +0 -65
  304. data/rbi/openai/models/beta/threads/text_content_block.rbi +0 -64
  305. data/rbi/openai/models/beta/threads/text_content_block_param.rbi +0 -63
  306. data/rbi/openai/models/beta/threads/text_delta.rbi +0 -81
  307. data/rbi/openai/models/beta/threads/text_delta_block.rbi +0 -73
  308. data/rbi/openai/models/image_input_reference_param.rbi +0 -58
  309. data/rbi/openai/models/video.rbi +0 -203
  310. data/rbi/openai/models/video_create_character_params.rbi +0 -68
  311. data/rbi/openai/models/video_create_character_response.rbi +0 -63
  312. data/rbi/openai/models/video_create_error.rbi +0 -255
  313. data/rbi/openai/models/video_create_params.rbi +0 -132
  314. data/rbi/openai/models/video_delete_params.rbi +0 -49
  315. data/rbi/openai/models/video_delete_response.rbi +0 -64
  316. data/rbi/openai/models/video_download_content_params.rbi +0 -81
  317. data/rbi/openai/models/video_edit_params.rbi +0 -122
  318. data/rbi/openai/models/video_extend_params.rbi +0 -134
  319. data/rbi/openai/models/video_get_character_params.rbi +0 -49
  320. data/rbi/openai/models/video_get_character_response.rbi +0 -63
  321. data/rbi/openai/models/video_list_params.rbi +0 -101
  322. data/rbi/openai/models/video_model.rbi +0 -35
  323. data/rbi/openai/models/video_remix_params.rbi +0 -58
  324. data/rbi/openai/models/video_retrieve_params.rbi +0 -49
  325. data/rbi/openai/models/video_seconds.rbi +0 -22
  326. data/rbi/openai/models/video_size.rbi +0 -23
  327. data/rbi/openai/resources/beta/assistants.rbi +0 -285
  328. data/rbi/openai/resources/beta/threads/messages.rbi +0 -161
  329. data/rbi/openai/resources/beta/threads/runs/steps.rbi +0 -107
  330. data/rbi/openai/resources/beta/threads/runs.rbi +0 -527
  331. data/rbi/openai/resources/beta/threads.rbi +0 -391
  332. data/rbi/openai/resources/videos.rbi +0 -205
  333. data/sig/openai/models/beta/assistant.rbs +0 -278
  334. data/sig/openai/models/beta/assistant_create_params.rbs +0 -485
  335. data/sig/openai/models/beta/assistant_delete_params.rbs +0 -25
  336. data/sig/openai/models/beta/assistant_deleted.rbs +0 -28
  337. data/sig/openai/models/beta/assistant_list_params.rbs +0 -104
  338. data/sig/openai/models/beta/assistant_response_format_option.rbs +0 -17
  339. data/sig/openai/models/beta/assistant_retrieve_params.rbs +0 -25
  340. data/sig/openai/models/beta/assistant_stream_event.rbs +0 -645
  341. data/sig/openai/models/beta/assistant_tool.rbs +0 -16
  342. data/sig/openai/models/beta/assistant_tool_choice.rbs +0 -46
  343. data/sig/openai/models/beta/assistant_tool_choice_function.rbs +0 -18
  344. data/sig/openai/models/beta/assistant_tool_choice_option.rbs +0 -27
  345. data/sig/openai/models/beta/assistant_update_params.rbs +0 -396
  346. data/sig/openai/models/beta/code_interpreter_tool.rbs +0 -18
  347. data/sig/openai/models/beta/file_search_tool.rbs +0 -159
  348. data/sig/openai/models/beta/function_tool.rbs +0 -27
  349. data/sig/openai/models/beta/message_stream_event.rbs +0 -153
  350. data/sig/openai/models/beta/run_step_stream_event.rbs +0 -197
  351. data/sig/openai/models/beta/run_stream_event.rbs +0 -269
  352. data/sig/openai/models/beta/thread.rbs +0 -150
  353. data/sig/openai/models/beta/thread_create_and_run_params.rbs +0 -885
  354. data/sig/openai/models/beta/thread_create_params.rbs +0 -492
  355. data/sig/openai/models/beta/thread_delete_params.rbs +0 -25
  356. data/sig/openai/models/beta/thread_deleted.rbs +0 -28
  357. data/sig/openai/models/beta/thread_retrieve_params.rbs +0 -25
  358. data/sig/openai/models/beta/thread_stream_event.rbs +0 -43
  359. data/sig/openai/models/beta/thread_update_params.rbs +0 -137
  360. data/sig/openai/models/beta/threads/annotation.rbs +0 -17
  361. data/sig/openai/models/beta/threads/annotation_delta.rbs +0 -17
  362. data/sig/openai/models/beta/threads/file_citation_annotation.rbs +0 -63
  363. data/sig/openai/models/beta/threads/file_citation_delta_annotation.rbs +0 -93
  364. data/sig/openai/models/beta/threads/file_path_annotation.rbs +0 -63
  365. data/sig/openai/models/beta/threads/file_path_delta_annotation.rbs +0 -85
  366. data/sig/openai/models/beta/threads/image_file.rbs +0 -59
  367. data/sig/openai/models/beta/threads/image_file_content_block.rbs +0 -29
  368. data/sig/openai/models/beta/threads/image_file_delta.rbs +0 -64
  369. data/sig/openai/models/beta/threads/image_file_delta_block.rbs +0 -44
  370. data/sig/openai/models/beta/threads/image_url.rbs +0 -57
  371. data/sig/openai/models/beta/threads/image_url_content_block.rbs +0 -29
  372. data/sig/openai/models/beta/threads/image_url_delta.rbs +0 -61
  373. data/sig/openai/models/beta/threads/image_url_delta_block.rbs +0 -44
  374. data/sig/openai/models/beta/threads/message.rbs +0 -275
  375. data/sig/openai/models/beta/threads/message_content.rbs +0 -19
  376. data/sig/openai/models/beta/threads/message_content_delta.rbs +0 -19
  377. data/sig/openai/models/beta/threads/message_content_part_param.rbs +0 -18
  378. data/sig/openai/models/beta/threads/message_create_params.rbs +0 -167
  379. data/sig/openai/models/beta/threads/message_delete_params.rbs +0 -35
  380. data/sig/openai/models/beta/threads/message_deleted.rbs +0 -30
  381. data/sig/openai/models/beta/threads/message_delta.rbs +0 -56
  382. data/sig/openai/models/beta/threads/message_delta_event.rbs +0 -43
  383. data/sig/openai/models/beta/threads/message_list_params.rbs +0 -122
  384. data/sig/openai/models/beta/threads/message_retrieve_params.rbs +0 -35
  385. data/sig/openai/models/beta/threads/message_update_params.rbs +0 -53
  386. data/sig/openai/models/beta/threads/refusal_content_block.rbs +0 -22
  387. data/sig/openai/models/beta/threads/refusal_delta_block.rbs +0 -34
  388. data/sig/openai/models/beta/threads/required_action_function_tool_call.rbs +0 -69
  389. data/sig/openai/models/beta/threads/run.rbs +0 -545
  390. data/sig/openai/models/beta/threads/run_cancel_params.rbs +0 -35
  391. data/sig/openai/models/beta/threads/run_create_params.rbs +0 -524
  392. data/sig/openai/models/beta/threads/run_list_params.rbs +0 -111
  393. data/sig/openai/models/beta/threads/run_retrieve_params.rbs +0 -35
  394. data/sig/openai/models/beta/threads/run_status.rbs +0 -34
  395. data/sig/openai/models/beta/threads/run_submit_tool_outputs_params.rbs +0 -70
  396. data/sig/openai/models/beta/threads/run_update_params.rbs +0 -53
  397. data/sig/openai/models/beta/threads/runs/code_interpreter_logs.rbs +0 -40
  398. data/sig/openai/models/beta/threads/runs/code_interpreter_output_image.rbs +0 -65
  399. data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call.rbs +0 -147
  400. data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbs +0 -115
  401. data/sig/openai/models/beta/threads/runs/file_search_tool_call.rbs +0 -228
  402. data/sig/openai/models/beta/threads/runs/file_search_tool_call_delta.rbs +0 -58
  403. data/sig/openai/models/beta/threads/runs/function_tool_call.rbs +0 -80
  404. data/sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs +0 -103
  405. data/sig/openai/models/beta/threads/runs/message_creation_step_details.rbs +0 -47
  406. data/sig/openai/models/beta/threads/runs/run_step.rbs +0 -290
  407. data/sig/openai/models/beta/threads/runs/run_step_delta.rbs +0 -46
  408. data/sig/openai/models/beta/threads/runs/run_step_delta_event.rbs +0 -47
  409. data/sig/openai/models/beta/threads/runs/run_step_delta_message_delta.rbs +0 -56
  410. data/sig/openai/models/beta/threads/runs/run_step_include.rbs +0 -22
  411. data/sig/openai/models/beta/threads/runs/step_list_params.rbs +0 -149
  412. data/sig/openai/models/beta/threads/runs/step_retrieve_params.rbs +0 -73
  413. data/sig/openai/models/beta/threads/runs/tool_call.rbs +0 -20
  414. data/sig/openai/models/beta/threads/runs/tool_call_delta.rbs +0 -20
  415. data/sig/openai/models/beta/threads/runs/tool_call_delta_object.rbs +0 -48
  416. data/sig/openai/models/beta/threads/runs/tool_calls_step_details.rbs +0 -41
  417. data/sig/openai/models/beta/threads/text.rbs +0 -32
  418. data/sig/openai/models/beta/threads/text_content_block.rbs +0 -26
  419. data/sig/openai/models/beta/threads/text_content_block_param.rbs +0 -25
  420. data/sig/openai/models/beta/threads/text_delta.rbs +0 -39
  421. data/sig/openai/models/beta/threads/text_delta_block.rbs +0 -44
  422. data/sig/openai/models/image_input_reference_param.rbs +0 -23
  423. data/sig/openai/models/video.rbs +0 -142
  424. data/sig/openai/models/video_create_character_params.rbs +0 -45
  425. data/sig/openai/models/video_create_character_response.rbs +0 -27
  426. data/sig/openai/models/video_create_error.rbs +0 -163
  427. data/sig/openai/models/video_create_params.rbs +0 -104
  428. data/sig/openai/models/video_delete_params.rbs +0 -23
  429. data/sig/openai/models/video_delete_response.rbs +0 -31
  430. data/sig/openai/models/video_download_content_params.rbs +0 -51
  431. data/sig/openai/models/video_edit_params.rbs +0 -77
  432. data/sig/openai/models/video_extend_params.rbs +0 -87
  433. data/sig/openai/models/video_get_character_params.rbs +0 -23
  434. data/sig/openai/models/video_get_character_response.rbs +0 -27
  435. data/sig/openai/models/video_list_params.rbs +0 -70
  436. data/sig/openai/models/video_model.rbs +0 -23
  437. data/sig/openai/models/video_remix_params.rbs +0 -34
  438. data/sig/openai/models/video_retrieve_params.rbs +0 -23
  439. data/sig/openai/models/video_seconds.rbs +0 -15
  440. data/sig/openai/models/video_size.rbs +0 -16
  441. data/sig/openai/resources/beta/assistants.rbs +0 -58
  442. data/sig/openai/resources/beta/threads/messages.rbs +0 -49
  443. data/sig/openai/resources/beta/threads/runs/steps.rbs +0 -32
  444. data/sig/openai/resources/beta/threads/runs.rbs +0 -99
  445. data/sig/openai/resources/beta/threads.rbs +0 -75
  446. data/sig/openai/resources/videos.rbs +0 -69
@@ -1,885 +0,0 @@
1
- module OpenAI
2
- module Models
3
- module Beta
4
- type thread_create_and_run_params =
5
- {
6
- assistant_id: String,
7
- ?instructions: String?,
8
- ?max_completion_tokens: Integer?,
9
- ?max_prompt_tokens: Integer?,
10
- ?metadata: OpenAI::Models::metadata?,
11
- ?model: OpenAI::Models::Beta::ThreadCreateAndRunParams::model?,
12
- ?parallel_tool_calls: bool,
13
- ?response_format: OpenAI::Models::Beta::assistant_response_format_option?,
14
- ?temperature: Float?,
15
- ?thread: OpenAI::Beta::ThreadCreateAndRunParams::Thread,
16
- ?tool_choice: OpenAI::Models::Beta::assistant_tool_choice_option?,
17
- ?tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources?,
18
- ?tools: ::Array[OpenAI::Models::Beta::assistant_tool]?,
19
- ?top_p: Float?,
20
- ?truncation_strategy: OpenAI::Beta::ThreadCreateAndRunParams::TruncationStrategy?,
21
- ?request_options: OpenAI::request_opts
22
- }
23
-
24
- class ThreadCreateAndRunParams < OpenAI::Internal::Type::BaseModel
25
- extend OpenAI::Internal::Type::RequestParameters::Converter
26
- include OpenAI::Internal::Type::RequestParameters
27
-
28
- # The ID of the
29
- # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use
30
- # to execute this run.
31
- attr_accessor assistant_id: String
32
-
33
- # Override the default system message of the assistant. This is useful for
34
- # modifying the behavior on a per-run basis.
35
- attr_accessor instructions: String?
36
-
37
- # The maximum number of completion tokens that may be used over the course of the
38
- # run. The run will make a best effort to use only the number of completion tokens
39
- # specified, across multiple turns of the run. If the run exceeds the number of
40
- # completion tokens specified, the run will end with status `incomplete`. See
41
- # `incomplete_details` for more info.
42
- attr_accessor max_completion_tokens: Integer?
43
-
44
- # The maximum number of prompt tokens that may be used over the course of the run.
45
- # The run will make a best effort to use only the number of prompt tokens
46
- # specified, across multiple turns of the run. If the run exceeds the number of
47
- # prompt tokens specified, the run will end with status `incomplete`. See
48
- # `incomplete_details` for more info.
49
- attr_accessor max_prompt_tokens: Integer?
50
-
51
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
52
- # for storing additional information about the object in a structured format, and
53
- # querying for objects via API or the dashboard.
54
- #
55
- # Keys are strings with a maximum length of 64 characters. Values are strings with
56
- # a maximum length of 512 characters.
57
- attr_accessor metadata: OpenAI::Models::metadata?
58
-
59
- # The ID of the
60
- # [Model](https://developers.openai.com/api/reference/resources/models) to be used
61
- # to execute this run. If a value is provided here, it will override the model
62
- # associated with the assistant. If not, the model associated with the assistant
63
- # will be used.
64
- attr_accessor model: OpenAI::Models::Beta::ThreadCreateAndRunParams::model?
65
-
66
- # Whether to enable
67
- # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
68
- # during tool use.
69
- attr_reader parallel_tool_calls: bool?
70
-
71
- # Whether to enable
72
- # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
73
- # during tool use.
74
- def parallel_tool_calls=: (bool) -> bool
75
-
76
- # Specifies the format that the model must output. Compatible with
77
- # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
78
- # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
79
- # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
80
- #
81
- # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
82
- # Outputs which ensures the model will match your supplied JSON schema. Learn more
83
- # in the
84
- # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
85
- #
86
- # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
87
- # message the model generates is valid JSON.
88
- #
89
- # **Important:** when using JSON mode, you **must** also instruct the model to
90
- # produce JSON yourself via a system or user message. Without this, the model may
91
- # generate an unending stream of whitespace until the generation reaches the token
92
- # limit, resulting in a long-running and seemingly "stuck" request. Also note that
93
- # the message content may be partially cut off if `finish_reason="length"`, which
94
- # indicates the generation exceeded `max_tokens` or the conversation exceeded the
95
- # max context length.
96
- attr_accessor response_format: OpenAI::Models::Beta::assistant_response_format_option?
97
-
98
- # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
99
- # make the output more random, while lower values like 0.2 will make it more
100
- # focused and deterministic.
101
- attr_accessor temperature: Float?
102
-
103
- # Options to create a new thread. If no thread is provided when running a request,
104
- # an empty thread will be created.
105
- attr_reader thread: OpenAI::Beta::ThreadCreateAndRunParams::Thread?
106
-
107
- # Options to create a new thread. If no thread is provided when running a request,
108
- # an empty thread will be created.
109
- def thread=: (
110
- OpenAI::Beta::ThreadCreateAndRunParams::Thread
111
- ) -> OpenAI::Beta::ThreadCreateAndRunParams::Thread
112
-
113
- # Controls which (if any) tool is called by the model. `none` means the model will
114
- # not call any tools and instead generates a message. `auto` is the default value
115
- # and means the model can pick between generating a message or calling one or more
116
- # tools. `required` means the model must call one or more tools before responding
117
- # to the user. Specifying a particular tool like `{"type": "file_search"}` or
118
- # `{"type": "function", "function": {"name": "my_function"}}` forces the model to
119
- # call that tool.
120
- attr_accessor tool_choice: OpenAI::Models::Beta::assistant_tool_choice_option?
121
-
122
- # A set of resources that are used by the assistant's tools. The resources are
123
- # specific to the type of tool. For example, the `code_interpreter` tool requires
124
- # a list of file IDs, while the `file_search` tool requires a list of vector store
125
- # IDs.
126
- attr_accessor tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources?
127
-
128
- # Override the tools the assistant can use for this run. This is useful for
129
- # modifying the behavior on a per-run basis.
130
- attr_accessor tools: ::Array[OpenAI::Models::Beta::assistant_tool]?
131
-
132
- # An alternative to sampling with temperature, called nucleus sampling, where the
133
- # model considers the results of the tokens with top_p probability mass. So 0.1
134
- # means only the tokens comprising the top 10% probability mass are considered.
135
- #
136
- # We generally recommend altering this or temperature but not both.
137
- attr_accessor top_p: Float?
138
-
139
- # Controls for how a thread will be truncated prior to the run. Use this to
140
- # control the initial context window of the run.
141
- attr_accessor truncation_strategy: OpenAI::Beta::ThreadCreateAndRunParams::TruncationStrategy?
142
-
143
- # @param assistant_id
144
- # The ID of the
145
- # [assistant](https://developers.openai.com/api/docs/assistants/migration) to use
146
- # to execute this run.
147
- # @param instructions
148
- # Override the default system message of the assistant. This is useful for
149
- # modifying the behavior on a per-run basis.
150
- # @param max_completion_tokens
151
- # The maximum number of completion tokens that may be used over the course of the
152
- # run. The run will make a best effort to use only the number of completion tokens
153
- # specified, across multiple turns of the run. If the run exceeds the number of
154
- # completion tokens specified, the run will end with status `incomplete`. See
155
- # `incomplete_details` for more info.
156
- # @param max_prompt_tokens
157
- # The maximum number of prompt tokens that may be used over the course of the run.
158
- # The run will make a best effort to use only the number of prompt tokens
159
- # specified, across multiple turns of the run. If the run exceeds the number of
160
- # prompt tokens specified, the run will end with status `incomplete`. See
161
- # `incomplete_details` for more info.
162
- # @param metadata
163
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
164
- # for storing additional information about the object in a structured format, and
165
- # querying for objects via API or the dashboard.
166
- #
167
- # Keys are strings with a maximum length of 64 characters. Values are strings with
168
- # a maximum length of 512 characters.
169
- # @param model
170
- # The ID of the
171
- # [Model](https://developers.openai.com/api/reference/resources/models) to be used
172
- # to execute this run. If a value is provided here, it will override the model
173
- # associated with the assistant. If not, the model associated with the assistant
174
- # will be used.
175
- # @param parallel_tool_calls
176
- # Whether to enable
177
- # [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
178
- # during tool use.
179
- # @param response_format
180
- # Specifies the format that the model must output. Compatible with
181
- # [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
182
- # [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
183
- # all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
184
- #
185
- # Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
186
- # Outputs which ensures the model will match your supplied JSON schema. Learn more
187
- # in the
188
- # [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
189
- #
190
- # Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
191
- # message the model generates is valid JSON.
192
- #
193
- # **Important:** when using JSON mode, you **must** also instruct the model to
194
- # produce JSON yourself via a system or user message. Without this, the model may
195
- # generate an unending stream of whitespace until the generation reaches the token
196
- # limit, resulting in a long-running and seemingly "stuck" request. Also note that
197
- # the message content may be partially cut off if `finish_reason="length"`, which
198
- # indicates the generation exceeded `max_tokens` or the conversation exceeded the
199
- # max context length.
200
- # @param temperature
201
- # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
202
- # make the output more random, while lower values like 0.2 will make it more
203
- # focused and deterministic.
204
- # @param thread
205
- # Options to create a new thread. If no thread is provided when running a request,
206
- # an empty thread will be created.
207
- # @param tool_choice
208
- # Controls which (if any) tool is called by the model. `none` means the model will
209
- # not call any tools and instead generates a message. `auto` is the default value
210
- # and means the model can pick between generating a message or calling one or more
211
- # tools. `required` means the model must call one or more tools before responding
212
- # to the user. Specifying a particular tool like `{"type": "file_search"}` or
213
- # `{"type": "function", "function": {"name": "my_function"}}` forces the model to
214
- # call that tool.
215
- # @param tool_resources
216
- # A set of resources that are used by the assistant's tools. The resources are
217
- # specific to the type of tool. For example, the `code_interpreter` tool requires
218
- # a list of file IDs, while the `file_search` tool requires a list of vector store
219
- # IDs.
220
- # @param tools
221
- # Override the tools the assistant can use for this run. This is useful for
222
- # modifying the behavior on a per-run basis.
223
- # @param top_p
224
- # An alternative to sampling with temperature, called nucleus sampling, where the
225
- # model considers the results of the tokens with top_p probability mass. So 0.1
226
- # means only the tokens comprising the top 10% probability mass are considered.
227
- #
228
- # We generally recommend altering this or temperature but not both.
229
- # @param truncation_strategy
230
- # Controls for how a thread will be truncated prior to the run. Use this to
231
- # control the initial context window of the run.
232
- def initialize: (
233
- assistant_id: String,
234
- ?instructions: String?,
235
- ?max_completion_tokens: Integer?,
236
- ?max_prompt_tokens: Integer?,
237
- ?metadata: OpenAI::Models::metadata?,
238
- ?model: OpenAI::Models::Beta::ThreadCreateAndRunParams::model?,
239
- ?parallel_tool_calls: bool,
240
- ?response_format: OpenAI::Models::Beta::assistant_response_format_option?,
241
- ?temperature: Float?,
242
- ?thread: OpenAI::Beta::ThreadCreateAndRunParams::Thread,
243
- ?tool_choice: OpenAI::Models::Beta::assistant_tool_choice_option?,
244
- ?tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources?,
245
- ?tools: ::Array[OpenAI::Models::Beta::assistant_tool]?,
246
- ?top_p: Float?,
247
- ?truncation_strategy: OpenAI::Beta::ThreadCreateAndRunParams::TruncationStrategy?,
248
- ?request_options: OpenAI::request_opts
249
- ) -> void
250
-
251
- def to_hash: -> {
252
- assistant_id: String,
253
- ?instructions: String?,
254
- ?max_completion_tokens: Integer?,
255
- ?max_prompt_tokens: Integer?,
256
- ?metadata: OpenAI::Models::metadata?,
257
- ?model: OpenAI::Models::Beta::ThreadCreateAndRunParams::model?,
258
- ?parallel_tool_calls: bool,
259
- ?response_format: OpenAI::Models::Beta::assistant_response_format_option?,
260
- ?temperature: Float?,
261
- ?thread: OpenAI::Beta::ThreadCreateAndRunParams::Thread,
262
- ?tool_choice: OpenAI::Models::Beta::assistant_tool_choice_option?,
263
- ?tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources?,
264
- ?tools: ::Array[OpenAI::Models::Beta::assistant_tool]?,
265
- ?top_p: Float?,
266
- ?truncation_strategy: OpenAI::Beta::ThreadCreateAndRunParams::TruncationStrategy?,
267
- ?request_options: OpenAI::RequestOptions
268
- }
269
-
270
- type model = String | OpenAI::Models::chat_model
271
-
272
- module Model
273
- extend OpenAI::Internal::Type::Union
274
-
275
- def self?.variants: -> ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::model]
276
- end
277
-
278
- type thread =
279
- {
280
- ?messages: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message],
281
- ?metadata: OpenAI::Models::metadata?,
282
- ?tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources?
283
- }
284
-
285
- class Thread < OpenAI::Internal::Type::BaseModel
286
- # A list of
287
- # [messages](https://developers.openai.com/api/docs/assistants/migration) to start
288
- # the thread with.
289
- attr_reader messages: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message]?
290
-
291
- # A list of
292
- # [messages](https://developers.openai.com/api/docs/assistants/migration) to start
293
- # the thread with.
294
- def messages=: (
295
- ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message]
296
- ) -> ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message]
297
-
298
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
299
- # for storing additional information about the object in a structured format, and
300
- # querying for objects via API or the dashboard.
301
- #
302
- # Keys are strings with a maximum length of 64 characters. Values are strings with
303
- # a maximum length of 512 characters.
304
- attr_accessor metadata: OpenAI::Models::metadata?
305
-
306
- # A set of resources that are made available to the assistant's tools in this
307
- # thread. The resources are specific to the type of tool. For example, the
308
- # `code_interpreter` tool requires a list of file IDs, while the `file_search`
309
- # tool requires a list of vector store IDs.
310
- attr_accessor tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources?
311
-
312
- # @param messages
313
- # A list of
314
- # [messages](https://developers.openai.com/api/docs/assistants/migration) to start
315
- # the thread with.
316
- # @param metadata
317
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
318
- # for storing additional information about the object in a structured format, and
319
- # querying for objects via API or the dashboard.
320
- #
321
- # Keys are strings with a maximum length of 64 characters. Values are strings with
322
- # a maximum length of 512 characters.
323
- # @param tool_resources
324
- # A set of resources that are made available to the assistant's tools in this
325
- # thread. The resources are specific to the type of tool. For example, the
326
- # `code_interpreter` tool requires a list of file IDs, while the `file_search`
327
- # tool requires a list of vector store IDs.
328
- def initialize: (
329
- ?messages: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message],
330
- ?metadata: OpenAI::Models::metadata?,
331
- ?tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources?
332
- ) -> void
333
-
334
- def to_hash: -> {
335
- ?messages: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message],
336
- ?metadata: OpenAI::Models::metadata?,
337
- ?tool_resources: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources?
338
- }
339
-
340
- type message =
341
- {
342
- content: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::content,
343
- role: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::role,
344
- ?attachments: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment]?,
345
- ?metadata: OpenAI::Models::metadata?
346
- }
347
-
348
- class Message < OpenAI::Internal::Type::BaseModel
349
- # The text contents of the message.
350
- attr_accessor content: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::content
351
-
352
- # The role of the entity that is creating the message. Allowed values include:
353
- #
354
- # - `user`: Indicates the message is sent by an actual user and should be used in
355
- # most cases to represent user-generated messages.
356
- # - `assistant`: Indicates the message is generated by the assistant. Use this
357
- # value to insert messages from the assistant into the conversation.
358
- attr_accessor role: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::role
359
-
360
- # A list of files attached to the message, and the tools they should be added to.
361
- attr_accessor attachments: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment]?
362
-
363
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
364
- # for storing additional information about the object in a structured format, and
365
- # querying for objects via API or the dashboard.
366
- #
367
- # Keys are strings with a maximum length of 64 characters. Values are strings with
368
- # a maximum length of 512 characters.
369
- attr_accessor metadata: OpenAI::Models::metadata?
370
-
371
- # @param content
372
- # The text contents of the message.
373
- # @param role
374
- # The role of the entity that is creating the message. Allowed values include:
375
- #
376
- # - `user`: Indicates the message is sent by an actual user and should be used in
377
- # most cases to represent user-generated messages.
378
- # - `assistant`: Indicates the message is generated by the assistant. Use this
379
- # value to insert messages from the assistant into the conversation.
380
- # @param attachments
381
- # A list of files attached to the message, and the tools they should be added to.
382
- # @param metadata
383
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
384
- # for storing additional information about the object in a structured format, and
385
- # querying for objects via API or the dashboard.
386
- #
387
- # Keys are strings with a maximum length of 64 characters. Values are strings with
388
- # a maximum length of 512 characters.
389
- def initialize: (
390
- content: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::content,
391
- role: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::role,
392
- ?attachments: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment]?,
393
- ?metadata: OpenAI::Models::metadata?
394
- ) -> void
395
-
396
- def to_hash: -> {
397
- content: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::content,
398
- role: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::role,
399
- ?attachments: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment]?,
400
- ?metadata: OpenAI::Models::metadata?
401
- }
402
-
403
- type content =
404
- String
405
- | ::Array[OpenAI::Models::Beta::Threads::message_content_part_param]
406
-
407
- module Content
408
- extend OpenAI::Internal::Type::Union
409
-
410
- def self?.variants: -> ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::content]
411
-
412
- MessageContentPartParamArray: OpenAI::Internal::Type::Converter
413
- end
414
-
415
- type role = :user | :assistant
416
-
417
- module Role
418
- extend OpenAI::Internal::Type::Enum
419
-
420
- USER: :user
421
- ASSISTANT: :assistant
422
-
423
- def self?.values: -> ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::role]
424
- end
425
-
426
- type attachment =
427
- {
428
- ?file_id: String,
429
- ?tools: ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool]
430
- }
431
-
432
- class Attachment < OpenAI::Internal::Type::BaseModel
433
- # The ID of the file to attach to the message.
434
- attr_reader file_id: String?
435
-
436
- # The ID of the file to attach to the message.
437
- def file_id=: (String) -> String
438
-
439
- # The tools to add this file to.
440
- attr_reader tools: ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool]?
441
-
442
- # The tools to add this file to.
443
- def tools=: (
444
- ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
445
- | { type: :file_search }]
446
- ) -> ::Array[(OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
447
- | { type: :file_search })]
448
-
449
- # @param file_id
450
- # The ID of the file to attach to the message.
451
- # @param tools
452
- # The tools to add this file to.
453
- def initialize: (
454
- ?file_id: String,
455
- ?tools: ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
456
- | { type: :file_search }]
457
- ) -> void
458
-
459
- def to_hash: -> {
460
- ?file_id: String,
461
- ?tools: ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool]
462
- }
463
-
464
- type tool =
465
- OpenAI::Beta::CodeInterpreterTool
466
- | OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool::FileSearch
467
-
468
- module Tool
469
- extend OpenAI::Internal::Type::Union
470
-
471
- type file_search = { ?type: :file_search }
472
-
473
- class FileSearch < OpenAI::Internal::Type::BaseModel
474
- # The type of tool being defined: `file_search`
475
- attr_accessor type: :file_search
476
-
477
- # @param type
478
- # The type of tool being defined: `file_search`
479
- def initialize: (?type: :file_search) -> void
480
-
481
- def to_hash: -> { ?type: :file_search }
482
- end
483
-
484
- def self?.variants: -> ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool]
485
- end
486
- end
487
- end
488
-
489
- type tool_resources =
490
- {
491
- ?code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter,
492
- ?file_search: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch
493
- }
494
-
495
- class ToolResources < OpenAI::Internal::Type::BaseModel
496
- attr_reader code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter?
497
-
498
- def code_interpreter=: (
499
- OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter
500
- ) -> OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter
501
-
502
- attr_reader file_search: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch?
503
-
504
- def file_search=: (
505
- OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch
506
- ) -> OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch
507
-
508
- def initialize: (
509
- ?code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter,
510
- ?file_search: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch
511
- ) -> void
512
-
513
- def to_hash: -> {
514
- ?code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::CodeInterpreter,
515
- ?file_search: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch
516
- }
517
-
518
- type code_interpreter = { ?file_ids: ::Array[String] }
519
-
520
- class CodeInterpreter < OpenAI::Internal::Type::BaseModel
521
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
522
- # IDs made available to the `code_interpreter` tool. There can be a maximum of 20
523
- # files associated with the tool.
524
- attr_reader file_ids: ::Array[String]?
525
-
526
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
527
- # IDs made available to the `code_interpreter` tool. There can be a maximum of 20
528
- # files associated with the tool.
529
- def file_ids=: (::Array[String]) -> ::Array[String]
530
-
531
- # @param file_ids
532
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
533
- # IDs made available to the `code_interpreter` tool. There can be a maximum of 20
534
- # files associated with the tool.
535
- def initialize: (?file_ids: ::Array[String]) -> void
536
-
537
- def to_hash: -> { ?file_ids: ::Array[String] }
538
- end
539
-
540
- type file_search =
541
- {
542
- ?vector_store_ids: ::Array[String],
543
- ?vector_stores: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]
544
- }
545
-
546
- class FileSearch < OpenAI::Internal::Type::BaseModel
547
- # The
548
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
549
- # attached to this thread. There can be a maximum of 1 vector store attached to
550
- # the thread.
551
- attr_reader vector_store_ids: ::Array[String]?
552
-
553
- # The
554
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
555
- # attached to this thread. There can be a maximum of 1 vector store attached to
556
- # the thread.
557
- def vector_store_ids=: (::Array[String]) -> ::Array[String]
558
-
559
- # A helper to create a
560
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
561
- # with file_ids and attach it to this thread. There can be a maximum of 1 vector
562
- # store attached to the thread.
563
- attr_reader vector_stores: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]?
564
-
565
- # A helper to create a
566
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
567
- # with file_ids and attach it to this thread. There can be a maximum of 1 vector
568
- # store attached to the thread.
569
- def vector_stores=: (
570
- ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]
571
- ) -> ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]
572
-
573
- # @param vector_store_ids
574
- # The
575
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
576
- # attached to this thread. There can be a maximum of 1 vector store attached to
577
- # the thread.
578
- # @param vector_stores
579
- # A helper to create a
580
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
581
- # with file_ids and attach it to this thread. There can be a maximum of 1 vector
582
- # store attached to the thread.
583
- def initialize: (
584
- ?vector_store_ids: ::Array[String],
585
- ?vector_stores: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]
586
- ) -> void
587
-
588
- def to_hash: -> {
589
- ?vector_store_ids: ::Array[String],
590
- ?vector_stores: ::Array[OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore]
591
- }
592
-
593
- type vector_store =
594
- {
595
- ?chunking_strategy: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy,
596
- ?file_ids: ::Array[String],
597
- ?metadata: OpenAI::Models::metadata?
598
- }
599
-
600
- class VectorStore < OpenAI::Internal::Type::BaseModel
601
- # The chunking strategy used to chunk the file(s). If not set, will use the `auto`
602
- # strategy.
603
- attr_reader chunking_strategy: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy?
604
-
605
- # The chunking strategy used to chunk the file(s). If not set, will use the `auto`
606
- # strategy.
607
- def chunking_strategy=: (
608
- OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
609
- | { type: :auto }
610
- | {
611
- static: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
612
- type: :static
613
- }
614
- ) -> (OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
615
- | { type: :auto }
616
- | {
617
- static: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
618
- type: :static
619
- })
620
-
621
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
622
- # IDs to add to the vector store. For vector stores created before Nov 2025, there
623
- # can be a maximum of 10,000 files in a vector store. For vector stores created
624
- # starting in Nov 2025, the limit is 100,000,000 files.
625
- attr_reader file_ids: ::Array[String]?
626
-
627
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
628
- # IDs to add to the vector store. For vector stores created before Nov 2025, there
629
- # can be a maximum of 10,000 files in a vector store. For vector stores created
630
- # starting in Nov 2025, the limit is 100,000,000 files.
631
- def file_ids=: (::Array[String]) -> ::Array[String]
632
-
633
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
634
- # for storing additional information about the object in a structured format, and
635
- # querying for objects via API or the dashboard.
636
- #
637
- # Keys are strings with a maximum length of 64 characters. Values are strings with
638
- # a maximum length of 512 characters.
639
- attr_accessor metadata: OpenAI::Models::metadata?
640
-
641
- # @param chunking_strategy
642
- # The chunking strategy used to chunk the file(s). If not set, will use the `auto`
643
- # strategy.
644
- # @param file_ids
645
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
646
- # IDs to add to the vector store. For vector stores created before Nov 2025, there
647
- # can be a maximum of 10,000 files in a vector store. For vector stores created
648
- # starting in Nov 2025, the limit is 100,000,000 files.
649
- # @param metadata
650
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
651
- # for storing additional information about the object in a structured format, and
652
- # querying for objects via API or the dashboard.
653
- #
654
- # Keys are strings with a maximum length of 64 characters. Values are strings with
655
- # a maximum length of 512 characters.
656
- def initialize: (
657
- ?chunking_strategy: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
658
- | { type: :auto }
659
- | {
660
- static: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
661
- type: :static
662
- },
663
- ?file_ids: ::Array[String],
664
- ?metadata: OpenAI::Models::metadata?
665
- ) -> void
666
-
667
- def to_hash: -> {
668
- ?chunking_strategy: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy,
669
- ?file_ids: ::Array[String],
670
- ?metadata: OpenAI::Models::metadata?
671
- }
672
-
673
- type chunking_strategy =
674
- OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto
675
- | OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
676
-
677
- module ChunkingStrategy
678
- extend OpenAI::Internal::Type::Union
679
-
680
- type auto = { ?type: :auto }
681
-
682
- class Auto < OpenAI::Internal::Type::BaseModel
683
- # Always `auto`.
684
- attr_accessor type: :auto
685
-
686
- # @param type
687
- # Always `auto`.
688
- def initialize: (?type: :auto) -> void
689
-
690
- def to_hash: -> { ?type: :auto }
691
- end
692
-
693
- type static =
694
- {
695
- static: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
696
- ?type: :static
697
- }
698
-
699
- class Static < OpenAI::Internal::Type::BaseModel
700
- attr_accessor static: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static
701
-
702
- # Always `static`.
703
- attr_accessor type: :static
704
-
705
- # @param type
706
- # Always `static`.
707
- def initialize: (
708
- static: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
709
- ?type: :static
710
- ) -> void
711
-
712
- def to_hash: -> {
713
- static: OpenAI::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
714
- ?type: :static
715
- }
716
-
717
- type static =
718
- {
719
- chunk_overlap_tokens: Integer,
720
- max_chunk_size_tokens: Integer
721
- }
722
-
723
- class Static < OpenAI::Internal::Type::BaseModel
724
- # The number of tokens that overlap between chunks. The default value is `400`.
725
- #
726
- # Note that the overlap must not exceed half of `max_chunk_size_tokens`.
727
- attr_accessor chunk_overlap_tokens: Integer
728
-
729
- # The maximum number of tokens in each chunk. The default value is `800`. The
730
- # minimum value is `100` and the maximum value is `4096`.
731
- attr_accessor max_chunk_size_tokens: Integer
732
-
733
- # @param chunk_overlap_tokens
734
- # The number of tokens that overlap between chunks. The default value is `400`.
735
- #
736
- # Note that the overlap must not exceed half of `max_chunk_size_tokens`.
737
- # @param max_chunk_size_tokens
738
- # The maximum number of tokens in each chunk. The default value is `800`. The
739
- # minimum value is `100` and the maximum value is `4096`.
740
- def initialize: (
741
- chunk_overlap_tokens: Integer,
742
- max_chunk_size_tokens: Integer
743
- ) -> void
744
-
745
- def to_hash: -> {
746
- chunk_overlap_tokens: Integer,
747
- max_chunk_size_tokens: Integer
748
- }
749
- end
750
- end
751
-
752
- def self?.variants: -> ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy]
753
- end
754
- end
755
- end
756
- end
757
- end
758
-
759
- type tool_resources =
760
- {
761
- ?code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter,
762
- ?file_search: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch
763
- }
764
-
765
- class ToolResources < OpenAI::Internal::Type::BaseModel
766
- attr_reader code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter?
767
-
768
- def code_interpreter=: (
769
- OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter
770
- ) -> OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter
771
-
772
- attr_reader file_search: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch?
773
-
774
- def file_search=: (
775
- OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch
776
- ) -> OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch
777
-
778
- def initialize: (
779
- ?code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter,
780
- ?file_search: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch
781
- ) -> void
782
-
783
- def to_hash: -> {
784
- ?code_interpreter: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::CodeInterpreter,
785
- ?file_search: OpenAI::Beta::ThreadCreateAndRunParams::ToolResources::FileSearch
786
- }
787
-
788
- type code_interpreter = { ?file_ids: ::Array[String] }
789
-
790
- class CodeInterpreter < OpenAI::Internal::Type::BaseModel
791
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
792
- # IDs made available to the `code_interpreter` tool. There can be a maximum of 20
793
- # files associated with the tool.
794
- attr_reader file_ids: ::Array[String]?
795
-
796
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
797
- # IDs made available to the `code_interpreter` tool. There can be a maximum of 20
798
- # files associated with the tool.
799
- def file_ids=: (::Array[String]) -> ::Array[String]
800
-
801
- # @param file_ids
802
- # A list of [file](https://developers.openai.com/api/reference/resources/files)
803
- # IDs made available to the `code_interpreter` tool. There can be a maximum of 20
804
- # files associated with the tool.
805
- def initialize: (?file_ids: ::Array[String]) -> void
806
-
807
- def to_hash: -> { ?file_ids: ::Array[String] }
808
- end
809
-
810
- type file_search = { ?vector_store_ids: ::Array[String] }
811
-
812
- class FileSearch < OpenAI::Internal::Type::BaseModel
813
- # The ID of the
814
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
815
- # attached to this assistant. There can be a maximum of 1 vector store attached to
816
- # the assistant.
817
- attr_reader vector_store_ids: ::Array[String]?
818
-
819
- # The ID of the
820
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
821
- # attached to this assistant. There can be a maximum of 1 vector store attached to
822
- # the assistant.
823
- def vector_store_ids=: (::Array[String]) -> ::Array[String]
824
-
825
- # @param vector_store_ids
826
- # The ID of the
827
- # [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
828
- # attached to this assistant. There can be a maximum of 1 vector store attached to
829
- # the assistant.
830
- def initialize: (?vector_store_ids: ::Array[String]) -> void
831
-
832
- def to_hash: -> { ?vector_store_ids: ::Array[String] }
833
- end
834
- end
835
-
836
- type truncation_strategy =
837
- {
838
- type: OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::type_,
839
- ?last_messages: Integer?
840
- }
841
-
842
- class TruncationStrategy < OpenAI::Internal::Type::BaseModel
843
- # The truncation strategy to use for the thread. The default is `auto`. If set to
844
- # `last_messages`, the thread will be truncated to the n most recent messages in
845
- # the thread. When set to `auto`, messages in the middle of the thread will be
846
- # dropped to fit the context length of the model, `max_prompt_tokens`.
847
- attr_accessor type: OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::type_
848
-
849
- # The number of most recent messages from the thread when constructing the context
850
- # for the run.
851
- attr_accessor last_messages: Integer?
852
-
853
- # @param type
854
- # The truncation strategy to use for the thread. The default is `auto`. If set to
855
- # `last_messages`, the thread will be truncated to the n most recent messages in
856
- # the thread. When set to `auto`, messages in the middle of the thread will be
857
- # dropped to fit the context length of the model, `max_prompt_tokens`.
858
- # @param last_messages
859
- # The number of most recent messages from the thread when constructing the context
860
- # for the run.
861
- def initialize: (
862
- type: OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::type_,
863
- ?last_messages: Integer?
864
- ) -> void
865
-
866
- def to_hash: -> {
867
- type: OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::type_,
868
- ?last_messages: Integer?
869
- }
870
-
871
- type type_ = :auto | :last_messages
872
-
873
- module Type
874
- extend OpenAI::Internal::Type::Enum
875
-
876
- AUTO: :auto
877
- LAST_MESSAGES: :last_messages
878
-
879
- def self?.values: -> ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::TruncationStrategy::type_]
880
- end
881
- end
882
- end
883
- end
884
- end
885
- end