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,776 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
|
|
6
|
-
module Beta
|
|
7
|
-
|
|
8
|
-
class AssistantCreateParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
-
|
|
10
|
-
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
11
|
-
include OpenAI::Internal::Type::RequestParameters
|
|
12
|
-
|
|
13
|
-
OrHash = T.type_alias do
|
|
14
|
-
T.any(
|
|
15
|
-
OpenAI::Beta::AssistantCreateParams,
|
|
16
|
-
OpenAI::Internal::AnyHash
|
|
17
|
-
)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# ID of the model to use. You can use the
|
|
21
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
22
|
-
# API to see all of your available models, or see our
|
|
23
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
24
|
-
# of them.
|
|
25
|
-
sig { returns(T.any(String, OpenAI::ChatModel::OrSymbol)) }
|
|
26
|
-
attr_accessor :model
|
|
27
|
-
|
|
28
|
-
# The description of the assistant. The maximum length is 512 characters.
|
|
29
|
-
sig { returns(T.nilable(String)) }
|
|
30
|
-
attr_accessor :description
|
|
31
|
-
|
|
32
|
-
# The system instructions that the assistant uses. The maximum length is 256,000
|
|
33
|
-
# characters.
|
|
34
|
-
sig { returns(T.nilable(String)) }
|
|
35
|
-
attr_accessor :instructions
|
|
36
|
-
|
|
37
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
38
|
-
# for storing additional information about the object in a structured format, and
|
|
39
|
-
# querying for objects via API or the dashboard.
|
|
40
|
-
#
|
|
41
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
42
|
-
# a maximum length of 512 characters.
|
|
43
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
44
|
-
attr_accessor :metadata
|
|
45
|
-
|
|
46
|
-
# The name of the assistant. The maximum length is 256 characters.
|
|
47
|
-
sig { returns(T.nilable(String)) }
|
|
48
|
-
attr_accessor :name
|
|
49
|
-
|
|
50
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
51
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
52
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
53
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
54
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
55
|
-
# model-specific support.
|
|
56
|
-
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
57
|
-
attr_accessor :reasoning_effort
|
|
58
|
-
|
|
59
|
-
# Specifies the format that the model must output. Compatible with
|
|
60
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
61
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
62
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
63
|
-
#
|
|
64
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
65
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
66
|
-
# in the
|
|
67
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
68
|
-
#
|
|
69
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
70
|
-
# message the model generates is valid JSON.
|
|
71
|
-
#
|
|
72
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
73
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
74
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
75
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
76
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
77
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
78
|
-
# max context length.
|
|
79
|
-
sig {
|
|
80
|
-
returns(
|
|
81
|
-
T.nilable(
|
|
82
|
-
T.any(
|
|
83
|
-
Symbol,
|
|
84
|
-
OpenAI::ResponseFormatText,
|
|
85
|
-
OpenAI::ResponseFormatJSONObject,
|
|
86
|
-
OpenAI::ResponseFormatJSONSchema
|
|
87
|
-
)
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
attr_accessor :response_format
|
|
92
|
-
|
|
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
|
-
sig { returns(T.nilable(Float)) }
|
|
97
|
-
attr_accessor :temperature
|
|
98
|
-
|
|
99
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
100
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
101
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
102
|
-
# IDs.
|
|
103
|
-
sig { returns(T.nilable(OpenAI::Beta::AssistantCreateParams::ToolResources)) }
|
|
104
|
-
attr_reader :tool_resources
|
|
105
|
-
|
|
106
|
-
sig { params(tool_resources: T.nilable(OpenAI::Beta::AssistantCreateParams::ToolResources::OrHash)).void }
|
|
107
|
-
attr_writer :tool_resources
|
|
108
|
-
|
|
109
|
-
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
110
|
-
# assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
111
|
-
# `function`.
|
|
112
|
-
sig {
|
|
113
|
-
returns(
|
|
114
|
-
T.nilable(
|
|
115
|
-
T::Array[
|
|
116
|
-
T.any(OpenAI::Beta::CodeInterpreterTool, OpenAI::Beta::FileSearchTool, OpenAI::Beta::FunctionTool)
|
|
117
|
-
]
|
|
118
|
-
)
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
attr_reader :tools
|
|
122
|
-
|
|
123
|
-
sig {
|
|
124
|
-
params(
|
|
125
|
-
tools: T::Array[
|
|
126
|
-
T.any(
|
|
127
|
-
OpenAI::Beta::CodeInterpreterTool::OrHash,
|
|
128
|
-
OpenAI::Beta::FileSearchTool::OrHash,
|
|
129
|
-
OpenAI::Beta::FunctionTool::OrHash
|
|
130
|
-
)
|
|
131
|
-
]
|
|
132
|
-
)
|
|
133
|
-
.void
|
|
134
|
-
}
|
|
135
|
-
attr_writer :tools
|
|
136
|
-
|
|
137
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
138
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
139
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
140
|
-
#
|
|
141
|
-
# We generally recommend altering this or temperature but not both.
|
|
142
|
-
sig { returns(T.nilable(Float)) }
|
|
143
|
-
attr_accessor :top_p
|
|
144
|
-
|
|
145
|
-
sig do
|
|
146
|
-
params(
|
|
147
|
-
|
|
148
|
-
model: T.any(String, OpenAI::ChatModel::OrSymbol),
|
|
149
|
-
|
|
150
|
-
description: T.nilable(String),
|
|
151
|
-
|
|
152
|
-
instructions: T.nilable(String),
|
|
153
|
-
|
|
154
|
-
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
155
|
-
|
|
156
|
-
name: T.nilable(String),
|
|
157
|
-
|
|
158
|
-
reasoning_effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
|
159
|
-
|
|
160
|
-
response_format: T.nilable(
|
|
161
|
-
T.any(
|
|
162
|
-
Symbol,
|
|
163
|
-
OpenAI::ResponseFormatText::OrHash,
|
|
164
|
-
OpenAI::ResponseFormatJSONObject::OrHash,
|
|
165
|
-
OpenAI::ResponseFormatJSONSchema::OrHash
|
|
166
|
-
)
|
|
167
|
-
),
|
|
168
|
-
|
|
169
|
-
temperature: T.nilable(Float),
|
|
170
|
-
|
|
171
|
-
tool_resources: T.nilable(OpenAI::Beta::AssistantCreateParams::ToolResources::OrHash),
|
|
172
|
-
|
|
173
|
-
tools: T::Array[
|
|
174
|
-
T.any(
|
|
175
|
-
OpenAI::Beta::CodeInterpreterTool::OrHash,
|
|
176
|
-
OpenAI::Beta::FileSearchTool::OrHash,
|
|
177
|
-
OpenAI::Beta::FunctionTool::OrHash
|
|
178
|
-
)
|
|
179
|
-
],
|
|
180
|
-
|
|
181
|
-
top_p: T.nilable(Float),
|
|
182
|
-
|
|
183
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
184
|
-
)
|
|
185
|
-
.returns(T.attached_class)
|
|
186
|
-
end
|
|
187
|
-
def self.new(
|
|
188
|
-
|
|
189
|
-
# ID of the model to use. You can use the
|
|
190
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
191
|
-
# API to see all of your available models, or see our
|
|
192
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
193
|
-
# of them.
|
|
194
|
-
model:,
|
|
195
|
-
|
|
196
|
-
# The description of the assistant. The maximum length is 512 characters.
|
|
197
|
-
description: nil,
|
|
198
|
-
|
|
199
|
-
# The system instructions that the assistant uses. The maximum length is 256,000
|
|
200
|
-
# characters.
|
|
201
|
-
instructions: nil,
|
|
202
|
-
|
|
203
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
204
|
-
# for storing additional information about the object in a structured format, and
|
|
205
|
-
# querying for objects via API or the dashboard.
|
|
206
|
-
#
|
|
207
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
208
|
-
# a maximum length of 512 characters.
|
|
209
|
-
metadata: nil,
|
|
210
|
-
|
|
211
|
-
# The name of the assistant. The maximum length is 256 characters.
|
|
212
|
-
name: nil,
|
|
213
|
-
|
|
214
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
215
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
216
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
217
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
218
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
219
|
-
# model-specific support.
|
|
220
|
-
reasoning_effort: nil,
|
|
221
|
-
|
|
222
|
-
# Specifies the format that the model must output. Compatible with
|
|
223
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
224
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
225
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
226
|
-
#
|
|
227
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
228
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
229
|
-
# in the
|
|
230
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
231
|
-
#
|
|
232
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
233
|
-
# message the model generates is valid JSON.
|
|
234
|
-
#
|
|
235
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
236
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
237
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
238
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
239
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
240
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
241
|
-
# max context length.
|
|
242
|
-
response_format: nil,
|
|
243
|
-
|
|
244
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
245
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
246
|
-
# focused and deterministic.
|
|
247
|
-
temperature: nil,
|
|
248
|
-
|
|
249
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
250
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
251
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
252
|
-
# IDs.
|
|
253
|
-
tool_resources: nil,
|
|
254
|
-
|
|
255
|
-
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
256
|
-
# assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
257
|
-
# `function`.
|
|
258
|
-
tools: nil,
|
|
259
|
-
|
|
260
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
261
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
262
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
263
|
-
#
|
|
264
|
-
# We generally recommend altering this or temperature but not both.
|
|
265
|
-
top_p: nil,
|
|
266
|
-
|
|
267
|
-
request_options: {}
|
|
268
|
-
)
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
sig do
|
|
272
|
-
override.returns(
|
|
273
|
-
{
|
|
274
|
-
model: T.any(String, OpenAI::ChatModel::OrSymbol),
|
|
275
|
-
description: T.nilable(String),
|
|
276
|
-
instructions: T.nilable(String),
|
|
277
|
-
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
278
|
-
name: T.nilable(String),
|
|
279
|
-
reasoning_effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
|
280
|
-
response_format: T.nilable(
|
|
281
|
-
T.any(
|
|
282
|
-
Symbol,
|
|
283
|
-
OpenAI::ResponseFormatText,
|
|
284
|
-
OpenAI::ResponseFormatJSONObject,
|
|
285
|
-
OpenAI::ResponseFormatJSONSchema
|
|
286
|
-
)
|
|
287
|
-
),
|
|
288
|
-
temperature: T.nilable(Float),
|
|
289
|
-
tool_resources: T.nilable(OpenAI::Beta::AssistantCreateParams::ToolResources),
|
|
290
|
-
tools: T::Array[
|
|
291
|
-
T.any(OpenAI::Beta::CodeInterpreterTool, OpenAI::Beta::FileSearchTool, OpenAI::Beta::FunctionTool)
|
|
292
|
-
],
|
|
293
|
-
top_p: T.nilable(Float),
|
|
294
|
-
request_options: OpenAI::RequestOptions
|
|
295
|
-
}
|
|
296
|
-
)
|
|
297
|
-
end
|
|
298
|
-
def to_hash
|
|
299
|
-
end
|
|
300
|
-
|
|
301
|
-
# ID of the model to use. You can use the
|
|
302
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
303
|
-
# API to see all of your available models, or see our
|
|
304
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
305
|
-
# of them.
|
|
306
|
-
module Model
|
|
307
|
-
extend OpenAI::Internal::Type::Union
|
|
308
|
-
|
|
309
|
-
Variants = T.type_alias { T.any(String, OpenAI::ChatModel::TaggedSymbol) }
|
|
310
|
-
|
|
311
|
-
sig { override.returns(T::Array[OpenAI::Beta::AssistantCreateParams::Model::Variants]) }
|
|
312
|
-
def self.variants
|
|
313
|
-
end
|
|
314
|
-
|
|
315
|
-
end
|
|
316
|
-
|
|
317
|
-
class ToolResources < OpenAI::Internal::Type::BaseModel
|
|
318
|
-
OrHash = T.type_alias do
|
|
319
|
-
T.any(
|
|
320
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources,
|
|
321
|
-
OpenAI::Internal::AnyHash
|
|
322
|
-
)
|
|
323
|
-
end
|
|
324
|
-
|
|
325
|
-
sig { returns(T.nilable(OpenAI::Beta::AssistantCreateParams::ToolResources::CodeInterpreter)) }
|
|
326
|
-
attr_reader :code_interpreter
|
|
327
|
-
|
|
328
|
-
sig {
|
|
329
|
-
params(code_interpreter: OpenAI::Beta::AssistantCreateParams::ToolResources::CodeInterpreter::OrHash).void
|
|
330
|
-
}
|
|
331
|
-
attr_writer :code_interpreter
|
|
332
|
-
|
|
333
|
-
sig { returns(T.nilable(OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch)) }
|
|
334
|
-
attr_reader :file_search
|
|
335
|
-
|
|
336
|
-
sig { params(file_search: OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::OrHash).void }
|
|
337
|
-
attr_writer :file_search
|
|
338
|
-
|
|
339
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
340
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
341
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
342
|
-
# IDs.
|
|
343
|
-
sig do
|
|
344
|
-
params(
|
|
345
|
-
|
|
346
|
-
code_interpreter: OpenAI::Beta::AssistantCreateParams::ToolResources::CodeInterpreter::OrHash,
|
|
347
|
-
|
|
348
|
-
file_search: OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::OrHash
|
|
349
|
-
)
|
|
350
|
-
.returns(T.attached_class)
|
|
351
|
-
end
|
|
352
|
-
def self.new(
|
|
353
|
-
|
|
354
|
-
code_interpreter: nil,
|
|
355
|
-
|
|
356
|
-
file_search: nil
|
|
357
|
-
)
|
|
358
|
-
end
|
|
359
|
-
|
|
360
|
-
sig do
|
|
361
|
-
override.returns(
|
|
362
|
-
{
|
|
363
|
-
code_interpreter: OpenAI::Beta::AssistantCreateParams::ToolResources::CodeInterpreter,
|
|
364
|
-
file_search: OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch
|
|
365
|
-
}
|
|
366
|
-
)
|
|
367
|
-
end
|
|
368
|
-
def to_hash
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
372
|
-
OrHash = T.type_alias do
|
|
373
|
-
T.any(
|
|
374
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::CodeInterpreter,
|
|
375
|
-
OpenAI::Internal::AnyHash
|
|
376
|
-
)
|
|
377
|
-
end
|
|
378
|
-
|
|
379
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
380
|
-
# IDs made available to the `code_interpreter` tool. There can be a maximum of 20
|
|
381
|
-
# files associated with the tool.
|
|
382
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
383
|
-
attr_reader :file_ids
|
|
384
|
-
|
|
385
|
-
sig { params(file_ids: T::Array[String]).void }
|
|
386
|
-
attr_writer :file_ids
|
|
387
|
-
|
|
388
|
-
sig do
|
|
389
|
-
params(
|
|
390
|
-
|
|
391
|
-
file_ids: T::Array[String]
|
|
392
|
-
)
|
|
393
|
-
.returns(T.attached_class)
|
|
394
|
-
end
|
|
395
|
-
def self.new(
|
|
396
|
-
|
|
397
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
398
|
-
# IDs made available to the `code_interpreter` tool. There can be a maximum of 20
|
|
399
|
-
# files associated with the tool.
|
|
400
|
-
|
|
401
|
-
file_ids: nil
|
|
402
|
-
)
|
|
403
|
-
end
|
|
404
|
-
|
|
405
|
-
sig do
|
|
406
|
-
override.returns(
|
|
407
|
-
{file_ids: T::Array[String]}
|
|
408
|
-
)
|
|
409
|
-
end
|
|
410
|
-
def to_hash
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
end
|
|
414
|
-
|
|
415
|
-
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
416
|
-
OrHash = T.type_alias do
|
|
417
|
-
T.any(
|
|
418
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch,
|
|
419
|
-
OpenAI::Internal::AnyHash
|
|
420
|
-
)
|
|
421
|
-
end
|
|
422
|
-
|
|
423
|
-
# The
|
|
424
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
425
|
-
# attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
426
|
-
# the assistant.
|
|
427
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
428
|
-
attr_reader :vector_store_ids
|
|
429
|
-
|
|
430
|
-
sig { params(vector_store_ids: T::Array[String]).void }
|
|
431
|
-
attr_writer :vector_store_ids
|
|
432
|
-
|
|
433
|
-
# A helper to create a
|
|
434
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
435
|
-
# with file_ids and attach it to this assistant. There can be a maximum of 1
|
|
436
|
-
# vector store attached to the assistant.
|
|
437
|
-
sig {
|
|
438
|
-
returns(T.nilable(T::Array[OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore]))
|
|
439
|
-
}
|
|
440
|
-
attr_reader :vector_stores
|
|
441
|
-
|
|
442
|
-
sig {
|
|
443
|
-
params(
|
|
444
|
-
vector_stores: T::Array[
|
|
445
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::OrHash
|
|
446
|
-
]
|
|
447
|
-
)
|
|
448
|
-
.void
|
|
449
|
-
}
|
|
450
|
-
attr_writer :vector_stores
|
|
451
|
-
|
|
452
|
-
sig do
|
|
453
|
-
params(
|
|
454
|
-
|
|
455
|
-
vector_store_ids: T::Array[String],
|
|
456
|
-
|
|
457
|
-
vector_stores: T::Array[
|
|
458
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::OrHash
|
|
459
|
-
]
|
|
460
|
-
)
|
|
461
|
-
.returns(T.attached_class)
|
|
462
|
-
end
|
|
463
|
-
def self.new(
|
|
464
|
-
|
|
465
|
-
# The
|
|
466
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
467
|
-
# attached to this assistant. There can be a maximum of 1 vector store attached to
|
|
468
|
-
# the assistant.
|
|
469
|
-
vector_store_ids: nil,
|
|
470
|
-
|
|
471
|
-
# A helper to create a
|
|
472
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
473
|
-
# with file_ids and attach it to this assistant. There can be a maximum of 1
|
|
474
|
-
# vector store attached to the assistant.
|
|
475
|
-
|
|
476
|
-
vector_stores: nil
|
|
477
|
-
)
|
|
478
|
-
end
|
|
479
|
-
|
|
480
|
-
sig do
|
|
481
|
-
override.returns(
|
|
482
|
-
{
|
|
483
|
-
vector_store_ids: T::Array[String],
|
|
484
|
-
vector_stores: T::Array[OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore]
|
|
485
|
-
}
|
|
486
|
-
)
|
|
487
|
-
end
|
|
488
|
-
def to_hash
|
|
489
|
-
end
|
|
490
|
-
|
|
491
|
-
class VectorStore < OpenAI::Internal::Type::BaseModel
|
|
492
|
-
OrHash = T.type_alias do
|
|
493
|
-
T.any(
|
|
494
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore,
|
|
495
|
-
OpenAI::Internal::AnyHash
|
|
496
|
-
)
|
|
497
|
-
end
|
|
498
|
-
|
|
499
|
-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
500
|
-
# strategy.
|
|
501
|
-
sig {
|
|
502
|
-
returns(
|
|
503
|
-
T.nilable(
|
|
504
|
-
T.any(
|
|
505
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
506
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
|
507
|
-
)
|
|
508
|
-
)
|
|
509
|
-
)
|
|
510
|
-
}
|
|
511
|
-
attr_reader :chunking_strategy
|
|
512
|
-
|
|
513
|
-
sig {
|
|
514
|
-
params(
|
|
515
|
-
chunking_strategy: T.any(
|
|
516
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto::OrHash,
|
|
517
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::OrHash
|
|
518
|
-
)
|
|
519
|
-
)
|
|
520
|
-
.void
|
|
521
|
-
}
|
|
522
|
-
attr_writer :chunking_strategy
|
|
523
|
-
|
|
524
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
525
|
-
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
526
|
-
# can be a maximum of 10,000 files in a vector store. For vector stores created
|
|
527
|
-
# starting in Nov 2025, the limit is 100,000,000 files.
|
|
528
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
529
|
-
attr_reader :file_ids
|
|
530
|
-
|
|
531
|
-
sig { params(file_ids: T::Array[String]).void }
|
|
532
|
-
attr_writer :file_ids
|
|
533
|
-
|
|
534
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
535
|
-
# for storing additional information about the object in a structured format, and
|
|
536
|
-
# querying for objects via API or the dashboard.
|
|
537
|
-
#
|
|
538
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
539
|
-
# a maximum length of 512 characters.
|
|
540
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
541
|
-
attr_accessor :metadata
|
|
542
|
-
|
|
543
|
-
sig do
|
|
544
|
-
params(
|
|
545
|
-
|
|
546
|
-
chunking_strategy: T.any(
|
|
547
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto::OrHash,
|
|
548
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::OrHash
|
|
549
|
-
),
|
|
550
|
-
|
|
551
|
-
file_ids: T::Array[String],
|
|
552
|
-
|
|
553
|
-
metadata: T.nilable(T::Hash[Symbol, String])
|
|
554
|
-
)
|
|
555
|
-
.returns(T.attached_class)
|
|
556
|
-
end
|
|
557
|
-
def self.new(
|
|
558
|
-
|
|
559
|
-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
560
|
-
# strategy.
|
|
561
|
-
chunking_strategy: nil,
|
|
562
|
-
|
|
563
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
564
|
-
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
565
|
-
# can be a maximum of 10,000 files in a vector store. For vector stores created
|
|
566
|
-
# starting in Nov 2025, the limit is 100,000,000 files.
|
|
567
|
-
file_ids: nil,
|
|
568
|
-
|
|
569
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
570
|
-
# for storing additional information about the object in a structured format, and
|
|
571
|
-
# querying for objects via API or the dashboard.
|
|
572
|
-
#
|
|
573
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
574
|
-
# a maximum length of 512 characters.
|
|
575
|
-
|
|
576
|
-
metadata: nil
|
|
577
|
-
)
|
|
578
|
-
end
|
|
579
|
-
|
|
580
|
-
sig do
|
|
581
|
-
override.returns(
|
|
582
|
-
{
|
|
583
|
-
chunking_strategy: T.any(
|
|
584
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
585
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
|
586
|
-
),
|
|
587
|
-
file_ids: T::Array[String],
|
|
588
|
-
metadata: T.nilable(T::Hash[Symbol, String])
|
|
589
|
-
}
|
|
590
|
-
)
|
|
591
|
-
end
|
|
592
|
-
def to_hash
|
|
593
|
-
end
|
|
594
|
-
|
|
595
|
-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
596
|
-
# strategy.
|
|
597
|
-
module ChunkingStrategy
|
|
598
|
-
extend OpenAI::Internal::Type::Union
|
|
599
|
-
|
|
600
|
-
Variants = T.type_alias {
|
|
601
|
-
T.any(
|
|
602
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
603
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
|
604
|
-
)
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
class Auto < OpenAI::Internal::Type::BaseModel
|
|
608
|
-
OrHash = T.type_alias do
|
|
609
|
-
T.any(
|
|
610
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
611
|
-
OpenAI::Internal::AnyHash
|
|
612
|
-
)
|
|
613
|
-
end
|
|
614
|
-
|
|
615
|
-
# Always `auto`.
|
|
616
|
-
sig { returns(Symbol) }
|
|
617
|
-
attr_accessor :type
|
|
618
|
-
|
|
619
|
-
# The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
620
|
-
# `800` and `chunk_overlap_tokens` of `400`.
|
|
621
|
-
sig do
|
|
622
|
-
params(
|
|
623
|
-
|
|
624
|
-
type: Symbol
|
|
625
|
-
)
|
|
626
|
-
.returns(T.attached_class)
|
|
627
|
-
end
|
|
628
|
-
def self.new(
|
|
629
|
-
|
|
630
|
-
# Always `auto`.
|
|
631
|
-
|
|
632
|
-
type: :auto
|
|
633
|
-
)
|
|
634
|
-
end
|
|
635
|
-
|
|
636
|
-
sig do
|
|
637
|
-
override.returns(
|
|
638
|
-
{type: Symbol}
|
|
639
|
-
)
|
|
640
|
-
end
|
|
641
|
-
def to_hash
|
|
642
|
-
end
|
|
643
|
-
|
|
644
|
-
end
|
|
645
|
-
|
|
646
|
-
class Static < OpenAI::Internal::Type::BaseModel
|
|
647
|
-
OrHash = T.type_alias do
|
|
648
|
-
T.any(
|
|
649
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static,
|
|
650
|
-
OpenAI::Internal::AnyHash
|
|
651
|
-
)
|
|
652
|
-
end
|
|
653
|
-
|
|
654
|
-
sig {
|
|
655
|
-
returns(
|
|
656
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static
|
|
657
|
-
)
|
|
658
|
-
}
|
|
659
|
-
attr_reader :static
|
|
660
|
-
|
|
661
|
-
sig {
|
|
662
|
-
params(
|
|
663
|
-
static: OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static::OrHash
|
|
664
|
-
)
|
|
665
|
-
.void
|
|
666
|
-
}
|
|
667
|
-
attr_writer :static
|
|
668
|
-
|
|
669
|
-
# Always `static`.
|
|
670
|
-
sig { returns(Symbol) }
|
|
671
|
-
attr_accessor :type
|
|
672
|
-
|
|
673
|
-
sig do
|
|
674
|
-
params(
|
|
675
|
-
|
|
676
|
-
static: OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static::OrHash,
|
|
677
|
-
|
|
678
|
-
type: Symbol
|
|
679
|
-
)
|
|
680
|
-
.returns(T.attached_class)
|
|
681
|
-
end
|
|
682
|
-
def self.new(
|
|
683
|
-
|
|
684
|
-
static:,
|
|
685
|
-
|
|
686
|
-
# Always `static`.
|
|
687
|
-
|
|
688
|
-
type: :static
|
|
689
|
-
)
|
|
690
|
-
end
|
|
691
|
-
|
|
692
|
-
sig do
|
|
693
|
-
override.returns(
|
|
694
|
-
{
|
|
695
|
-
static: OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
|
|
696
|
-
type: Symbol
|
|
697
|
-
}
|
|
698
|
-
)
|
|
699
|
-
end
|
|
700
|
-
def to_hash
|
|
701
|
-
end
|
|
702
|
-
|
|
703
|
-
class Static < OpenAI::Internal::Type::BaseModel
|
|
704
|
-
OrHash = T.type_alias do
|
|
705
|
-
T.any(
|
|
706
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
|
|
707
|
-
OpenAI::Internal::AnyHash
|
|
708
|
-
)
|
|
709
|
-
end
|
|
710
|
-
|
|
711
|
-
# The number of tokens that overlap between chunks. The default value is `400`.
|
|
712
|
-
#
|
|
713
|
-
# Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
714
|
-
sig { returns(Integer) }
|
|
715
|
-
attr_accessor :chunk_overlap_tokens
|
|
716
|
-
|
|
717
|
-
# The maximum number of tokens in each chunk. The default value is `800`. The
|
|
718
|
-
# minimum value is `100` and the maximum value is `4096`.
|
|
719
|
-
sig { returns(Integer) }
|
|
720
|
-
attr_accessor :max_chunk_size_tokens
|
|
721
|
-
|
|
722
|
-
sig do
|
|
723
|
-
params(
|
|
724
|
-
|
|
725
|
-
chunk_overlap_tokens: Integer,
|
|
726
|
-
|
|
727
|
-
max_chunk_size_tokens: Integer
|
|
728
|
-
)
|
|
729
|
-
.returns(T.attached_class)
|
|
730
|
-
end
|
|
731
|
-
def self.new(
|
|
732
|
-
|
|
733
|
-
# The number of tokens that overlap between chunks. The default value is `400`.
|
|
734
|
-
#
|
|
735
|
-
# Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
736
|
-
chunk_overlap_tokens:,
|
|
737
|
-
|
|
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
|
-
|
|
741
|
-
max_chunk_size_tokens:
|
|
742
|
-
)
|
|
743
|
-
end
|
|
744
|
-
|
|
745
|
-
sig do
|
|
746
|
-
override.returns(
|
|
747
|
-
{chunk_overlap_tokens: Integer, max_chunk_size_tokens: Integer}
|
|
748
|
-
)
|
|
749
|
-
end
|
|
750
|
-
def to_hash
|
|
751
|
-
end
|
|
752
|
-
|
|
753
|
-
end
|
|
754
|
-
end
|
|
755
|
-
|
|
756
|
-
sig {
|
|
757
|
-
override.returns(
|
|
758
|
-
T::Array[
|
|
759
|
-
OpenAI::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Variants
|
|
760
|
-
]
|
|
761
|
-
)
|
|
762
|
-
}
|
|
763
|
-
def self.variants
|
|
764
|
-
end
|
|
765
|
-
|
|
766
|
-
end
|
|
767
|
-
end
|
|
768
|
-
end
|
|
769
|
-
end
|
|
770
|
-
|
|
771
|
-
end
|
|
772
|
-
|
|
773
|
-
end
|
|
774
|
-
|
|
775
|
-
end
|
|
776
|
-
end
|