openai 0.130.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/README.md +39 -3
- data/lib/openai/client.rb +0 -4
- data/lib/openai/internal/type/union.rb +5 -1
- data/lib/openai/models/batch_create_params.rb +6 -19
- data/lib/openai/models/beta/beta_compacted_response.rb +3 -3
- data/lib/openai/models/beta/beta_response.rb +0 -18
- data/lib/openai/models/beta/beta_responses_client_event.rb +0 -26
- data/lib/openai/models/beta/response_compact_params.rb +0 -18
- data/lib/openai/models/beta/response_create_params.rb +0 -18
- data/lib/openai/models/chat/completion_create_params.rb +8 -6
- data/lib/openai/models/chat_model.rb +0 -12
- data/lib/openai/models/completion_create_params.rb +4 -2
- data/lib/openai/models/graders/multi_grader.rb +11 -15
- data/lib/openai/models/image_edit_completed_event.rb +9 -17
- data/lib/openai/models/image_edit_partial_image_event.rb +9 -17
- data/lib/openai/models/image_gen_completed_event.rb +9 -17
- data/lib/openai/models/image_gen_partial_image_event.rb +9 -17
- data/lib/openai/models/images_response.rb +8 -14
- data/lib/openai/models/live/responses_delegation_config.rb +47 -21
- data/lib/openai/models/live/responses_delegation_update_config.rb +47 -21
- data/lib/openai/models/responses/compacted_response.rb +3 -3
- data/lib/openai/models/responses/response_compact_params.rb +0 -18
- data/lib/openai/models.rb +0 -32
- data/lib/openai/providers/vertex.rb +9 -6
- data/lib/openai/resources/batches.rb +2 -6
- data/lib/openai/resources/beta.rb +0 -10
- data/lib/openai/resources/chat/completions.rb +8 -6
- data/lib/openai/resources/completions.rb +4 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +0 -114
- data/rbi/openai/client.rbi +0 -3
- data/rbi/openai/models/batch_create_params.rbi +6 -19
- data/rbi/openai/models/beta/beta_compacted_response.rbi +22 -20
- data/rbi/openai/models/beta/beta_response.rbi +0 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +0 -12
- data/rbi/openai/models/beta/response_compact_params.rbi +0 -9
- data/rbi/openai/models/beta/response_create_params.rbi +0 -6
- data/rbi/openai/models/chat/completion_create_params.rbi +8 -6
- data/rbi/openai/models/chat_model.rbi +0 -3
- data/rbi/openai/models/completion_create_params.rbi +4 -2
- data/rbi/openai/models/graders/multi_grader.rbi +32 -27
- data/rbi/openai/models/image_edit_completed_event.rbi +11 -8
- data/rbi/openai/models/image_edit_partial_image_event.rbi +11 -8
- data/rbi/openai/models/image_gen_completed_event.rbi +11 -8
- data/rbi/openai/models/image_gen_partial_image_event.rbi +11 -8
- data/rbi/openai/models/images_response.rbi +6 -6
- data/rbi/openai/models/live/responses_delegation_config.rbi +54 -30
- data/rbi/openai/models/live/responses_delegation_update_config.rbi +54 -30
- data/rbi/openai/models/responses/compacted_response.rbi +19 -17
- data/rbi/openai/models/responses/response_compact_params.rbi +0 -12
- data/rbi/openai/models.rbi +0 -32
- data/rbi/openai/resources/batches.rbi +2 -6
- data/rbi/openai/resources/beta.rbi +0 -8
- data/rbi/openai/resources/chat/completions.rbi +8 -6
- data/rbi/openai/resources/completions.rbi +4 -2
- data/sig/openai/client.rbs +0 -2
- data/sig/openai/models/batch_create_params.rbs +4 -14
- data/sig/openai/models/beta/beta_compacted_response.rbs +4 -4
- data/sig/openai/models/beta/beta_response.rbs +0 -6
- data/sig/openai/models/beta/beta_responses_client_event.rbs +0 -6
- data/sig/openai/models/beta/response_compact_params.rbs +0 -6
- data/sig/openai/models/beta/response_create_params.rbs +0 -6
- data/sig/openai/models/chat/completion_create_params.rbs +8 -6
- data/sig/openai/models/chat_model.rbs +0 -6
- data/sig/openai/models/completion_create_params.rbs +4 -2
- data/sig/openai/models/graders/multi_grader.rbs +7 -12
- data/sig/openai/models/image_edit_completed_event.rbs +11 -9
- data/sig/openai/models/image_edit_partial_image_event.rbs +11 -9
- data/sig/openai/models/image_gen_completed_event.rbs +11 -9
- data/sig/openai/models/image_gen_partial_image_event.rbs +11 -9
- data/sig/openai/models/images_response.rbs +5 -7
- data/sig/openai/models/live/responses_delegation_config.rbs +50 -18
- data/sig/openai/models/live/responses_delegation_update_config.rbs +50 -18
- data/sig/openai/models/responses/compacted_response.rbs +4 -4
- data/sig/openai/models/responses/response_compact_params.rbs +0 -6
- data/sig/openai/models.rbs +0 -32
- data/sig/openai/resources/beta.rbs +0 -4
- metadata +1 -343
- data/lib/openai/models/beta/assistant.rb +0 -270
- data/lib/openai/models/beta/assistant_create_params.rb +0 -448
- data/lib/openai/models/beta/assistant_delete_params.rb +0 -22
- data/lib/openai/models/beta/assistant_deleted.rb +0 -30
- data/lib/openai/models/beta/assistant_list_params.rb +0 -80
- data/lib/openai/models/beta/assistant_response_format_option.rb +0 -50
- data/lib/openai/models/beta/assistant_retrieve_params.rb +0 -22
- data/lib/openai/models/beta/assistant_stream_event.rb +0 -688
- data/lib/openai/models/beta/assistant_tool.rb +0 -22
- data/lib/openai/models/beta/assistant_tool_choice.rb +0 -43
- data/lib/openai/models/beta/assistant_tool_choice_function.rb +0 -19
- data/lib/openai/models/beta/assistant_tool_choice_option.rb +0 -42
- data/lib/openai/models/beta/assistant_update_params.rb +0 -450
- data/lib/openai/models/beta/code_interpreter_tool.rb +0 -19
- data/lib/openai/models/beta/file_search_tool.rb +0 -123
- data/lib/openai/models/beta/function_tool.rb +0 -26
- data/lib/openai/models/beta/message_stream_event.rb +0 -159
- data/lib/openai/models/beta/run_step_stream_event.rb +0 -201
- data/lib/openai/models/beta/run_stream_event.rb +0 -288
- data/lib/openai/models/beta/thread.rb +0 -133
- data/lib/openai/models/beta/thread_create_and_run_params.rb +0 -857
- data/lib/openai/models/beta/thread_create_params.rb +0 -443
- data/lib/openai/models/beta/thread_delete_params.rb +0 -22
- data/lib/openai/models/beta/thread_deleted.rb +0 -30
- data/lib/openai/models/beta/thread_retrieve_params.rb +0 -22
- data/lib/openai/models/beta/thread_stream_event.rb +0 -41
- data/lib/openai/models/beta/thread_update_params.rb +0 -114
- data/lib/openai/models/beta/threads/annotation.rb +0 -27
- data/lib/openai/models/beta/threads/annotation_delta.rb +0 -27
- data/lib/openai/models/beta/threads/file_citation_annotation.rb +0 -68
- data/lib/openai/models/beta/threads/file_citation_delta_annotation.rb +0 -86
- data/lib/openai/models/beta/threads/file_path_annotation.rb +0 -67
- data/lib/openai/models/beta/threads/file_path_delta_annotation.rb +0 -76
- data/lib/openai/models/beta/threads/image_file.rb +0 -51
- data/lib/openai/models/beta/threads/image_file_content_block.rb +0 -32
- data/lib/openai/models/beta/threads/image_file_delta.rb +0 -51
- data/lib/openai/models/beta/threads/image_file_delta_block.rb +0 -41
- data/lib/openai/models/beta/threads/image_url.rb +0 -49
- data/lib/openai/models/beta/threads/image_url_content_block.rb +0 -30
- data/lib/openai/models/beta/threads/image_url_delta.rb +0 -49
- data/lib/openai/models/beta/threads/image_url_delta_block.rb +0 -39
- data/lib/openai/models/beta/threads/message.rb +0 -272
- data/lib/openai/models/beta/threads/message_content.rb +0 -33
- data/lib/openai/models/beta/threads/message_content_delta.rb +0 -33
- data/lib/openai/models/beta/threads/message_content_part_param.rb +0 -30
- data/lib/openai/models/beta/threads/message_create_params.rb +0 -172
- data/lib/openai/models/beta/threads/message_delete_params.rb +0 -30
- data/lib/openai/models/beta/threads/message_deleted.rb +0 -32
- data/lib/openai/models/beta/threads/message_delta.rb +0 -48
- data/lib/openai/models/beta/threads/message_delta_event.rb +0 -42
- data/lib/openai/models/beta/threads/message_list_params.rb +0 -98
- data/lib/openai/models/beta/threads/message_retrieve_params.rb +0 -30
- data/lib/openai/models/beta/threads/message_update_params.rb +0 -51
- data/lib/openai/models/beta/threads/refusal_content_block.rb +0 -30
- data/lib/openai/models/beta/threads/refusal_delta_block.rb +0 -39
- data/lib/openai/models/beta/threads/required_action_function_tool_call.rb +0 -73
- data/lib/openai/models/beta/threads/run.rb +0 -557
- data/lib/openai/models/beta/threads/run_cancel_params.rb +0 -30
- data/lib/openai/models/beta/threads/run_create_params.rb +0 -565
- data/lib/openai/models/beta/threads/run_list_params.rb +0 -89
- data/lib/openai/models/beta/threads/run_retrieve_params.rb +0 -30
- data/lib/openai/models/beta/threads/run_status.rb +0 -29
- data/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +0 -69
- data/lib/openai/models/beta/threads/run_update_params.rb +0 -51
- data/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb +0 -43
- data/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb +0 -54
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +0 -161
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +0 -107
- data/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +0 -207
- data/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb +0 -52
- data/lib/openai/models/beta/threads/runs/function_tool_call.rb +0 -78
- data/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb +0 -87
- data/lib/openai/models/beta/threads/runs/message_creation_step_details.rb +0 -48
- data/lib/openai/models/beta/threads/runs/run_step.rb +0 -311
- data/lib/openai/models/beta/threads/runs/run_step_delta.rb +0 -45
- data/lib/openai/models/beta/threads/runs/run_step_delta_event.rb +0 -46
- data/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +0 -47
- data/lib/openai/models/beta/threads/runs/run_step_include.rb +0 -22
- data/lib/openai/models/beta/threads/runs/step_list_params.rb +0 -122
- data/lib/openai/models/beta/threads/runs/step_retrieve_params.rb +0 -65
- data/lib/openai/models/beta/threads/runs/tool_call.rb +0 -28
- data/lib/openai/models/beta/threads/runs/tool_call_delta.rb +0 -28
- data/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb +0 -41
- data/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +0 -38
- data/lib/openai/models/beta/threads/text.rb +0 -28
- data/lib/openai/models/beta/threads/text_content_block.rb +0 -30
- data/lib/openai/models/beta/threads/text_content_block_param.rb +0 -32
- data/lib/openai/models/beta/threads/text_delta.rb +0 -31
- data/lib/openai/models/beta/threads/text_delta_block.rb +0 -39
- data/lib/openai/models/image_input_reference_param.rb +0 -24
- data/lib/openai/models/video.rb +0 -161
- data/lib/openai/models/video_create_character_params.rb +0 -40
- data/lib/openai/models/video_create_character_response.rb +0 -36
- data/lib/openai/models/video_create_error.rb +0 -166
- data/lib/openai/models/video_create_params.rb +0 -85
- data/lib/openai/models/video_delete_params.rb +0 -20
- data/lib/openai/models/video_delete_response.rb +0 -38
- data/lib/openai/models/video_download_content_params.rb +0 -42
- data/lib/openai/models/video_edit_params.rb +0 -68
- data/lib/openai/models/video_extend_params.rb +0 -79
- data/lib/openai/models/video_get_character_params.rb +0 -20
- data/lib/openai/models/video_get_character_response.rb +0 -36
- data/lib/openai/models/video_list_params.rb +0 -55
- data/lib/openai/models/video_model.rb +0 -38
- data/lib/openai/models/video_remix_params.rb +0 -30
- data/lib/openai/models/video_retrieve_params.rb +0 -20
- data/lib/openai/models/video_seconds.rb +0 -16
- data/lib/openai/models/video_size.rb +0 -17
- data/lib/openai/resources/beta/assistants.rb +0 -320
- data/lib/openai/resources/beta/threads/messages.rb +0 -236
- data/lib/openai/resources/beta/threads/runs/steps.rb +0 -141
- data/lib/openai/resources/beta/threads/runs.rb +0 -623
- data/lib/openai/resources/beta/threads.rb +0 -444
- data/lib/openai/resources/videos.rb +0 -354
- data/rbi/openai/models/beta/assistant.rbi +0 -411
- data/rbi/openai/models/beta/assistant_create_params.rbi +0 -776
- data/rbi/openai/models/beta/assistant_delete_params.rbi +0 -53
- data/rbi/openai/models/beta/assistant_deleted.rbi +0 -60
- data/rbi/openai/models/beta/assistant_list_params.rbi +0 -132
- data/rbi/openai/models/beta/assistant_response_format_option.rbi +0 -49
- data/rbi/openai/models/beta/assistant_retrieve_params.rbi +0 -53
- data/rbi/openai/models/beta/assistant_stream_event.rbi +0 -1277
- data/rbi/openai/models/beta/assistant_tool.rbi +0 -28
- data/rbi/openai/models/beta/assistant_tool_choice.rbi +0 -79
- data/rbi/openai/models/beta/assistant_tool_choice_function.rbi +0 -49
- data/rbi/openai/models/beta/assistant_tool_choice_option.rbi +0 -53
- data/rbi/openai/models/beta/assistant_update_params.rbi +0 -556
- data/rbi/openai/models/beta/code_interpreter_tool.rbi +0 -49
- data/rbi/openai/models/beta/file_search_tool.rbi +0 -223
- data/rbi/openai/models/beta/function_tool.rbi +0 -59
- data/rbi/openai/models/beta/message_stream_event.rbi +0 -288
- data/rbi/openai/models/beta/run_step_stream_event.rbi +0 -378
- data/rbi/openai/models/beta/run_stream_event.rbi +0 -537
- data/rbi/openai/models/beta/thread.rbi +0 -255
- data/rbi/openai/models/beta/thread_create_and_run_params.rbi +0 -1461
- data/rbi/openai/models/beta/thread_create_params.rbi +0 -823
- data/rbi/openai/models/beta/thread_delete_params.rbi +0 -53
- data/rbi/openai/models/beta/thread_deleted.rbi +0 -60
- data/rbi/openai/models/beta/thread_retrieve_params.rbi +0 -53
- data/rbi/openai/models/beta/thread_stream_event.rbi +0 -75
- data/rbi/openai/models/beta/thread_update_params.rbi +0 -240
- data/rbi/openai/models/beta/threads/annotation.rbi +0 -34
- data/rbi/openai/models/beta/threads/annotation_delta.rbi +0 -34
- data/rbi/openai/models/beta/threads/file_citation_annotation.rbi +0 -132
- data/rbi/openai/models/beta/threads/file_citation_delta_annotation.rbi +0 -166
- data/rbi/openai/models/beta/threads/file_path_annotation.rbi +0 -131
- data/rbi/openai/models/beta/threads/file_path_delta_annotation.rbi +0 -153
- data/rbi/openai/models/beta/threads/image_file.rbi +0 -88
- data/rbi/openai/models/beta/threads/image_file_content_block.rbi +0 -66
- data/rbi/openai/models/beta/threads/image_file_delta.rbi +0 -91
- data/rbi/openai/models/beta/threads/image_file_delta_block.rbi +0 -75
- data/rbi/openai/models/beta/threads/image_url.rbi +0 -86
- data/rbi/openai/models/beta/threads/image_url_content_block.rbi +0 -64
- data/rbi/openai/models/beta/threads/image_url_delta.rbi +0 -89
- data/rbi/openai/models/beta/threads/image_url_delta_block.rbi +0 -73
- data/rbi/openai/models/beta/threads/message.rbi +0 -433
- data/rbi/openai/models/beta/threads/message_content.rbi +0 -36
- data/rbi/openai/models/beta/threads/message_content_delta.rbi +0 -36
- data/rbi/openai/models/beta/threads/message_content_part_param.rbi +0 -35
- data/rbi/openai/models/beta/threads/message_create_params.rbi +0 -299
- data/rbi/openai/models/beta/threads/message_delete_params.rbi +0 -64
- data/rbi/openai/models/beta/threads/message_deleted.rbi +0 -64
- data/rbi/openai/models/beta/threads/message_delta.rbi +0 -106
- data/rbi/openai/models/beta/threads/message_delta_event.rbi +0 -76
- data/rbi/openai/models/beta/threads/message_list_params.rbi +0 -157
- data/rbi/openai/models/beta/threads/message_retrieve_params.rbi +0 -64
- data/rbi/openai/models/beta/threads/message_update_params.rbi +0 -88
- data/rbi/openai/models/beta/threads/refusal_content_block.rbi +0 -61
- data/rbi/openai/models/beta/threads/refusal_delta_block.rbi +0 -73
- data/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi +0 -130
- data/rbi/openai/models/beta/threads/run.rbi +0 -803
- data/rbi/openai/models/beta/threads/run_cancel_params.rbi +0 -64
- data/rbi/openai/models/beta/threads/run_create_params.rbi +0 -825
- data/rbi/openai/models/beta/threads/run_list_params.rbi +0 -144
- data/rbi/openai/models/beta/threads/run_retrieve_params.rbi +0 -64
- data/rbi/openai/models/beta/threads/run_status.rbi +0 -39
- data/rbi/openai/models/beta/threads/run_submit_tool_outputs_params.rbi +0 -132
- data/rbi/openai/models/beta/threads/run_update_params.rbi +0 -88
- data/rbi/openai/models/beta/threads/runs/code_interpreter_logs.rbi +0 -79
- data/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi +0 -118
- data/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi +0 -315
- data/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbi +0 -210
- data/rbi/openai/models/beta/threads/runs/file_search_tool_call.rbi +0 -409
- data/rbi/openai/models/beta/threads/runs/file_search_tool_call_delta.rbi +0 -89
- data/rbi/openai/models/beta/threads/runs/function_tool_call.rbi +0 -138
- data/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi +0 -161
- data/rbi/openai/models/beta/threads/runs/message_creation_step_details.rbi +0 -111
- data/rbi/openai/models/beta/threads/runs/run_step.rbi +0 -422
- data/rbi/openai/models/beta/threads/runs/run_step_delta.rbi +0 -91
- data/rbi/openai/models/beta/threads/runs/run_step_delta_event.rbi +0 -82
- data/rbi/openai/models/beta/threads/runs/run_step_delta_message_delta.rbi +0 -113
- data/rbi/openai/models/beta/threads/runs/run_step_include.rbi +0 -37
- data/rbi/openai/models/beta/threads/runs/step_list_params.rbi +0 -181
- data/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi +0 -105
- data/rbi/openai/models/beta/threads/runs/tool_call.rbi +0 -37
- data/rbi/openai/models/beta/threads/runs/tool_call_delta.rbi +0 -37
- data/rbi/openai/models/beta/threads/runs/tool_call_delta_object.rbi +0 -91
- data/rbi/openai/models/beta/threads/runs/tool_calls_step_details.rbi +0 -77
- data/rbi/openai/models/beta/threads/text.rbi +0 -65
- data/rbi/openai/models/beta/threads/text_content_block.rbi +0 -64
- data/rbi/openai/models/beta/threads/text_content_block_param.rbi +0 -63
- data/rbi/openai/models/beta/threads/text_delta.rbi +0 -81
- data/rbi/openai/models/beta/threads/text_delta_block.rbi +0 -73
- data/rbi/openai/models/image_input_reference_param.rbi +0 -58
- data/rbi/openai/models/video.rbi +0 -203
- data/rbi/openai/models/video_create_character_params.rbi +0 -68
- data/rbi/openai/models/video_create_character_response.rbi +0 -63
- data/rbi/openai/models/video_create_error.rbi +0 -255
- data/rbi/openai/models/video_create_params.rbi +0 -132
- data/rbi/openai/models/video_delete_params.rbi +0 -49
- data/rbi/openai/models/video_delete_response.rbi +0 -64
- data/rbi/openai/models/video_download_content_params.rbi +0 -81
- data/rbi/openai/models/video_edit_params.rbi +0 -122
- data/rbi/openai/models/video_extend_params.rbi +0 -134
- data/rbi/openai/models/video_get_character_params.rbi +0 -49
- data/rbi/openai/models/video_get_character_response.rbi +0 -63
- data/rbi/openai/models/video_list_params.rbi +0 -101
- data/rbi/openai/models/video_model.rbi +0 -35
- data/rbi/openai/models/video_remix_params.rbi +0 -58
- data/rbi/openai/models/video_retrieve_params.rbi +0 -49
- data/rbi/openai/models/video_seconds.rbi +0 -22
- data/rbi/openai/models/video_size.rbi +0 -23
- data/rbi/openai/resources/beta/assistants.rbi +0 -285
- data/rbi/openai/resources/beta/threads/messages.rbi +0 -161
- data/rbi/openai/resources/beta/threads/runs/steps.rbi +0 -107
- data/rbi/openai/resources/beta/threads/runs.rbi +0 -527
- data/rbi/openai/resources/beta/threads.rbi +0 -391
- data/rbi/openai/resources/videos.rbi +0 -205
- data/sig/openai/models/beta/assistant.rbs +0 -278
- data/sig/openai/models/beta/assistant_create_params.rbs +0 -485
- data/sig/openai/models/beta/assistant_delete_params.rbs +0 -25
- data/sig/openai/models/beta/assistant_deleted.rbs +0 -28
- data/sig/openai/models/beta/assistant_list_params.rbs +0 -104
- data/sig/openai/models/beta/assistant_response_format_option.rbs +0 -17
- data/sig/openai/models/beta/assistant_retrieve_params.rbs +0 -25
- data/sig/openai/models/beta/assistant_stream_event.rbs +0 -645
- data/sig/openai/models/beta/assistant_tool.rbs +0 -16
- data/sig/openai/models/beta/assistant_tool_choice.rbs +0 -46
- data/sig/openai/models/beta/assistant_tool_choice_function.rbs +0 -18
- data/sig/openai/models/beta/assistant_tool_choice_option.rbs +0 -27
- data/sig/openai/models/beta/assistant_update_params.rbs +0 -396
- data/sig/openai/models/beta/code_interpreter_tool.rbs +0 -18
- data/sig/openai/models/beta/file_search_tool.rbs +0 -159
- data/sig/openai/models/beta/function_tool.rbs +0 -27
- data/sig/openai/models/beta/message_stream_event.rbs +0 -153
- data/sig/openai/models/beta/run_step_stream_event.rbs +0 -197
- data/sig/openai/models/beta/run_stream_event.rbs +0 -269
- data/sig/openai/models/beta/thread.rbs +0 -150
- data/sig/openai/models/beta/thread_create_and_run_params.rbs +0 -885
- data/sig/openai/models/beta/thread_create_params.rbs +0 -492
- data/sig/openai/models/beta/thread_delete_params.rbs +0 -25
- data/sig/openai/models/beta/thread_deleted.rbs +0 -28
- data/sig/openai/models/beta/thread_retrieve_params.rbs +0 -25
- data/sig/openai/models/beta/thread_stream_event.rbs +0 -43
- data/sig/openai/models/beta/thread_update_params.rbs +0 -137
- data/sig/openai/models/beta/threads/annotation.rbs +0 -17
- data/sig/openai/models/beta/threads/annotation_delta.rbs +0 -17
- data/sig/openai/models/beta/threads/file_citation_annotation.rbs +0 -63
- data/sig/openai/models/beta/threads/file_citation_delta_annotation.rbs +0 -93
- data/sig/openai/models/beta/threads/file_path_annotation.rbs +0 -63
- data/sig/openai/models/beta/threads/file_path_delta_annotation.rbs +0 -85
- data/sig/openai/models/beta/threads/image_file.rbs +0 -59
- data/sig/openai/models/beta/threads/image_file_content_block.rbs +0 -29
- data/sig/openai/models/beta/threads/image_file_delta.rbs +0 -64
- data/sig/openai/models/beta/threads/image_file_delta_block.rbs +0 -44
- data/sig/openai/models/beta/threads/image_url.rbs +0 -57
- data/sig/openai/models/beta/threads/image_url_content_block.rbs +0 -29
- data/sig/openai/models/beta/threads/image_url_delta.rbs +0 -61
- data/sig/openai/models/beta/threads/image_url_delta_block.rbs +0 -44
- data/sig/openai/models/beta/threads/message.rbs +0 -275
- data/sig/openai/models/beta/threads/message_content.rbs +0 -19
- data/sig/openai/models/beta/threads/message_content_delta.rbs +0 -19
- data/sig/openai/models/beta/threads/message_content_part_param.rbs +0 -18
- data/sig/openai/models/beta/threads/message_create_params.rbs +0 -167
- data/sig/openai/models/beta/threads/message_delete_params.rbs +0 -35
- data/sig/openai/models/beta/threads/message_deleted.rbs +0 -30
- data/sig/openai/models/beta/threads/message_delta.rbs +0 -56
- data/sig/openai/models/beta/threads/message_delta_event.rbs +0 -43
- data/sig/openai/models/beta/threads/message_list_params.rbs +0 -122
- data/sig/openai/models/beta/threads/message_retrieve_params.rbs +0 -35
- data/sig/openai/models/beta/threads/message_update_params.rbs +0 -53
- data/sig/openai/models/beta/threads/refusal_content_block.rbs +0 -22
- data/sig/openai/models/beta/threads/refusal_delta_block.rbs +0 -34
- data/sig/openai/models/beta/threads/required_action_function_tool_call.rbs +0 -69
- data/sig/openai/models/beta/threads/run.rbs +0 -545
- data/sig/openai/models/beta/threads/run_cancel_params.rbs +0 -35
- data/sig/openai/models/beta/threads/run_create_params.rbs +0 -524
- data/sig/openai/models/beta/threads/run_list_params.rbs +0 -111
- data/sig/openai/models/beta/threads/run_retrieve_params.rbs +0 -35
- data/sig/openai/models/beta/threads/run_status.rbs +0 -34
- data/sig/openai/models/beta/threads/run_submit_tool_outputs_params.rbs +0 -70
- data/sig/openai/models/beta/threads/run_update_params.rbs +0 -53
- data/sig/openai/models/beta/threads/runs/code_interpreter_logs.rbs +0 -40
- data/sig/openai/models/beta/threads/runs/code_interpreter_output_image.rbs +0 -65
- data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call.rbs +0 -147
- data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbs +0 -115
- data/sig/openai/models/beta/threads/runs/file_search_tool_call.rbs +0 -228
- data/sig/openai/models/beta/threads/runs/file_search_tool_call_delta.rbs +0 -58
- data/sig/openai/models/beta/threads/runs/function_tool_call.rbs +0 -80
- data/sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs +0 -103
- data/sig/openai/models/beta/threads/runs/message_creation_step_details.rbs +0 -47
- data/sig/openai/models/beta/threads/runs/run_step.rbs +0 -290
- data/sig/openai/models/beta/threads/runs/run_step_delta.rbs +0 -46
- data/sig/openai/models/beta/threads/runs/run_step_delta_event.rbs +0 -47
- data/sig/openai/models/beta/threads/runs/run_step_delta_message_delta.rbs +0 -56
- data/sig/openai/models/beta/threads/runs/run_step_include.rbs +0 -22
- data/sig/openai/models/beta/threads/runs/step_list_params.rbs +0 -149
- data/sig/openai/models/beta/threads/runs/step_retrieve_params.rbs +0 -73
- data/sig/openai/models/beta/threads/runs/tool_call.rbs +0 -20
- data/sig/openai/models/beta/threads/runs/tool_call_delta.rbs +0 -20
- data/sig/openai/models/beta/threads/runs/tool_call_delta_object.rbs +0 -48
- data/sig/openai/models/beta/threads/runs/tool_calls_step_details.rbs +0 -41
- data/sig/openai/models/beta/threads/text.rbs +0 -32
- data/sig/openai/models/beta/threads/text_content_block.rbs +0 -26
- data/sig/openai/models/beta/threads/text_content_block_param.rbs +0 -25
- data/sig/openai/models/beta/threads/text_delta.rbs +0 -39
- data/sig/openai/models/beta/threads/text_delta_block.rbs +0 -44
- data/sig/openai/models/image_input_reference_param.rbs +0 -23
- data/sig/openai/models/video.rbs +0 -142
- data/sig/openai/models/video_create_character_params.rbs +0 -45
- data/sig/openai/models/video_create_character_response.rbs +0 -27
- data/sig/openai/models/video_create_error.rbs +0 -163
- data/sig/openai/models/video_create_params.rbs +0 -104
- data/sig/openai/models/video_delete_params.rbs +0 -23
- data/sig/openai/models/video_delete_response.rbs +0 -31
- data/sig/openai/models/video_download_content_params.rbs +0 -51
- data/sig/openai/models/video_edit_params.rbs +0 -77
- data/sig/openai/models/video_extend_params.rbs +0 -87
- data/sig/openai/models/video_get_character_params.rbs +0 -23
- data/sig/openai/models/video_get_character_response.rbs +0 -27
- data/sig/openai/models/video_list_params.rbs +0 -70
- data/sig/openai/models/video_model.rbs +0 -23
- data/sig/openai/models/video_remix_params.rbs +0 -34
- data/sig/openai/models/video_retrieve_params.rbs +0 -23
- data/sig/openai/models/video_seconds.rbs +0 -15
- data/sig/openai/models/video_size.rbs +0 -16
- data/sig/openai/resources/beta/assistants.rbs +0 -58
- data/sig/openai/resources/beta/threads/messages.rbs +0 -49
- data/sig/openai/resources/beta/threads/runs/steps.rbs +0 -32
- data/sig/openai/resources/beta/threads/runs.rbs +0 -99
- data/sig/openai/resources/beta/threads.rbs +0 -75
- data/sig/openai/resources/videos.rbs +0 -69
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
module AssistantTool
|
|
7
|
-
extend OpenAI::Internal::Type::Union
|
|
8
|
-
|
|
9
|
-
discriminator :type
|
|
10
|
-
|
|
11
|
-
variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }
|
|
12
|
-
|
|
13
|
-
variant :file_search, -> { OpenAI::Beta::FileSearchTool }
|
|
14
|
-
|
|
15
|
-
variant :function, -> { OpenAI::Beta::FunctionTool }
|
|
16
|
-
|
|
17
|
-
# @!method self.variants
|
|
18
|
-
# @return [Array(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool)]
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
class AssistantToolChoice < OpenAI::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute type
|
|
8
|
-
# The type of the tool. If type is `function`, the function name must be set
|
|
9
|
-
#
|
|
10
|
-
# @return [Symbol, OpenAI::Models::Beta::AssistantToolChoice::Type]
|
|
11
|
-
required :type, enum: -> { OpenAI::Beta::AssistantToolChoice::Type }
|
|
12
|
-
|
|
13
|
-
# @!attribute function
|
|
14
|
-
#
|
|
15
|
-
# @return [OpenAI::Models::Beta::AssistantToolChoiceFunction, nil]
|
|
16
|
-
optional :function, -> { OpenAI::Beta::AssistantToolChoiceFunction }
|
|
17
|
-
|
|
18
|
-
# @!method initialize(type:, function: nil)
|
|
19
|
-
# Specifies a tool the model should use. Use to force the model to call a specific
|
|
20
|
-
# tool.
|
|
21
|
-
#
|
|
22
|
-
# @param type [Symbol, OpenAI::Models::Beta::AssistantToolChoice::Type]
|
|
23
|
-
# The type of the tool. If type is `function`, the function name must be set
|
|
24
|
-
#
|
|
25
|
-
# @param function [OpenAI::Models::Beta::AssistantToolChoiceFunction]
|
|
26
|
-
|
|
27
|
-
# The type of the tool. If type is `function`, the function name must be set
|
|
28
|
-
#
|
|
29
|
-
# @see OpenAI::Models::Beta::AssistantToolChoice#type
|
|
30
|
-
module Type
|
|
31
|
-
extend OpenAI::Internal::Type::Enum
|
|
32
|
-
|
|
33
|
-
FUNCTION = :function
|
|
34
|
-
CODE_INTERPRETER = :code_interpreter
|
|
35
|
-
FILE_SEARCH = :file_search
|
|
36
|
-
|
|
37
|
-
# @!method self.values
|
|
38
|
-
# @return [Array<Symbol>]
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
class AssistantToolChoiceFunction < OpenAI::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute name
|
|
8
|
-
# The name of the function to call.
|
|
9
|
-
#
|
|
10
|
-
# @return [String]
|
|
11
|
-
required :name, String
|
|
12
|
-
|
|
13
|
-
# @!method initialize(name:)
|
|
14
|
-
# @param name [String]
|
|
15
|
-
# The name of the function to call.
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
# Controls which (if any) tool is called by the model. `none` means the model will
|
|
7
|
-
# not call any tools and instead generates a message. `auto` is the default value
|
|
8
|
-
# and means the model can pick between generating a message or calling one or more
|
|
9
|
-
# tools. `required` means the model must call one or more tools before responding
|
|
10
|
-
# to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
|
11
|
-
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
|
12
|
-
# call that tool.
|
|
13
|
-
module AssistantToolChoiceOption
|
|
14
|
-
extend OpenAI::Internal::Type::Union
|
|
15
|
-
|
|
16
|
-
# `none` means the model will not call any tools and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools before responding to the user.
|
|
17
|
-
variant enum: -> { OpenAI::Beta::AssistantToolChoiceOption::Auto }
|
|
18
|
-
|
|
19
|
-
# Specifies a tool the model should use. Use to force the model to call a specific tool.
|
|
20
|
-
variant -> { OpenAI::Beta::AssistantToolChoice }
|
|
21
|
-
|
|
22
|
-
# `none` means the model will not call any tools and instead generates a message.
|
|
23
|
-
# `auto` means the model can pick between generating a message or calling one or
|
|
24
|
-
# more tools. `required` means the model must call one or more tools before
|
|
25
|
-
# responding to the user.
|
|
26
|
-
module Auto
|
|
27
|
-
extend OpenAI::Internal::Type::Enum
|
|
28
|
-
|
|
29
|
-
NONE = :none
|
|
30
|
-
AUTO = :auto
|
|
31
|
-
REQUIRED = :required
|
|
32
|
-
|
|
33
|
-
# @!method self.values
|
|
34
|
-
# @return [Array<Symbol>]
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# @!method self.variants
|
|
38
|
-
# @return [Array(Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice)]
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
# @see OpenAI::Resources::Beta::Assistants#update
|
|
7
|
-
class AssistantUpdateParams < OpenAI::Internal::Type::BaseModel
|
|
8
|
-
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
9
|
-
include OpenAI::Internal::Type::RequestParameters
|
|
10
|
-
|
|
11
|
-
# @!attribute assistant_id
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :assistant_id, String
|
|
15
|
-
|
|
16
|
-
# @!attribute description
|
|
17
|
-
# The description of the assistant. The maximum length is 512 characters.
|
|
18
|
-
#
|
|
19
|
-
# @return [String, nil]
|
|
20
|
-
optional :description, String, nil?: true
|
|
21
|
-
|
|
22
|
-
# @!attribute instructions
|
|
23
|
-
# The system instructions that the assistant uses. The maximum length is 256,000
|
|
24
|
-
# characters.
|
|
25
|
-
#
|
|
26
|
-
# @return [String, nil]
|
|
27
|
-
optional :instructions, String, nil?: true
|
|
28
|
-
|
|
29
|
-
# @!attribute metadata
|
|
30
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
31
|
-
# for storing additional information about the object in a structured format, and
|
|
32
|
-
# querying for objects via API or the dashboard.
|
|
33
|
-
#
|
|
34
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
35
|
-
# a maximum length of 512 characters.
|
|
36
|
-
#
|
|
37
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
38
|
-
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
39
|
-
|
|
40
|
-
# @!attribute model
|
|
41
|
-
# ID of the model to use. You can use the
|
|
42
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
43
|
-
# API to see all of your available models, or see our
|
|
44
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
45
|
-
# of them.
|
|
46
|
-
#
|
|
47
|
-
# @return [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model, nil]
|
|
48
|
-
optional :model, union: -> { OpenAI::Beta::AssistantUpdateParams::Model }
|
|
49
|
-
|
|
50
|
-
# @!attribute name
|
|
51
|
-
# The name of the assistant. The maximum length is 256 characters.
|
|
52
|
-
#
|
|
53
|
-
# @return [String, nil]
|
|
54
|
-
optional :name, String, nil?: true
|
|
55
|
-
|
|
56
|
-
# @!attribute reasoning_effort
|
|
57
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
58
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
59
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
60
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
61
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
62
|
-
# model-specific support.
|
|
63
|
-
#
|
|
64
|
-
# @return [Symbol, OpenAI::Models::ReasoningEffort, nil]
|
|
65
|
-
optional :reasoning_effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true
|
|
66
|
-
|
|
67
|
-
# @!attribute response_format
|
|
68
|
-
# Specifies the format that the model must output. Compatible with
|
|
69
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
70
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
71
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
72
|
-
#
|
|
73
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
74
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
75
|
-
# in the
|
|
76
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
77
|
-
#
|
|
78
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
79
|
-
# message the model generates is valid JSON.
|
|
80
|
-
#
|
|
81
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
82
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
83
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
84
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
85
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
86
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
87
|
-
# max context length.
|
|
88
|
-
#
|
|
89
|
-
# @return [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
90
|
-
optional :response_format, union: -> { OpenAI::Beta::AssistantResponseFormatOption }, nil?: true
|
|
91
|
-
|
|
92
|
-
# @!attribute temperature
|
|
93
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
94
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
95
|
-
# focused and deterministic.
|
|
96
|
-
#
|
|
97
|
-
# @return [Float, nil]
|
|
98
|
-
optional :temperature, Float, nil?: true
|
|
99
|
-
|
|
100
|
-
# @!attribute tool_resources
|
|
101
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
102
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
103
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
104
|
-
# IDs.
|
|
105
|
-
#
|
|
106
|
-
# @return [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil]
|
|
107
|
-
optional :tool_resources, -> { OpenAI::Beta::AssistantUpdateParams::ToolResources }, nil?: true
|
|
108
|
-
|
|
109
|
-
# @!attribute tools
|
|
110
|
-
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
111
|
-
# assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
112
|
-
# `function`.
|
|
113
|
-
#
|
|
114
|
-
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>, nil]
|
|
115
|
-
optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AssistantTool] }
|
|
116
|
-
|
|
117
|
-
# @!attribute top_p
|
|
118
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
119
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
120
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
121
|
-
#
|
|
122
|
-
# We generally recommend altering this or temperature but not both.
|
|
123
|
-
#
|
|
124
|
-
# @return [Float, nil]
|
|
125
|
-
optional :top_p, Float, nil?: true
|
|
126
|
-
|
|
127
|
-
# @!method initialize(assistant_id:, description: nil, instructions: nil, metadata: nil, model: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {})
|
|
128
|
-
# @param assistant_id [String]
|
|
129
|
-
#
|
|
130
|
-
# @param description [String, nil]
|
|
131
|
-
# The description of the assistant. The maximum length is 512 characters.
|
|
132
|
-
#
|
|
133
|
-
# @param instructions [String, nil]
|
|
134
|
-
# The system instructions that the assistant uses. The maximum length is 256,000
|
|
135
|
-
# characters.
|
|
136
|
-
#
|
|
137
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
138
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
139
|
-
# for storing additional information about the object in a structured format, and
|
|
140
|
-
# querying for objects via API or the dashboard.
|
|
141
|
-
#
|
|
142
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
143
|
-
# a maximum length of 512 characters.
|
|
144
|
-
#
|
|
145
|
-
# @param model [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model]
|
|
146
|
-
# ID of the model to use. You can use the
|
|
147
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
148
|
-
# API to see all of your available models, or see our
|
|
149
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
150
|
-
# of them.
|
|
151
|
-
#
|
|
152
|
-
# @param name [String, nil]
|
|
153
|
-
# The name of the assistant. The maximum length is 256 characters.
|
|
154
|
-
#
|
|
155
|
-
# @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil]
|
|
156
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
157
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
158
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
159
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
160
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
161
|
-
# model-specific support.
|
|
162
|
-
#
|
|
163
|
-
# @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
164
|
-
# Specifies the format that the model must output. Compatible with
|
|
165
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
166
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
167
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
168
|
-
#
|
|
169
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
170
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
171
|
-
# in the
|
|
172
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
173
|
-
#
|
|
174
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
175
|
-
# message the model generates is valid JSON.
|
|
176
|
-
#
|
|
177
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
178
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
179
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
180
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
181
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
182
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
183
|
-
# max context length.
|
|
184
|
-
#
|
|
185
|
-
# @param temperature [Float, nil]
|
|
186
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
187
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
188
|
-
# focused and deterministic.
|
|
189
|
-
#
|
|
190
|
-
# @param tool_resources [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil]
|
|
191
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
192
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
193
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
194
|
-
# IDs.
|
|
195
|
-
#
|
|
196
|
-
# @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>]
|
|
197
|
-
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
198
|
-
# assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
199
|
-
# `function`.
|
|
200
|
-
#
|
|
201
|
-
# @param top_p [Float, nil]
|
|
202
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
203
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
204
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
205
|
-
#
|
|
206
|
-
# We generally recommend altering this or temperature but not both.
|
|
207
|
-
#
|
|
208
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
209
|
-
|
|
210
|
-
# ID of the model to use. You can use the
|
|
211
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
212
|
-
# API to see all of your available models, or see our
|
|
213
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
214
|
-
# of them.
|
|
215
|
-
module Model
|
|
216
|
-
extend OpenAI::Internal::Type::Union
|
|
217
|
-
|
|
218
|
-
variant String
|
|
219
|
-
|
|
220
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_5 }
|
|
221
|
-
|
|
222
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_5_MINI }
|
|
223
|
-
|
|
224
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_5_NANO }
|
|
225
|
-
|
|
226
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_5_2025_08_07 }
|
|
227
|
-
|
|
228
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_5_MINI_2025_08_07 }
|
|
229
|
-
|
|
230
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_5_NANO_2025_08_07 }
|
|
231
|
-
|
|
232
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1 }
|
|
233
|
-
|
|
234
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1_MINI }
|
|
235
|
-
|
|
236
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1_NANO }
|
|
237
|
-
|
|
238
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1_2025_04_14 }
|
|
239
|
-
|
|
240
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1_MINI_2025_04_14 }
|
|
241
|
-
|
|
242
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1_NANO_2025_04_14 }
|
|
243
|
-
|
|
244
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::O3_MINI }
|
|
245
|
-
|
|
246
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::O3_MINI_2025_01_31 }
|
|
247
|
-
|
|
248
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::O1 }
|
|
249
|
-
|
|
250
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::O1_2024_12_17 }
|
|
251
|
-
|
|
252
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4O }
|
|
253
|
-
|
|
254
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4O_2024_11_20 }
|
|
255
|
-
|
|
256
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4O_2024_08_06 }
|
|
257
|
-
|
|
258
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4O_2024_05_13 }
|
|
259
|
-
|
|
260
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4O_MINI }
|
|
261
|
-
|
|
262
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4O_MINI_2024_07_18 }
|
|
263
|
-
|
|
264
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_5_PREVIEW }
|
|
265
|
-
|
|
266
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_5_PREVIEW_2025_02_27 }
|
|
267
|
-
|
|
268
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_TURBO }
|
|
269
|
-
|
|
270
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_TURBO_2024_04_09 }
|
|
271
|
-
|
|
272
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_0125_PREVIEW }
|
|
273
|
-
|
|
274
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_TURBO_PREVIEW }
|
|
275
|
-
|
|
276
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_1106_PREVIEW }
|
|
277
|
-
|
|
278
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_VISION_PREVIEW }
|
|
279
|
-
|
|
280
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4 }
|
|
281
|
-
|
|
282
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_0314 }
|
|
283
|
-
|
|
284
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_0613 }
|
|
285
|
-
|
|
286
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_32K }
|
|
287
|
-
|
|
288
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_32K_0314 }
|
|
289
|
-
|
|
290
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_4_32K_0613 }
|
|
291
|
-
|
|
292
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_3_5_TURBO }
|
|
293
|
-
|
|
294
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_3_5_TURBO_16K }
|
|
295
|
-
|
|
296
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_3_5_TURBO_0613 }
|
|
297
|
-
|
|
298
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_3_5_TURBO_1106 }
|
|
299
|
-
|
|
300
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_3_5_TURBO_0125 }
|
|
301
|
-
|
|
302
|
-
variant const: -> { OpenAI::Models::Beta::AssistantUpdateParams::Model::GPT_3_5_TURBO_16K_0613 }
|
|
303
|
-
|
|
304
|
-
# @!method self.variants
|
|
305
|
-
# @return [Array(String, Symbol)]
|
|
306
|
-
|
|
307
|
-
define_sorbet_constant!(:Variants) do
|
|
308
|
-
T.type_alias { T.any(String, OpenAI::Beta::AssistantUpdateParams::Model::TaggedSymbol) }
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
# @!group
|
|
312
|
-
|
|
313
|
-
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
314
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
315
|
-
# replacements.
|
|
316
|
-
GPT_5 = :"gpt-5"
|
|
317
|
-
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
318
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
319
|
-
# replacements.
|
|
320
|
-
GPT_5_MINI = :"gpt-5-mini"
|
|
321
|
-
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
322
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
323
|
-
# replacements.
|
|
324
|
-
GPT_5_NANO = :"gpt-5-nano"
|
|
325
|
-
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
326
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
327
|
-
# replacements.
|
|
328
|
-
GPT_5_2025_08_07 = :"gpt-5-2025-08-07"
|
|
329
|
-
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
330
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
331
|
-
# replacements.
|
|
332
|
-
GPT_5_MINI_2025_08_07 = :"gpt-5-mini-2025-08-07"
|
|
333
|
-
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
334
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
335
|
-
# replacements.
|
|
336
|
-
GPT_5_NANO_2025_08_07 = :"gpt-5-nano-2025-08-07"
|
|
337
|
-
# @deprecated Announced shutdown date: 2027-01-14. See
|
|
338
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
339
|
-
# replacements.
|
|
340
|
-
GPT_4_1 = :"gpt-4.1"
|
|
341
|
-
# @deprecated Announced shutdown date: 2027-01-14. See
|
|
342
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
343
|
-
# replacements.
|
|
344
|
-
GPT_4_1_MINI = :"gpt-4.1-mini"
|
|
345
|
-
GPT_4_1_NANO = :"gpt-4.1-nano"
|
|
346
|
-
GPT_4_1_2025_04_14 = :"gpt-4.1-2025-04-14"
|
|
347
|
-
GPT_4_1_MINI_2025_04_14 = :"gpt-4.1-mini-2025-04-14"
|
|
348
|
-
GPT_4_1_NANO_2025_04_14 = :"gpt-4.1-nano-2025-04-14"
|
|
349
|
-
O3_MINI = :"o3-mini"
|
|
350
|
-
O3_MINI_2025_01_31 = :"o3-mini-2025-01-31"
|
|
351
|
-
O1 = :o1
|
|
352
|
-
O1_2024_12_17 = :"o1-2024-12-17"
|
|
353
|
-
# @deprecated Announced shutdown date: 2027-01-14. See
|
|
354
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
355
|
-
# replacements.
|
|
356
|
-
GPT_4O = :"gpt-4o"
|
|
357
|
-
GPT_4O_2024_11_20 = :"gpt-4o-2024-11-20"
|
|
358
|
-
GPT_4O_2024_08_06 = :"gpt-4o-2024-08-06"
|
|
359
|
-
GPT_4O_2024_05_13 = :"gpt-4o-2024-05-13"
|
|
360
|
-
# @deprecated Announced shutdown date: 2027-01-14. See
|
|
361
|
-
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
362
|
-
# replacements.
|
|
363
|
-
GPT_4O_MINI = :"gpt-4o-mini"
|
|
364
|
-
GPT_4O_MINI_2024_07_18 = :"gpt-4o-mini-2024-07-18"
|
|
365
|
-
GPT_4_5_PREVIEW = :"gpt-4.5-preview"
|
|
366
|
-
GPT_4_5_PREVIEW_2025_02_27 = :"gpt-4.5-preview-2025-02-27"
|
|
367
|
-
GPT_4_TURBO = :"gpt-4-turbo"
|
|
368
|
-
GPT_4_TURBO_2024_04_09 = :"gpt-4-turbo-2024-04-09"
|
|
369
|
-
GPT_4_0125_PREVIEW = :"gpt-4-0125-preview"
|
|
370
|
-
GPT_4_TURBO_PREVIEW = :"gpt-4-turbo-preview"
|
|
371
|
-
GPT_4_1106_PREVIEW = :"gpt-4-1106-preview"
|
|
372
|
-
GPT_4_VISION_PREVIEW = :"gpt-4-vision-preview"
|
|
373
|
-
GPT_4 = :"gpt-4"
|
|
374
|
-
GPT_4_0314 = :"gpt-4-0314"
|
|
375
|
-
GPT_4_0613 = :"gpt-4-0613"
|
|
376
|
-
GPT_4_32K = :"gpt-4-32k"
|
|
377
|
-
GPT_4_32K_0314 = :"gpt-4-32k-0314"
|
|
378
|
-
GPT_4_32K_0613 = :"gpt-4-32k-0613"
|
|
379
|
-
GPT_3_5_TURBO = :"gpt-3.5-turbo"
|
|
380
|
-
GPT_3_5_TURBO_16K = :"gpt-3.5-turbo-16k"
|
|
381
|
-
GPT_3_5_TURBO_0613 = :"gpt-3.5-turbo-0613"
|
|
382
|
-
GPT_3_5_TURBO_1106 = :"gpt-3.5-turbo-1106"
|
|
383
|
-
GPT_3_5_TURBO_0125 = :"gpt-3.5-turbo-0125"
|
|
384
|
-
GPT_3_5_TURBO_16K_0613 = :"gpt-3.5-turbo-16k-0613"
|
|
385
|
-
|
|
386
|
-
# @!endgroup
|
|
387
|
-
end
|
|
388
|
-
|
|
389
|
-
class ToolResources < OpenAI::Internal::Type::BaseModel
|
|
390
|
-
# @!attribute code_interpreter
|
|
391
|
-
#
|
|
392
|
-
# @return [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources::CodeInterpreter, nil]
|
|
393
|
-
optional :code_interpreter, -> { OpenAI::Beta::AssistantUpdateParams::ToolResources::CodeInterpreter }
|
|
394
|
-
|
|
395
|
-
# @!attribute file_search
|
|
396
|
-
#
|
|
397
|
-
# @return [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources::FileSearch, nil]
|
|
398
|
-
optional :file_search, -> { OpenAI::Beta::AssistantUpdateParams::ToolResources::FileSearch }
|
|
399
|
-
|
|
400
|
-
# @!method initialize(code_interpreter: nil, file_search: nil)
|
|
401
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
402
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
403
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
404
|
-
# IDs.
|
|
405
|
-
#
|
|
406
|
-
# @param code_interpreter [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources::CodeInterpreter]
|
|
407
|
-
# @param file_search [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources::FileSearch]
|
|
408
|
-
|
|
409
|
-
# @see OpenAI::Models::Beta::AssistantUpdateParams::ToolResources#code_interpreter
|
|
410
|
-
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
411
|
-
# @!attribute file_ids
|
|
412
|
-
# Overrides the list of
|
|
413
|
-
# [file](https://developers.openai.com/api/reference/resources/files) IDs made
|
|
414
|
-
# available to the `code_interpreter` tool. There can be a maximum of 20 files
|
|
415
|
-
# associated with the tool.
|
|
416
|
-
#
|
|
417
|
-
# @return [Array<String>, nil]
|
|
418
|
-
optional :file_ids, OpenAI::Internal::Type::ArrayOf[String]
|
|
419
|
-
|
|
420
|
-
# @!method initialize(file_ids: nil)
|
|
421
|
-
# @param file_ids [Array<String>]
|
|
422
|
-
# Overrides the list of
|
|
423
|
-
# [file](https://developers.openai.com/api/reference/resources/files) IDs made
|
|
424
|
-
# available to the `code_interpreter` tool. There can be a maximum of 20 files
|
|
425
|
-
# associated with the tool.
|
|
426
|
-
end
|
|
427
|
-
|
|
428
|
-
# @see OpenAI::Models::Beta::AssistantUpdateParams::ToolResources#file_search
|
|
429
|
-
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
430
|
-
# @!attribute vector_store_ids
|
|
431
|
-
# Overrides the
|
|
432
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
433
|
-
# attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
434
|
-
# the assistant.
|
|
435
|
-
#
|
|
436
|
-
# @return [Array<String>, nil]
|
|
437
|
-
optional :vector_store_ids, OpenAI::Internal::Type::ArrayOf[String]
|
|
438
|
-
|
|
439
|
-
# @!method initialize(vector_store_ids: nil)
|
|
440
|
-
# @param vector_store_ids [Array<String>]
|
|
441
|
-
# Overrides the
|
|
442
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
443
|
-
# attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
444
|
-
# the assistant.
|
|
445
|
-
end
|
|
446
|
-
end
|
|
447
|
-
end
|
|
448
|
-
end
|
|
449
|
-
end
|
|
450
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
class CodeInterpreterTool < OpenAI::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute type
|
|
8
|
-
# The type of tool being defined: `code_interpreter`
|
|
9
|
-
#
|
|
10
|
-
# @return [Symbol, :code_interpreter]
|
|
11
|
-
required :type, const: :code_interpreter
|
|
12
|
-
|
|
13
|
-
# @!method initialize(type: :code_interpreter)
|
|
14
|
-
# @param type [Symbol, :code_interpreter]
|
|
15
|
-
# The type of tool being defined: `code_interpreter`
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|