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,565 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
module Threads
|
|
7
|
-
# @see OpenAI::Resources::Beta::Threads::Runs#create
|
|
8
|
-
#
|
|
9
|
-
# @see OpenAI::Resources::Beta::Threads::Runs#create_stream_raw
|
|
10
|
-
class RunCreateParams < OpenAI::Internal::Type::BaseModel
|
|
11
|
-
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
12
|
-
include OpenAI::Internal::Type::RequestParameters
|
|
13
|
-
|
|
14
|
-
# @!attribute thread_id
|
|
15
|
-
#
|
|
16
|
-
# @return [String]
|
|
17
|
-
required :thread_id, String
|
|
18
|
-
|
|
19
|
-
# @!attribute assistant_id
|
|
20
|
-
# The ID of the
|
|
21
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) to use
|
|
22
|
-
# to execute this run.
|
|
23
|
-
#
|
|
24
|
-
# @return [String]
|
|
25
|
-
required :assistant_id, String
|
|
26
|
-
|
|
27
|
-
# @!attribute include
|
|
28
|
-
# A list of additional fields to include in the response. Currently the only
|
|
29
|
-
# supported value is `step_details.tool_calls[*].file_search.results[*].content`
|
|
30
|
-
# to fetch the file search result content.
|
|
31
|
-
#
|
|
32
|
-
# See the
|
|
33
|
-
# [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization)
|
|
34
|
-
# for more information.
|
|
35
|
-
#
|
|
36
|
-
# @return [Array<Symbol, OpenAI::Models::Beta::Threads::Runs::RunStepInclude>, nil]
|
|
37
|
-
optional(
|
|
38
|
-
:include,
|
|
39
|
-
-> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::Threads::Runs::RunStepInclude] }
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
# @!attribute additional_instructions
|
|
43
|
-
# Appends additional instructions at the end of the instructions for the run. This
|
|
44
|
-
# is useful for modifying the behavior on a per-run basis without overriding other
|
|
45
|
-
# instructions.
|
|
46
|
-
#
|
|
47
|
-
# @return [String, nil]
|
|
48
|
-
optional :additional_instructions, String, nil?: true
|
|
49
|
-
|
|
50
|
-
# @!attribute additional_messages
|
|
51
|
-
# Adds additional messages to the thread before creating the run.
|
|
52
|
-
#
|
|
53
|
-
# @return [Array<OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage>, nil]
|
|
54
|
-
optional(
|
|
55
|
-
:additional_messages,
|
|
56
|
-
-> {
|
|
57
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage]
|
|
58
|
-
},
|
|
59
|
-
nil?: true
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
# @!attribute instructions
|
|
63
|
-
# Overrides the
|
|
64
|
-
# [instructions](https://developers.openai.com/api/docs/assistants/migration) of
|
|
65
|
-
# the assistant. This is useful for modifying the behavior on a per-run basis.
|
|
66
|
-
#
|
|
67
|
-
# @return [String, nil]
|
|
68
|
-
optional :instructions, String, nil?: true
|
|
69
|
-
|
|
70
|
-
# @!attribute max_completion_tokens
|
|
71
|
-
# The maximum number of completion tokens that may be used over the course of the
|
|
72
|
-
# run. The run will make a best effort to use only the number of completion tokens
|
|
73
|
-
# specified, across multiple turns of the run. If the run exceeds the number of
|
|
74
|
-
# completion tokens specified, the run will end with status `incomplete`. See
|
|
75
|
-
# `incomplete_details` for more info.
|
|
76
|
-
#
|
|
77
|
-
# @return [Integer, nil]
|
|
78
|
-
optional :max_completion_tokens, Integer, nil?: true
|
|
79
|
-
|
|
80
|
-
# @!attribute max_prompt_tokens
|
|
81
|
-
# The maximum number of prompt tokens that may be used over the course of the run.
|
|
82
|
-
# The run will make a best effort to use only the number of prompt tokens
|
|
83
|
-
# specified, across multiple turns of the run. If the run exceeds the number of
|
|
84
|
-
# prompt tokens specified, the run will end with status `incomplete`. See
|
|
85
|
-
# `incomplete_details` for more info.
|
|
86
|
-
#
|
|
87
|
-
# @return [Integer, nil]
|
|
88
|
-
optional :max_prompt_tokens, Integer, nil?: true
|
|
89
|
-
|
|
90
|
-
# @!attribute metadata
|
|
91
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
92
|
-
# for storing additional information about the object in a structured format, and
|
|
93
|
-
# querying for objects via API or the dashboard.
|
|
94
|
-
#
|
|
95
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
96
|
-
# a maximum length of 512 characters.
|
|
97
|
-
#
|
|
98
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
99
|
-
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
100
|
-
|
|
101
|
-
# @!attribute model
|
|
102
|
-
# The ID of the
|
|
103
|
-
# [Model](https://developers.openai.com/api/reference/resources/models) to be used
|
|
104
|
-
# to execute this run. If a value is provided here, it will override the model
|
|
105
|
-
# associated with the assistant. If not, the model associated with the assistant
|
|
106
|
-
# will be used.
|
|
107
|
-
#
|
|
108
|
-
# @return [String, Symbol, OpenAI::Models::ChatModel, nil]
|
|
109
|
-
optional :model, union: -> { OpenAI::Beta::Threads::RunCreateParams::Model }, nil?: true
|
|
110
|
-
|
|
111
|
-
# @!attribute parallel_tool_calls
|
|
112
|
-
# Whether to enable
|
|
113
|
-
# [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
|
|
114
|
-
# during tool use.
|
|
115
|
-
#
|
|
116
|
-
# @return [Boolean, nil]
|
|
117
|
-
optional :parallel_tool_calls, OpenAI::Internal::Type::Boolean
|
|
118
|
-
|
|
119
|
-
# @!attribute reasoning_effort
|
|
120
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
121
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
122
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
123
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
124
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
125
|
-
# model-specific support.
|
|
126
|
-
#
|
|
127
|
-
# @return [Symbol, OpenAI::Models::ReasoningEffort, nil]
|
|
128
|
-
optional :reasoning_effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true
|
|
129
|
-
|
|
130
|
-
# @!attribute response_format
|
|
131
|
-
# Specifies the format that the model must output. Compatible with
|
|
132
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
133
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
134
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
135
|
-
#
|
|
136
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
137
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
138
|
-
# in the
|
|
139
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
140
|
-
#
|
|
141
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
142
|
-
# message the model generates is valid JSON.
|
|
143
|
-
#
|
|
144
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
145
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
146
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
147
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
148
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
149
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
150
|
-
# max context length.
|
|
151
|
-
#
|
|
152
|
-
# @return [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
153
|
-
optional :response_format, union: -> { OpenAI::Beta::AssistantResponseFormatOption }, nil?: true
|
|
154
|
-
|
|
155
|
-
# @!attribute temperature
|
|
156
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
157
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
158
|
-
# focused and deterministic.
|
|
159
|
-
#
|
|
160
|
-
# @return [Float, nil]
|
|
161
|
-
optional :temperature, Float, nil?: true
|
|
162
|
-
|
|
163
|
-
# @!attribute tool_choice
|
|
164
|
-
# Controls which (if any) tool is called by the model. `none` means the model will
|
|
165
|
-
# not call any tools and instead generates a message. `auto` is the default value
|
|
166
|
-
# and means the model can pick between generating a message or calling one or more
|
|
167
|
-
# tools. `required` means the model must call one or more tools before responding
|
|
168
|
-
# to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
|
169
|
-
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
|
170
|
-
# call that tool.
|
|
171
|
-
#
|
|
172
|
-
# @return [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil]
|
|
173
|
-
optional :tool_choice, union: -> { OpenAI::Beta::AssistantToolChoiceOption }, nil?: true
|
|
174
|
-
|
|
175
|
-
# @!attribute tools
|
|
176
|
-
# Override the tools the assistant can use for this run. This is useful for
|
|
177
|
-
# modifying the behavior on a per-run basis.
|
|
178
|
-
#
|
|
179
|
-
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>, nil]
|
|
180
|
-
optional(
|
|
181
|
-
:tools,
|
|
182
|
-
-> {
|
|
183
|
-
OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AssistantTool]
|
|
184
|
-
},
|
|
185
|
-
nil?: true
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
# @!attribute top_p
|
|
189
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
190
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
191
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
192
|
-
#
|
|
193
|
-
# We generally recommend altering this or temperature but not both.
|
|
194
|
-
#
|
|
195
|
-
# @return [Float, nil]
|
|
196
|
-
optional :top_p, Float, nil?: true
|
|
197
|
-
|
|
198
|
-
# @!attribute truncation_strategy
|
|
199
|
-
# Controls for how a thread will be truncated prior to the run. Use this to
|
|
200
|
-
# control the initial context window of the run.
|
|
201
|
-
#
|
|
202
|
-
# @return [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil]
|
|
203
|
-
optional(
|
|
204
|
-
:truncation_strategy,
|
|
205
|
-
-> { OpenAI::Beta::Threads::RunCreateParams::TruncationStrategy },
|
|
206
|
-
nil?: true
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
# @!method initialize(thread_id:, assistant_id:, include: nil, additional_instructions: nil, additional_messages: nil, instructions: nil, max_completion_tokens: nil, max_prompt_tokens: nil, metadata: nil, model: nil, parallel_tool_calls: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_choice: nil, tools: nil, top_p: nil, truncation_strategy: nil, request_options: {})
|
|
210
|
-
# @param thread_id [String]
|
|
211
|
-
#
|
|
212
|
-
# @param assistant_id [String]
|
|
213
|
-
# The ID of the
|
|
214
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) to use
|
|
215
|
-
# to execute this run.
|
|
216
|
-
#
|
|
217
|
-
# @param include [Array<Symbol, OpenAI::Models::Beta::Threads::Runs::RunStepInclude>]
|
|
218
|
-
# A list of additional fields to include in the response. Currently the only
|
|
219
|
-
# supported value is `step_details.tool_calls[*].file_search.results[*].content`
|
|
220
|
-
# to fetch the file search result content.
|
|
221
|
-
#
|
|
222
|
-
# See the
|
|
223
|
-
# [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization)
|
|
224
|
-
# for more information.
|
|
225
|
-
#
|
|
226
|
-
# @param additional_instructions [String, nil]
|
|
227
|
-
# Appends additional instructions at the end of the instructions for the run. This
|
|
228
|
-
# is useful for modifying the behavior on a per-run basis without overriding other
|
|
229
|
-
# instructions.
|
|
230
|
-
#
|
|
231
|
-
# @param additional_messages [Array<OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage>, nil]
|
|
232
|
-
# Adds additional messages to the thread before creating the run.
|
|
233
|
-
#
|
|
234
|
-
# @param instructions [String, nil]
|
|
235
|
-
# Overrides the
|
|
236
|
-
# [instructions](https://developers.openai.com/api/docs/assistants/migration) of
|
|
237
|
-
# the assistant. This is useful for modifying the behavior on a per-run basis.
|
|
238
|
-
#
|
|
239
|
-
# @param max_completion_tokens [Integer, nil]
|
|
240
|
-
# The maximum number of completion tokens that may be used over the course of the
|
|
241
|
-
# run. The run will make a best effort to use only the number of completion tokens
|
|
242
|
-
# specified, across multiple turns of the run. If the run exceeds the number of
|
|
243
|
-
# completion tokens specified, the run will end with status `incomplete`. See
|
|
244
|
-
# `incomplete_details` for more info.
|
|
245
|
-
#
|
|
246
|
-
# @param max_prompt_tokens [Integer, nil]
|
|
247
|
-
# The maximum number of prompt tokens that may be used over the course of the run.
|
|
248
|
-
# The run will make a best effort to use only the number of prompt tokens
|
|
249
|
-
# specified, across multiple turns of the run. If the run exceeds the number of
|
|
250
|
-
# prompt tokens specified, the run will end with status `incomplete`. See
|
|
251
|
-
# `incomplete_details` for more info.
|
|
252
|
-
#
|
|
253
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
254
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
255
|
-
# for storing additional information about the object in a structured format, and
|
|
256
|
-
# querying for objects via API or the dashboard.
|
|
257
|
-
#
|
|
258
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
259
|
-
# a maximum length of 512 characters.
|
|
260
|
-
#
|
|
261
|
-
# @param model [String, Symbol, OpenAI::Models::ChatModel, nil]
|
|
262
|
-
# The ID of the
|
|
263
|
-
# [Model](https://developers.openai.com/api/reference/resources/models) to be used
|
|
264
|
-
# to execute this run. If a value is provided here, it will override the model
|
|
265
|
-
# associated with the assistant. If not, the model associated with the assistant
|
|
266
|
-
# will be used.
|
|
267
|
-
#
|
|
268
|
-
# @param parallel_tool_calls [Boolean]
|
|
269
|
-
# Whether to enable
|
|
270
|
-
# [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
|
|
271
|
-
# during tool use.
|
|
272
|
-
#
|
|
273
|
-
# @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil]
|
|
274
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
275
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
276
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
277
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
278
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
279
|
-
# model-specific support.
|
|
280
|
-
#
|
|
281
|
-
# @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
282
|
-
# Specifies the format that the model must output. Compatible with
|
|
283
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
284
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
285
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
286
|
-
#
|
|
287
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
288
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
289
|
-
# in the
|
|
290
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
291
|
-
#
|
|
292
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
293
|
-
# message the model generates is valid JSON.
|
|
294
|
-
#
|
|
295
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
296
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
297
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
298
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
299
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
300
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
301
|
-
# max context length.
|
|
302
|
-
#
|
|
303
|
-
# @param temperature [Float, nil]
|
|
304
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
305
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
306
|
-
# focused and deterministic.
|
|
307
|
-
#
|
|
308
|
-
# @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil]
|
|
309
|
-
# Controls which (if any) tool is called by the model. `none` means the model will
|
|
310
|
-
# not call any tools and instead generates a message. `auto` is the default value
|
|
311
|
-
# and means the model can pick between generating a message or calling one or more
|
|
312
|
-
# tools. `required` means the model must call one or more tools before responding
|
|
313
|
-
# to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
|
314
|
-
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
|
315
|
-
# call that tool.
|
|
316
|
-
#
|
|
317
|
-
# @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>, nil]
|
|
318
|
-
# Override the tools the assistant can use for this run. This is useful for
|
|
319
|
-
# modifying the behavior on a per-run basis.
|
|
320
|
-
#
|
|
321
|
-
# @param top_p [Float, nil]
|
|
322
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
323
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
324
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
325
|
-
#
|
|
326
|
-
# We generally recommend altering this or temperature but not both.
|
|
327
|
-
#
|
|
328
|
-
# @param truncation_strategy [OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy, nil]
|
|
329
|
-
# Controls for how a thread will be truncated prior to the run. Use this to
|
|
330
|
-
# control the initial context window of the run.
|
|
331
|
-
#
|
|
332
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
333
|
-
|
|
334
|
-
class AdditionalMessage < OpenAI::Internal::Type::BaseModel
|
|
335
|
-
# @!attribute content
|
|
336
|
-
# The text contents of the message.
|
|
337
|
-
#
|
|
338
|
-
# @return [String, Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlockParam>]
|
|
339
|
-
required :content, union: -> { OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Content }
|
|
340
|
-
|
|
341
|
-
# @!attribute role
|
|
342
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
343
|
-
#
|
|
344
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
345
|
-
# most cases to represent user-generated messages.
|
|
346
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
347
|
-
# value to insert messages from the assistant into the conversation.
|
|
348
|
-
#
|
|
349
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Role]
|
|
350
|
-
required :role, enum: -> { OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Role }
|
|
351
|
-
|
|
352
|
-
# @!attribute attachments
|
|
353
|
-
# A list of files attached to the message, and the tools they should be added to.
|
|
354
|
-
#
|
|
355
|
-
# @return [Array<OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment>, nil]
|
|
356
|
-
optional(
|
|
357
|
-
:attachments,
|
|
358
|
-
-> {
|
|
359
|
-
OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment]
|
|
360
|
-
},
|
|
361
|
-
nil?: true
|
|
362
|
-
)
|
|
363
|
-
|
|
364
|
-
# @!attribute metadata
|
|
365
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
366
|
-
# for storing additional information about the object in a structured format, and
|
|
367
|
-
# querying for objects via API or the dashboard.
|
|
368
|
-
#
|
|
369
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
370
|
-
# a maximum length of 512 characters.
|
|
371
|
-
#
|
|
372
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
373
|
-
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
374
|
-
|
|
375
|
-
# @!method initialize(content:, role:, attachments: nil, metadata: nil)
|
|
376
|
-
# @param content [String, Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlockParam>]
|
|
377
|
-
# The text contents of the message.
|
|
378
|
-
#
|
|
379
|
-
# @param role [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Role]
|
|
380
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
381
|
-
#
|
|
382
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
383
|
-
# most cases to represent user-generated messages.
|
|
384
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
385
|
-
# value to insert messages from the assistant into the conversation.
|
|
386
|
-
#
|
|
387
|
-
# @param attachments [Array<OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment>, nil]
|
|
388
|
-
# A list of files attached to the message, and the tools they should be added to.
|
|
389
|
-
#
|
|
390
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
391
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
392
|
-
# for storing additional information about the object in a structured format, and
|
|
393
|
-
# querying for objects via API or the dashboard.
|
|
394
|
-
#
|
|
395
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
396
|
-
# a maximum length of 512 characters.
|
|
397
|
-
|
|
398
|
-
# The text contents of the message.
|
|
399
|
-
#
|
|
400
|
-
# @see OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage#content
|
|
401
|
-
module Content
|
|
402
|
-
extend OpenAI::Internal::Type::Union
|
|
403
|
-
|
|
404
|
-
# The text contents of the message.
|
|
405
|
-
variant String
|
|
406
|
-
|
|
407
|
-
# An array of content parts with a defined type, each can be of type `text` or images can be passed with `image_url` or `image_file`. Image types are only supported on [Vision-compatible models](https://developers.openai.com/api/docs/models).
|
|
408
|
-
variant(
|
|
409
|
-
-> {
|
|
410
|
-
OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Content::MessageContentPartParamArray
|
|
411
|
-
}
|
|
412
|
-
)
|
|
413
|
-
|
|
414
|
-
# @!method self.variants
|
|
415
|
-
# @return [Array(String, Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlockParam>)]
|
|
416
|
-
|
|
417
|
-
# @type [OpenAI::Internal::Type::Converter]
|
|
418
|
-
MessageContentPartParamArray = OpenAI::Internal::Type::ArrayOf[
|
|
419
|
-
union: -> { OpenAI::Beta::Threads::MessageContentPartParam }
|
|
420
|
-
]
|
|
421
|
-
end
|
|
422
|
-
|
|
423
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
424
|
-
#
|
|
425
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
426
|
-
# most cases to represent user-generated messages.
|
|
427
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
428
|
-
# value to insert messages from the assistant into the conversation.
|
|
429
|
-
#
|
|
430
|
-
# @see OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage#role
|
|
431
|
-
module Role
|
|
432
|
-
extend OpenAI::Internal::Type::Enum
|
|
433
|
-
|
|
434
|
-
USER = :user
|
|
435
|
-
ASSISTANT = :assistant
|
|
436
|
-
|
|
437
|
-
# @!method self.values
|
|
438
|
-
# @return [Array<Symbol>]
|
|
439
|
-
end
|
|
440
|
-
|
|
441
|
-
class Attachment < OpenAI::Internal::Type::BaseModel
|
|
442
|
-
# @!attribute file_id
|
|
443
|
-
# The ID of the file to attach to the message.
|
|
444
|
-
#
|
|
445
|
-
# @return [String, nil]
|
|
446
|
-
optional :file_id, String
|
|
447
|
-
|
|
448
|
-
# @!attribute tools
|
|
449
|
-
# The tools to add this file to.
|
|
450
|
-
#
|
|
451
|
-
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch>, nil]
|
|
452
|
-
optional(
|
|
453
|
-
:tools,
|
|
454
|
-
-> {
|
|
455
|
-
OpenAI::Internal::Type::ArrayOf[
|
|
456
|
-
union: OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
)
|
|
460
|
-
|
|
461
|
-
# @!method initialize(file_id: nil, tools: nil)
|
|
462
|
-
# @param file_id [String]
|
|
463
|
-
# The ID of the file to attach to the message.
|
|
464
|
-
#
|
|
465
|
-
# @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch>]
|
|
466
|
-
# The tools to add this file to.
|
|
467
|
-
module Tool
|
|
468
|
-
extend OpenAI::Internal::Type::Union
|
|
469
|
-
|
|
470
|
-
discriminator :type
|
|
471
|
-
|
|
472
|
-
variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }
|
|
473
|
-
|
|
474
|
-
variant(
|
|
475
|
-
:file_search,
|
|
476
|
-
-> { OpenAI::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch }
|
|
477
|
-
)
|
|
478
|
-
|
|
479
|
-
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
480
|
-
# @!attribute type
|
|
481
|
-
# The type of tool being defined: `file_search`
|
|
482
|
-
#
|
|
483
|
-
# @return [Symbol, :file_search]
|
|
484
|
-
required :type, const: :file_search
|
|
485
|
-
|
|
486
|
-
# @!method initialize(type: :file_search)
|
|
487
|
-
# @param type [Symbol, :file_search]
|
|
488
|
-
# The type of tool being defined: `file_search`
|
|
489
|
-
end
|
|
490
|
-
|
|
491
|
-
# @!method self.variants
|
|
492
|
-
# @return [Array(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::Tool::FileSearch)]
|
|
493
|
-
end
|
|
494
|
-
end
|
|
495
|
-
end
|
|
496
|
-
|
|
497
|
-
# The ID of the
|
|
498
|
-
# [Model](https://developers.openai.com/api/reference/resources/models) to be used
|
|
499
|
-
# to execute this run. If a value is provided here, it will override the model
|
|
500
|
-
# associated with the assistant. If not, the model associated with the assistant
|
|
501
|
-
# will be used.
|
|
502
|
-
module Model
|
|
503
|
-
extend OpenAI::Internal::Type::Union
|
|
504
|
-
|
|
505
|
-
variant String
|
|
506
|
-
|
|
507
|
-
# The ID of the [Model](https://developers.openai.com/api/reference/resources/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.
|
|
508
|
-
variant enum: -> { OpenAI::ChatModel }
|
|
509
|
-
|
|
510
|
-
# @!method self.variants
|
|
511
|
-
# @return [Array(String, Symbol, OpenAI::Models::ChatModel)]
|
|
512
|
-
end
|
|
513
|
-
|
|
514
|
-
class TruncationStrategy < OpenAI::Internal::Type::BaseModel
|
|
515
|
-
# @!attribute type
|
|
516
|
-
# The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
517
|
-
# `last_messages`, the thread will be truncated to the n most recent messages in
|
|
518
|
-
# the thread. When set to `auto`, messages in the middle of the thread will be
|
|
519
|
-
# dropped to fit the context length of the model, `max_prompt_tokens`.
|
|
520
|
-
#
|
|
521
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type]
|
|
522
|
-
required :type, enum: -> { OpenAI::Beta::Threads::RunCreateParams::TruncationStrategy::Type }
|
|
523
|
-
|
|
524
|
-
# @!attribute last_messages
|
|
525
|
-
# The number of most recent messages from the thread when constructing the context
|
|
526
|
-
# for the run.
|
|
527
|
-
#
|
|
528
|
-
# @return [Integer, nil]
|
|
529
|
-
optional :last_messages, Integer, nil?: true
|
|
530
|
-
|
|
531
|
-
# @!method initialize(type:, last_messages: nil)
|
|
532
|
-
# Controls for how a thread will be truncated prior to the run. Use this to
|
|
533
|
-
# control the initial context window of the run.
|
|
534
|
-
#
|
|
535
|
-
# @param type [Symbol, OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy::Type]
|
|
536
|
-
# The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
537
|
-
# `last_messages`, the thread will be truncated to the n most recent messages in
|
|
538
|
-
# the thread. When set to `auto`, messages in the middle of the thread will be
|
|
539
|
-
# dropped to fit the context length of the model, `max_prompt_tokens`.
|
|
540
|
-
#
|
|
541
|
-
# @param last_messages [Integer, nil]
|
|
542
|
-
# The number of most recent messages from the thread when constructing the context
|
|
543
|
-
# for the run.
|
|
544
|
-
|
|
545
|
-
# The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
546
|
-
# `last_messages`, the thread will be truncated to the n most recent messages in
|
|
547
|
-
# the thread. When set to `auto`, messages in the middle of the thread will be
|
|
548
|
-
# dropped to fit the context length of the model, `max_prompt_tokens`.
|
|
549
|
-
#
|
|
550
|
-
# @see OpenAI::Models::Beta::Threads::RunCreateParams::TruncationStrategy#type
|
|
551
|
-
module Type
|
|
552
|
-
extend OpenAI::Internal::Type::Enum
|
|
553
|
-
|
|
554
|
-
AUTO = :auto
|
|
555
|
-
LAST_MESSAGES = :last_messages
|
|
556
|
-
|
|
557
|
-
# @!method self.values
|
|
558
|
-
# @return [Array<Symbol>]
|
|
559
|
-
end
|
|
560
|
-
end
|
|
561
|
-
end
|
|
562
|
-
end
|
|
563
|
-
end
|
|
564
|
-
end
|
|
565
|
-
end
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module Beta
|
|
6
|
-
module Threads
|
|
7
|
-
# @see OpenAI::Resources::Beta::Threads::Runs#list
|
|
8
|
-
class RunListParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
-
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
10
|
-
include OpenAI::Internal::Type::RequestParameters
|
|
11
|
-
|
|
12
|
-
# @!attribute thread_id
|
|
13
|
-
#
|
|
14
|
-
# @return [String]
|
|
15
|
-
required :thread_id, String
|
|
16
|
-
|
|
17
|
-
# @!attribute after
|
|
18
|
-
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
19
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
20
|
-
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
21
|
-
# fetch the next page of the list.
|
|
22
|
-
#
|
|
23
|
-
# @return [String, nil]
|
|
24
|
-
optional :after, String
|
|
25
|
-
|
|
26
|
-
# @!attribute before
|
|
27
|
-
# A cursor for use in pagination. `before` is an object ID that defines your place
|
|
28
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
29
|
-
# starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
30
|
-
# to fetch the previous page of the list.
|
|
31
|
-
#
|
|
32
|
-
# @return [String, nil]
|
|
33
|
-
optional :before, String
|
|
34
|
-
|
|
35
|
-
# @!attribute limit
|
|
36
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
37
|
-
# 100, and the default is 20.
|
|
38
|
-
#
|
|
39
|
-
# @return [Integer, nil]
|
|
40
|
-
optional :limit, Integer
|
|
41
|
-
|
|
42
|
-
# @!attribute order
|
|
43
|
-
# Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
44
|
-
# order and `desc` for descending order.
|
|
45
|
-
#
|
|
46
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::RunListParams::Order, nil]
|
|
47
|
-
optional :order, enum: -> { OpenAI::Beta::Threads::RunListParams::Order }
|
|
48
|
-
|
|
49
|
-
# @!method initialize(thread_id:, after: nil, before: nil, limit: nil, order: nil, request_options: {})
|
|
50
|
-
# @param thread_id [String]
|
|
51
|
-
#
|
|
52
|
-
# @param after [String]
|
|
53
|
-
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
54
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
55
|
-
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
56
|
-
# fetch the next page of the list.
|
|
57
|
-
#
|
|
58
|
-
# @param before [String]
|
|
59
|
-
# A cursor for use in pagination. `before` is an object ID that defines your place
|
|
60
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
61
|
-
# starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
62
|
-
# to fetch the previous page of the list.
|
|
63
|
-
#
|
|
64
|
-
# @param limit [Integer]
|
|
65
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
66
|
-
# 100, and the default is 20.
|
|
67
|
-
#
|
|
68
|
-
# @param order [Symbol, OpenAI::Models::Beta::Threads::RunListParams::Order]
|
|
69
|
-
# Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
70
|
-
# order and `desc` for descending order.
|
|
71
|
-
#
|
|
72
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
73
|
-
|
|
74
|
-
# Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
75
|
-
# order and `desc` for descending order.
|
|
76
|
-
module Order
|
|
77
|
-
extend OpenAI::Internal::Type::Enum
|
|
78
|
-
|
|
79
|
-
ASC = :asc
|
|
80
|
-
DESC = :desc
|
|
81
|
-
|
|
82
|
-
# @!method self.values
|
|
83
|
-
# @return [Array<Symbol>]
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|