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,823 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
|
|
6
|
-
module Beta
|
|
7
|
-
|
|
8
|
-
class ThreadCreateParams < 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::ThreadCreateParams,
|
|
16
|
-
OpenAI::Internal::AnyHash
|
|
17
|
-
)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# A list of
|
|
21
|
-
# [messages](https://developers.openai.com/api/docs/assistants/migration) to start
|
|
22
|
-
# the thread with.
|
|
23
|
-
sig { returns(T.nilable(T::Array[OpenAI::Beta::ThreadCreateParams::Message])) }
|
|
24
|
-
attr_reader :messages
|
|
25
|
-
|
|
26
|
-
sig { params(messages: T::Array[OpenAI::Beta::ThreadCreateParams::Message::OrHash]).void }
|
|
27
|
-
attr_writer :messages
|
|
28
|
-
|
|
29
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
30
|
-
# for storing additional information about the object in a structured format, and
|
|
31
|
-
# querying for objects via API or the dashboard.
|
|
32
|
-
#
|
|
33
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
34
|
-
# a maximum length of 512 characters.
|
|
35
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
36
|
-
attr_accessor :metadata
|
|
37
|
-
|
|
38
|
-
# A set of resources that are made available to the assistant's tools in this
|
|
39
|
-
# thread. The resources are specific to the type of tool. For example, the
|
|
40
|
-
# `code_interpreter` tool requires a list of file IDs, while the `file_search`
|
|
41
|
-
# tool requires a list of vector store IDs.
|
|
42
|
-
sig { returns(T.nilable(OpenAI::Beta::ThreadCreateParams::ToolResources)) }
|
|
43
|
-
attr_reader :tool_resources
|
|
44
|
-
|
|
45
|
-
sig { params(tool_resources: T.nilable(OpenAI::Beta::ThreadCreateParams::ToolResources::OrHash)).void }
|
|
46
|
-
attr_writer :tool_resources
|
|
47
|
-
|
|
48
|
-
sig do
|
|
49
|
-
params(
|
|
50
|
-
|
|
51
|
-
messages: T::Array[OpenAI::Beta::ThreadCreateParams::Message::OrHash],
|
|
52
|
-
|
|
53
|
-
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
54
|
-
|
|
55
|
-
tool_resources: T.nilable(OpenAI::Beta::ThreadCreateParams::ToolResources::OrHash),
|
|
56
|
-
|
|
57
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
58
|
-
)
|
|
59
|
-
.returns(T.attached_class)
|
|
60
|
-
end
|
|
61
|
-
def self.new(
|
|
62
|
-
|
|
63
|
-
# A list of
|
|
64
|
-
# [messages](https://developers.openai.com/api/docs/assistants/migration) to start
|
|
65
|
-
# the thread with.
|
|
66
|
-
messages: nil,
|
|
67
|
-
|
|
68
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
69
|
-
# for storing additional information about the object in a structured format, and
|
|
70
|
-
# querying for objects via API or the dashboard.
|
|
71
|
-
#
|
|
72
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
73
|
-
# a maximum length of 512 characters.
|
|
74
|
-
metadata: nil,
|
|
75
|
-
|
|
76
|
-
# A set of resources that are made available to the assistant's tools in this
|
|
77
|
-
# thread. The resources are specific to the type of tool. For example, the
|
|
78
|
-
# `code_interpreter` tool requires a list of file IDs, while the `file_search`
|
|
79
|
-
# tool requires a list of vector store IDs.
|
|
80
|
-
tool_resources: nil,
|
|
81
|
-
|
|
82
|
-
request_options: {}
|
|
83
|
-
)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
sig do
|
|
87
|
-
override.returns(
|
|
88
|
-
{
|
|
89
|
-
messages: T::Array[OpenAI::Beta::ThreadCreateParams::Message],
|
|
90
|
-
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
91
|
-
tool_resources: T.nilable(OpenAI::Beta::ThreadCreateParams::ToolResources),
|
|
92
|
-
request_options: OpenAI::RequestOptions
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
end
|
|
96
|
-
def to_hash
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
class Message < OpenAI::Internal::Type::BaseModel
|
|
100
|
-
OrHash = T.type_alias do
|
|
101
|
-
T.any(
|
|
102
|
-
OpenAI::Beta::ThreadCreateParams::Message,
|
|
103
|
-
OpenAI::Internal::AnyHash
|
|
104
|
-
)
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# The text contents of the message.
|
|
108
|
-
sig { returns(OpenAI::Beta::ThreadCreateParams::Message::Content::Variants) }
|
|
109
|
-
attr_accessor :content
|
|
110
|
-
|
|
111
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
112
|
-
#
|
|
113
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
114
|
-
# most cases to represent user-generated messages.
|
|
115
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
116
|
-
# value to insert messages from the assistant into the conversation.
|
|
117
|
-
sig { returns(OpenAI::Beta::ThreadCreateParams::Message::Role::OrSymbol) }
|
|
118
|
-
attr_accessor :role
|
|
119
|
-
|
|
120
|
-
# A list of files attached to the message, and the tools they should be added to.
|
|
121
|
-
sig { returns(T.nilable(T::Array[OpenAI::Beta::ThreadCreateParams::Message::Attachment])) }
|
|
122
|
-
attr_accessor :attachments
|
|
123
|
-
|
|
124
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
125
|
-
# for storing additional information about the object in a structured format, and
|
|
126
|
-
# querying for objects via API or the dashboard.
|
|
127
|
-
#
|
|
128
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
129
|
-
# a maximum length of 512 characters.
|
|
130
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
131
|
-
attr_accessor :metadata
|
|
132
|
-
|
|
133
|
-
sig do
|
|
134
|
-
params(
|
|
135
|
-
|
|
136
|
-
content: OpenAI::Beta::ThreadCreateParams::Message::Content::Variants,
|
|
137
|
-
|
|
138
|
-
role: OpenAI::Beta::ThreadCreateParams::Message::Role::OrSymbol,
|
|
139
|
-
|
|
140
|
-
attachments: T.nilable(T::Array[OpenAI::Beta::ThreadCreateParams::Message::Attachment::OrHash]),
|
|
141
|
-
|
|
142
|
-
metadata: T.nilable(T::Hash[Symbol, String])
|
|
143
|
-
)
|
|
144
|
-
.returns(T.attached_class)
|
|
145
|
-
end
|
|
146
|
-
def self.new(
|
|
147
|
-
|
|
148
|
-
# The text contents of the message.
|
|
149
|
-
content:,
|
|
150
|
-
|
|
151
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
152
|
-
#
|
|
153
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
154
|
-
# most cases to represent user-generated messages.
|
|
155
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
156
|
-
# value to insert messages from the assistant into the conversation.
|
|
157
|
-
role:,
|
|
158
|
-
|
|
159
|
-
# A list of files attached to the message, and the tools they should be added to.
|
|
160
|
-
attachments: nil,
|
|
161
|
-
|
|
162
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
163
|
-
# for storing additional information about the object in a structured format, and
|
|
164
|
-
# querying for objects via API or the dashboard.
|
|
165
|
-
#
|
|
166
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
167
|
-
# a maximum length of 512 characters.
|
|
168
|
-
|
|
169
|
-
metadata: nil
|
|
170
|
-
)
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
sig do
|
|
174
|
-
override.returns(
|
|
175
|
-
{
|
|
176
|
-
content: OpenAI::Beta::ThreadCreateParams::Message::Content::Variants,
|
|
177
|
-
role: OpenAI::Beta::ThreadCreateParams::Message::Role::OrSymbol,
|
|
178
|
-
attachments: T.nilable(T::Array[OpenAI::Beta::ThreadCreateParams::Message::Attachment]),
|
|
179
|
-
metadata: T.nilable(T::Hash[Symbol, String])
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
end
|
|
183
|
-
def to_hash
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
# The text contents of the message.
|
|
187
|
-
module Content
|
|
188
|
-
extend OpenAI::Internal::Type::Union
|
|
189
|
-
|
|
190
|
-
Variants = T.type_alias {
|
|
191
|
-
T.any(String, T::Array[OpenAI::Beta::Threads::MessageContentPartParam::Variants])
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
sig { override.returns(T::Array[OpenAI::Beta::ThreadCreateParams::Message::Content::Variants]) }
|
|
195
|
-
def self.variants
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
MessageContentPartParamArray = T.let(
|
|
199
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageContentPartParam],
|
|
200
|
-
OpenAI::Internal::Type::Converter
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
206
|
-
#
|
|
207
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
208
|
-
# most cases to represent user-generated messages.
|
|
209
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
210
|
-
# value to insert messages from the assistant into the conversation.
|
|
211
|
-
module Role
|
|
212
|
-
extend OpenAI::Internal::Type::Enum
|
|
213
|
-
|
|
214
|
-
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::ThreadCreateParams::Message::Role) }
|
|
215
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
216
|
-
|
|
217
|
-
USER = T.let(:user, OpenAI::Beta::ThreadCreateParams::Message::Role::TaggedSymbol)
|
|
218
|
-
ASSISTANT = T.let(:assistant, OpenAI::Beta::ThreadCreateParams::Message::Role::TaggedSymbol)
|
|
219
|
-
|
|
220
|
-
sig { override.returns(T::Array[OpenAI::Beta::ThreadCreateParams::Message::Role::TaggedSymbol]) }
|
|
221
|
-
def self.values
|
|
222
|
-
end
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
class Attachment < OpenAI::Internal::Type::BaseModel
|
|
226
|
-
OrHash = T.type_alias do
|
|
227
|
-
T.any(
|
|
228
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment,
|
|
229
|
-
OpenAI::Internal::AnyHash
|
|
230
|
-
)
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
# The ID of the file to attach to the message.
|
|
234
|
-
sig { returns(T.nilable(String)) }
|
|
235
|
-
attr_reader :file_id
|
|
236
|
-
|
|
237
|
-
sig { params(file_id: String).void }
|
|
238
|
-
attr_writer :file_id
|
|
239
|
-
|
|
240
|
-
# The tools to add this file to.
|
|
241
|
-
sig {
|
|
242
|
-
returns(
|
|
243
|
-
T.nilable(
|
|
244
|
-
T::Array[
|
|
245
|
-
T.any(
|
|
246
|
-
OpenAI::Beta::CodeInterpreterTool,
|
|
247
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch
|
|
248
|
-
)
|
|
249
|
-
]
|
|
250
|
-
)
|
|
251
|
-
)
|
|
252
|
-
}
|
|
253
|
-
attr_reader :tools
|
|
254
|
-
|
|
255
|
-
sig {
|
|
256
|
-
params(
|
|
257
|
-
tools: T::Array[
|
|
258
|
-
T.any(
|
|
259
|
-
OpenAI::Beta::CodeInterpreterTool::OrHash,
|
|
260
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch::OrHash
|
|
261
|
-
)
|
|
262
|
-
]
|
|
263
|
-
)
|
|
264
|
-
.void
|
|
265
|
-
}
|
|
266
|
-
attr_writer :tools
|
|
267
|
-
|
|
268
|
-
sig do
|
|
269
|
-
params(
|
|
270
|
-
|
|
271
|
-
file_id: String,
|
|
272
|
-
|
|
273
|
-
tools: T::Array[
|
|
274
|
-
T.any(
|
|
275
|
-
OpenAI::Beta::CodeInterpreterTool::OrHash,
|
|
276
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch::OrHash
|
|
277
|
-
)
|
|
278
|
-
]
|
|
279
|
-
)
|
|
280
|
-
.returns(T.attached_class)
|
|
281
|
-
end
|
|
282
|
-
def self.new(
|
|
283
|
-
|
|
284
|
-
# The ID of the file to attach to the message.
|
|
285
|
-
file_id: nil,
|
|
286
|
-
|
|
287
|
-
# The tools to add this file to.
|
|
288
|
-
|
|
289
|
-
tools: nil
|
|
290
|
-
)
|
|
291
|
-
end
|
|
292
|
-
|
|
293
|
-
sig do
|
|
294
|
-
override.returns(
|
|
295
|
-
{
|
|
296
|
-
file_id: String,
|
|
297
|
-
tools: T::Array[
|
|
298
|
-
T.any(
|
|
299
|
-
OpenAI::Beta::CodeInterpreterTool,
|
|
300
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch
|
|
301
|
-
)
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
)
|
|
305
|
-
end
|
|
306
|
-
def to_hash
|
|
307
|
-
end
|
|
308
|
-
|
|
309
|
-
module Tool
|
|
310
|
-
extend OpenAI::Internal::Type::Union
|
|
311
|
-
|
|
312
|
-
Variants = T.type_alias {
|
|
313
|
-
T.any(
|
|
314
|
-
OpenAI::Beta::CodeInterpreterTool,
|
|
315
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch
|
|
316
|
-
)
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
320
|
-
OrHash = T.type_alias do
|
|
321
|
-
T.any(
|
|
322
|
-
OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::FileSearch,
|
|
323
|
-
OpenAI::Internal::AnyHash
|
|
324
|
-
)
|
|
325
|
-
end
|
|
326
|
-
|
|
327
|
-
# The type of tool being defined: `file_search`
|
|
328
|
-
sig { returns(Symbol) }
|
|
329
|
-
attr_accessor :type
|
|
330
|
-
|
|
331
|
-
sig do
|
|
332
|
-
params(
|
|
333
|
-
|
|
334
|
-
type: Symbol
|
|
335
|
-
)
|
|
336
|
-
.returns(T.attached_class)
|
|
337
|
-
end
|
|
338
|
-
def self.new(
|
|
339
|
-
|
|
340
|
-
# The type of tool being defined: `file_search`
|
|
341
|
-
|
|
342
|
-
type: :file_search
|
|
343
|
-
)
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
sig do
|
|
347
|
-
override.returns(
|
|
348
|
-
{type: Symbol}
|
|
349
|
-
)
|
|
350
|
-
end
|
|
351
|
-
def to_hash
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
sig { override.returns(T::Array[OpenAI::Beta::ThreadCreateParams::Message::Attachment::Tool::Variants]) }
|
|
357
|
-
def self.variants
|
|
358
|
-
end
|
|
359
|
-
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
|
-
end
|
|
363
|
-
|
|
364
|
-
class ToolResources < OpenAI::Internal::Type::BaseModel
|
|
365
|
-
OrHash = T.type_alias do
|
|
366
|
-
T.any(
|
|
367
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources,
|
|
368
|
-
OpenAI::Internal::AnyHash
|
|
369
|
-
)
|
|
370
|
-
end
|
|
371
|
-
|
|
372
|
-
sig { returns(T.nilable(OpenAI::Beta::ThreadCreateParams::ToolResources::CodeInterpreter)) }
|
|
373
|
-
attr_reader :code_interpreter
|
|
374
|
-
|
|
375
|
-
sig {
|
|
376
|
-
params(code_interpreter: OpenAI::Beta::ThreadCreateParams::ToolResources::CodeInterpreter::OrHash).void
|
|
377
|
-
}
|
|
378
|
-
attr_writer :code_interpreter
|
|
379
|
-
|
|
380
|
-
sig { returns(T.nilable(OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch)) }
|
|
381
|
-
attr_reader :file_search
|
|
382
|
-
|
|
383
|
-
sig { params(file_search: OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::OrHash).void }
|
|
384
|
-
attr_writer :file_search
|
|
385
|
-
|
|
386
|
-
# A set of resources that are made available to the assistant's tools in this
|
|
387
|
-
# thread. The resources are specific to the type of tool. For example, the
|
|
388
|
-
# `code_interpreter` tool requires a list of file IDs, while the `file_search`
|
|
389
|
-
# tool requires a list of vector store IDs.
|
|
390
|
-
sig do
|
|
391
|
-
params(
|
|
392
|
-
|
|
393
|
-
code_interpreter: OpenAI::Beta::ThreadCreateParams::ToolResources::CodeInterpreter::OrHash,
|
|
394
|
-
|
|
395
|
-
file_search: OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::OrHash
|
|
396
|
-
)
|
|
397
|
-
.returns(T.attached_class)
|
|
398
|
-
end
|
|
399
|
-
def self.new(
|
|
400
|
-
|
|
401
|
-
code_interpreter: nil,
|
|
402
|
-
|
|
403
|
-
file_search: nil
|
|
404
|
-
)
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
sig do
|
|
408
|
-
override.returns(
|
|
409
|
-
{
|
|
410
|
-
code_interpreter: OpenAI::Beta::ThreadCreateParams::ToolResources::CodeInterpreter,
|
|
411
|
-
file_search: OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch
|
|
412
|
-
}
|
|
413
|
-
)
|
|
414
|
-
end
|
|
415
|
-
def to_hash
|
|
416
|
-
end
|
|
417
|
-
|
|
418
|
-
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
419
|
-
OrHash = T.type_alias do
|
|
420
|
-
T.any(
|
|
421
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::CodeInterpreter,
|
|
422
|
-
OpenAI::Internal::AnyHash
|
|
423
|
-
)
|
|
424
|
-
end
|
|
425
|
-
|
|
426
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
427
|
-
# IDs made available to the `code_interpreter` tool. There can be a maximum of 20
|
|
428
|
-
# files associated with the tool.
|
|
429
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
430
|
-
attr_reader :file_ids
|
|
431
|
-
|
|
432
|
-
sig { params(file_ids: T::Array[String]).void }
|
|
433
|
-
attr_writer :file_ids
|
|
434
|
-
|
|
435
|
-
sig do
|
|
436
|
-
params(
|
|
437
|
-
|
|
438
|
-
file_ids: T::Array[String]
|
|
439
|
-
)
|
|
440
|
-
.returns(T.attached_class)
|
|
441
|
-
end
|
|
442
|
-
def self.new(
|
|
443
|
-
|
|
444
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
445
|
-
# IDs made available to the `code_interpreter` tool. There can be a maximum of 20
|
|
446
|
-
# files associated with the tool.
|
|
447
|
-
|
|
448
|
-
file_ids: nil
|
|
449
|
-
)
|
|
450
|
-
end
|
|
451
|
-
|
|
452
|
-
sig do
|
|
453
|
-
override.returns(
|
|
454
|
-
{file_ids: T::Array[String]}
|
|
455
|
-
)
|
|
456
|
-
end
|
|
457
|
-
def to_hash
|
|
458
|
-
end
|
|
459
|
-
|
|
460
|
-
end
|
|
461
|
-
|
|
462
|
-
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
463
|
-
OrHash = T.type_alias do
|
|
464
|
-
T.any(
|
|
465
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch,
|
|
466
|
-
OpenAI::Internal::AnyHash
|
|
467
|
-
)
|
|
468
|
-
end
|
|
469
|
-
|
|
470
|
-
# The
|
|
471
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
472
|
-
# attached to this thread. There can be a maximum of 1 vector store attached to
|
|
473
|
-
# the thread.
|
|
474
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
475
|
-
attr_reader :vector_store_ids
|
|
476
|
-
|
|
477
|
-
sig { params(vector_store_ids: T::Array[String]).void }
|
|
478
|
-
attr_writer :vector_store_ids
|
|
479
|
-
|
|
480
|
-
# A helper to create a
|
|
481
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
482
|
-
# with file_ids and attach it to this thread. There can be a maximum of 1 vector
|
|
483
|
-
# store attached to the thread.
|
|
484
|
-
sig {
|
|
485
|
-
returns(T.nilable(T::Array[OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore]))
|
|
486
|
-
}
|
|
487
|
-
attr_reader :vector_stores
|
|
488
|
-
|
|
489
|
-
sig {
|
|
490
|
-
params(
|
|
491
|
-
vector_stores: T::Array[
|
|
492
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::OrHash
|
|
493
|
-
]
|
|
494
|
-
)
|
|
495
|
-
.void
|
|
496
|
-
}
|
|
497
|
-
attr_writer :vector_stores
|
|
498
|
-
|
|
499
|
-
sig do
|
|
500
|
-
params(
|
|
501
|
-
|
|
502
|
-
vector_store_ids: T::Array[String],
|
|
503
|
-
|
|
504
|
-
vector_stores: T::Array[
|
|
505
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::OrHash
|
|
506
|
-
]
|
|
507
|
-
)
|
|
508
|
-
.returns(T.attached_class)
|
|
509
|
-
end
|
|
510
|
-
def self.new(
|
|
511
|
-
|
|
512
|
-
# The
|
|
513
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
514
|
-
# attached to this thread. There can be a maximum of 1 vector store attached to
|
|
515
|
-
# the thread.
|
|
516
|
-
vector_store_ids: nil,
|
|
517
|
-
|
|
518
|
-
# A helper to create a
|
|
519
|
-
# [vector store](https://developers.openai.com/api/reference/resources/vector_stores)
|
|
520
|
-
# with file_ids and attach it to this thread. There can be a maximum of 1 vector
|
|
521
|
-
# store attached to the thread.
|
|
522
|
-
|
|
523
|
-
vector_stores: nil
|
|
524
|
-
)
|
|
525
|
-
end
|
|
526
|
-
|
|
527
|
-
sig do
|
|
528
|
-
override.returns(
|
|
529
|
-
{
|
|
530
|
-
vector_store_ids: T::Array[String],
|
|
531
|
-
vector_stores: T::Array[OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore]
|
|
532
|
-
}
|
|
533
|
-
)
|
|
534
|
-
end
|
|
535
|
-
def to_hash
|
|
536
|
-
end
|
|
537
|
-
|
|
538
|
-
class VectorStore < OpenAI::Internal::Type::BaseModel
|
|
539
|
-
OrHash = T.type_alias do
|
|
540
|
-
T.any(
|
|
541
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore,
|
|
542
|
-
OpenAI::Internal::AnyHash
|
|
543
|
-
)
|
|
544
|
-
end
|
|
545
|
-
|
|
546
|
-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
547
|
-
# strategy.
|
|
548
|
-
sig {
|
|
549
|
-
returns(
|
|
550
|
-
T.nilable(
|
|
551
|
-
T.any(
|
|
552
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
553
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
|
554
|
-
)
|
|
555
|
-
)
|
|
556
|
-
)
|
|
557
|
-
}
|
|
558
|
-
attr_reader :chunking_strategy
|
|
559
|
-
|
|
560
|
-
sig {
|
|
561
|
-
params(
|
|
562
|
-
chunking_strategy: T.any(
|
|
563
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto::OrHash,
|
|
564
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::OrHash
|
|
565
|
-
)
|
|
566
|
-
)
|
|
567
|
-
.void
|
|
568
|
-
}
|
|
569
|
-
attr_writer :chunking_strategy
|
|
570
|
-
|
|
571
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
572
|
-
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
573
|
-
# can be a maximum of 10,000 files in a vector store. For vector stores created
|
|
574
|
-
# starting in Nov 2025, the limit is 100,000,000 files.
|
|
575
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
576
|
-
attr_reader :file_ids
|
|
577
|
-
|
|
578
|
-
sig { params(file_ids: T::Array[String]).void }
|
|
579
|
-
attr_writer :file_ids
|
|
580
|
-
|
|
581
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
582
|
-
# for storing additional information about the object in a structured format, and
|
|
583
|
-
# querying for objects via API or the dashboard.
|
|
584
|
-
#
|
|
585
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
586
|
-
# a maximum length of 512 characters.
|
|
587
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
588
|
-
attr_accessor :metadata
|
|
589
|
-
|
|
590
|
-
sig do
|
|
591
|
-
params(
|
|
592
|
-
|
|
593
|
-
chunking_strategy: T.any(
|
|
594
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto::OrHash,
|
|
595
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::OrHash
|
|
596
|
-
),
|
|
597
|
-
|
|
598
|
-
file_ids: T::Array[String],
|
|
599
|
-
|
|
600
|
-
metadata: T.nilable(T::Hash[Symbol, String])
|
|
601
|
-
)
|
|
602
|
-
.returns(T.attached_class)
|
|
603
|
-
end
|
|
604
|
-
def self.new(
|
|
605
|
-
|
|
606
|
-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
607
|
-
# strategy.
|
|
608
|
-
chunking_strategy: nil,
|
|
609
|
-
|
|
610
|
-
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
611
|
-
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
612
|
-
# can be a maximum of 10,000 files in a vector store. For vector stores created
|
|
613
|
-
# starting in Nov 2025, the limit is 100,000,000 files.
|
|
614
|
-
file_ids: nil,
|
|
615
|
-
|
|
616
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
617
|
-
# for storing additional information about the object in a structured format, and
|
|
618
|
-
# querying for objects via API or the dashboard.
|
|
619
|
-
#
|
|
620
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
621
|
-
# a maximum length of 512 characters.
|
|
622
|
-
|
|
623
|
-
metadata: nil
|
|
624
|
-
)
|
|
625
|
-
end
|
|
626
|
-
|
|
627
|
-
sig do
|
|
628
|
-
override.returns(
|
|
629
|
-
{
|
|
630
|
-
chunking_strategy: T.any(
|
|
631
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
632
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
|
633
|
-
),
|
|
634
|
-
file_ids: T::Array[String],
|
|
635
|
-
metadata: T.nilable(T::Hash[Symbol, String])
|
|
636
|
-
}
|
|
637
|
-
)
|
|
638
|
-
end
|
|
639
|
-
def to_hash
|
|
640
|
-
end
|
|
641
|
-
|
|
642
|
-
# The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
643
|
-
# strategy.
|
|
644
|
-
module ChunkingStrategy
|
|
645
|
-
extend OpenAI::Internal::Type::Union
|
|
646
|
-
|
|
647
|
-
Variants = T.type_alias {
|
|
648
|
-
T.any(
|
|
649
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
650
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static
|
|
651
|
-
)
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
class Auto < OpenAI::Internal::Type::BaseModel
|
|
655
|
-
OrHash = T.type_alias do
|
|
656
|
-
T.any(
|
|
657
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Auto,
|
|
658
|
-
OpenAI::Internal::AnyHash
|
|
659
|
-
)
|
|
660
|
-
end
|
|
661
|
-
|
|
662
|
-
# Always `auto`.
|
|
663
|
-
sig { returns(Symbol) }
|
|
664
|
-
attr_accessor :type
|
|
665
|
-
|
|
666
|
-
# The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
667
|
-
# `800` and `chunk_overlap_tokens` of `400`.
|
|
668
|
-
sig do
|
|
669
|
-
params(
|
|
670
|
-
|
|
671
|
-
type: Symbol
|
|
672
|
-
)
|
|
673
|
-
.returns(T.attached_class)
|
|
674
|
-
end
|
|
675
|
-
def self.new(
|
|
676
|
-
|
|
677
|
-
# Always `auto`.
|
|
678
|
-
|
|
679
|
-
type: :auto
|
|
680
|
-
)
|
|
681
|
-
end
|
|
682
|
-
|
|
683
|
-
sig do
|
|
684
|
-
override.returns(
|
|
685
|
-
{type: Symbol}
|
|
686
|
-
)
|
|
687
|
-
end
|
|
688
|
-
def to_hash
|
|
689
|
-
end
|
|
690
|
-
|
|
691
|
-
end
|
|
692
|
-
|
|
693
|
-
class Static < OpenAI::Internal::Type::BaseModel
|
|
694
|
-
OrHash = T.type_alias do
|
|
695
|
-
T.any(
|
|
696
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static,
|
|
697
|
-
OpenAI::Internal::AnyHash
|
|
698
|
-
)
|
|
699
|
-
end
|
|
700
|
-
|
|
701
|
-
sig {
|
|
702
|
-
returns(
|
|
703
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static
|
|
704
|
-
)
|
|
705
|
-
}
|
|
706
|
-
attr_reader :static
|
|
707
|
-
|
|
708
|
-
sig {
|
|
709
|
-
params(
|
|
710
|
-
static: OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static::OrHash
|
|
711
|
-
)
|
|
712
|
-
.void
|
|
713
|
-
}
|
|
714
|
-
attr_writer :static
|
|
715
|
-
|
|
716
|
-
# Always `static`.
|
|
717
|
-
sig { returns(Symbol) }
|
|
718
|
-
attr_accessor :type
|
|
719
|
-
|
|
720
|
-
sig do
|
|
721
|
-
params(
|
|
722
|
-
|
|
723
|
-
static: OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static::OrHash,
|
|
724
|
-
|
|
725
|
-
type: Symbol
|
|
726
|
-
)
|
|
727
|
-
.returns(T.attached_class)
|
|
728
|
-
end
|
|
729
|
-
def self.new(
|
|
730
|
-
|
|
731
|
-
static:,
|
|
732
|
-
|
|
733
|
-
# Always `static`.
|
|
734
|
-
|
|
735
|
-
type: :static
|
|
736
|
-
)
|
|
737
|
-
end
|
|
738
|
-
|
|
739
|
-
sig do
|
|
740
|
-
override.returns(
|
|
741
|
-
{
|
|
742
|
-
static: OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
|
|
743
|
-
type: Symbol
|
|
744
|
-
}
|
|
745
|
-
)
|
|
746
|
-
end
|
|
747
|
-
def to_hash
|
|
748
|
-
end
|
|
749
|
-
|
|
750
|
-
class Static < OpenAI::Internal::Type::BaseModel
|
|
751
|
-
OrHash = T.type_alias do
|
|
752
|
-
T.any(
|
|
753
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Static::Static,
|
|
754
|
-
OpenAI::Internal::AnyHash
|
|
755
|
-
)
|
|
756
|
-
end
|
|
757
|
-
|
|
758
|
-
# The number of tokens that overlap between chunks. The default value is `400`.
|
|
759
|
-
#
|
|
760
|
-
# Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
761
|
-
sig { returns(Integer) }
|
|
762
|
-
attr_accessor :chunk_overlap_tokens
|
|
763
|
-
|
|
764
|
-
# The maximum number of tokens in each chunk. The default value is `800`. The
|
|
765
|
-
# minimum value is `100` and the maximum value is `4096`.
|
|
766
|
-
sig { returns(Integer) }
|
|
767
|
-
attr_accessor :max_chunk_size_tokens
|
|
768
|
-
|
|
769
|
-
sig do
|
|
770
|
-
params(
|
|
771
|
-
|
|
772
|
-
chunk_overlap_tokens: Integer,
|
|
773
|
-
|
|
774
|
-
max_chunk_size_tokens: Integer
|
|
775
|
-
)
|
|
776
|
-
.returns(T.attached_class)
|
|
777
|
-
end
|
|
778
|
-
def self.new(
|
|
779
|
-
|
|
780
|
-
# The number of tokens that overlap between chunks. The default value is `400`.
|
|
781
|
-
#
|
|
782
|
-
# Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
783
|
-
chunk_overlap_tokens:,
|
|
784
|
-
|
|
785
|
-
# The maximum number of tokens in each chunk. The default value is `800`. The
|
|
786
|
-
# minimum value is `100` and the maximum value is `4096`.
|
|
787
|
-
|
|
788
|
-
max_chunk_size_tokens:
|
|
789
|
-
)
|
|
790
|
-
end
|
|
791
|
-
|
|
792
|
-
sig do
|
|
793
|
-
override.returns(
|
|
794
|
-
{chunk_overlap_tokens: Integer, max_chunk_size_tokens: Integer}
|
|
795
|
-
)
|
|
796
|
-
end
|
|
797
|
-
def to_hash
|
|
798
|
-
end
|
|
799
|
-
|
|
800
|
-
end
|
|
801
|
-
end
|
|
802
|
-
|
|
803
|
-
sig {
|
|
804
|
-
override.returns(
|
|
805
|
-
T::Array[
|
|
806
|
-
OpenAI::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::ChunkingStrategy::Variants
|
|
807
|
-
]
|
|
808
|
-
)
|
|
809
|
-
}
|
|
810
|
-
def self.variants
|
|
811
|
-
end
|
|
812
|
-
|
|
813
|
-
end
|
|
814
|
-
end
|
|
815
|
-
end
|
|
816
|
-
end
|
|
817
|
-
|
|
818
|
-
end
|
|
819
|
-
|
|
820
|
-
end
|
|
821
|
-
|
|
822
|
-
end
|
|
823
|
-
end
|