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,557 +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 Run < OpenAI::Internal::Type::BaseModel
|
|
11
|
-
# @!attribute id
|
|
12
|
-
# The identifier, which can be referenced in API endpoints.
|
|
13
|
-
#
|
|
14
|
-
# @return [String]
|
|
15
|
-
required :id, String
|
|
16
|
-
|
|
17
|
-
# @!attribute assistant_id
|
|
18
|
-
# The ID of the
|
|
19
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
20
|
-
# for execution of this run.
|
|
21
|
-
#
|
|
22
|
-
# @return [String]
|
|
23
|
-
required :assistant_id, String
|
|
24
|
-
|
|
25
|
-
# @!attribute cancelled_at
|
|
26
|
-
# The Unix timestamp (in seconds) for when the run was cancelled.
|
|
27
|
-
#
|
|
28
|
-
# @return [Integer, nil]
|
|
29
|
-
required :cancelled_at, Integer, nil?: true
|
|
30
|
-
|
|
31
|
-
# @!attribute completed_at
|
|
32
|
-
# The Unix timestamp (in seconds) for when the run was completed.
|
|
33
|
-
#
|
|
34
|
-
# @return [Integer, nil]
|
|
35
|
-
required :completed_at, Integer, nil?: true
|
|
36
|
-
|
|
37
|
-
# @!attribute created_at
|
|
38
|
-
# The Unix timestamp (in seconds) for when the run was created.
|
|
39
|
-
#
|
|
40
|
-
# @return [Integer]
|
|
41
|
-
required :created_at, Integer
|
|
42
|
-
|
|
43
|
-
# @!attribute expires_at
|
|
44
|
-
# The Unix timestamp (in seconds) for when the run will expire.
|
|
45
|
-
#
|
|
46
|
-
# @return [Integer, nil]
|
|
47
|
-
required :expires_at, Integer, nil?: true
|
|
48
|
-
|
|
49
|
-
# @!attribute failed_at
|
|
50
|
-
# The Unix timestamp (in seconds) for when the run failed.
|
|
51
|
-
#
|
|
52
|
-
# @return [Integer, nil]
|
|
53
|
-
required :failed_at, Integer, nil?: true
|
|
54
|
-
|
|
55
|
-
# @!attribute incomplete_details
|
|
56
|
-
# Details on why the run is incomplete. Will be `null` if the run is not
|
|
57
|
-
# incomplete.
|
|
58
|
-
#
|
|
59
|
-
# @return [OpenAI::Models::Beta::Threads::Run::IncompleteDetails, nil]
|
|
60
|
-
required :incomplete_details, -> { OpenAI::Beta::Threads::Run::IncompleteDetails }, nil?: true
|
|
61
|
-
|
|
62
|
-
# @!attribute instructions
|
|
63
|
-
# The instructions that the
|
|
64
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
65
|
-
# for this run.
|
|
66
|
-
#
|
|
67
|
-
# @return [String]
|
|
68
|
-
required :instructions, String
|
|
69
|
-
|
|
70
|
-
# @!attribute last_error
|
|
71
|
-
# The last error associated with this run. Will be `null` if there are no errors.
|
|
72
|
-
#
|
|
73
|
-
# @return [OpenAI::Models::Beta::Threads::Run::LastError, nil]
|
|
74
|
-
required :last_error, -> { OpenAI::Beta::Threads::Run::LastError }, nil?: true
|
|
75
|
-
|
|
76
|
-
# @!attribute max_completion_tokens
|
|
77
|
-
# The maximum number of completion tokens specified to have been used over the
|
|
78
|
-
# course of the run.
|
|
79
|
-
#
|
|
80
|
-
# @return [Integer, nil]
|
|
81
|
-
required :max_completion_tokens, Integer, nil?: true
|
|
82
|
-
|
|
83
|
-
# @!attribute max_prompt_tokens
|
|
84
|
-
# The maximum number of prompt tokens specified to have been used over the course
|
|
85
|
-
# of the run.
|
|
86
|
-
#
|
|
87
|
-
# @return [Integer, nil]
|
|
88
|
-
required :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
|
-
required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
100
|
-
|
|
101
|
-
# @!attribute model
|
|
102
|
-
# The model that the
|
|
103
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
104
|
-
# for this run.
|
|
105
|
-
#
|
|
106
|
-
# @return [String]
|
|
107
|
-
required :model, String
|
|
108
|
-
|
|
109
|
-
# @!attribute object
|
|
110
|
-
# The object type, which is always `thread.run`.
|
|
111
|
-
#
|
|
112
|
-
# @return [Symbol, :"thread.run"]
|
|
113
|
-
required :object, const: :"thread.run"
|
|
114
|
-
|
|
115
|
-
# @!attribute parallel_tool_calls
|
|
116
|
-
# Whether to enable
|
|
117
|
-
# [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
|
|
118
|
-
# during tool use.
|
|
119
|
-
#
|
|
120
|
-
# @return [Boolean]
|
|
121
|
-
required :parallel_tool_calls, OpenAI::Internal::Type::Boolean
|
|
122
|
-
|
|
123
|
-
# @!attribute required_action
|
|
124
|
-
# Details on the action required to continue the run. Will be `null` if no action
|
|
125
|
-
# is required.
|
|
126
|
-
#
|
|
127
|
-
# @return [OpenAI::Models::Beta::Threads::Run::RequiredAction, nil]
|
|
128
|
-
required :required_action, -> { OpenAI::Beta::Threads::Run::RequiredAction }, 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
|
-
required :response_format, union: -> { OpenAI::Beta::AssistantResponseFormatOption }, nil?: true
|
|
154
|
-
|
|
155
|
-
# @!attribute started_at
|
|
156
|
-
# The Unix timestamp (in seconds) for when the run was started.
|
|
157
|
-
#
|
|
158
|
-
# @return [Integer, nil]
|
|
159
|
-
required :started_at, Integer, nil?: true
|
|
160
|
-
|
|
161
|
-
# @!attribute status
|
|
162
|
-
# The status of the run, which can be either `queued`, `in_progress`,
|
|
163
|
-
# `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
|
164
|
-
# `incomplete`, or `expired`.
|
|
165
|
-
#
|
|
166
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::RunStatus]
|
|
167
|
-
required :status, enum: -> { OpenAI::Beta::Threads::RunStatus }
|
|
168
|
-
|
|
169
|
-
# @!attribute thread_id
|
|
170
|
-
# The ID of the
|
|
171
|
-
# [thread](https://developers.openai.com/api/docs/assistants/migration) that was
|
|
172
|
-
# executed on as a part of this run.
|
|
173
|
-
#
|
|
174
|
-
# @return [String]
|
|
175
|
-
required :thread_id, String
|
|
176
|
-
|
|
177
|
-
# @!attribute tool_choice
|
|
178
|
-
# Controls which (if any) tool is called by the model. `none` means the model will
|
|
179
|
-
# not call any tools and instead generates a message. `auto` is the default value
|
|
180
|
-
# and means the model can pick between generating a message or calling one or more
|
|
181
|
-
# tools. `required` means the model must call one or more tools before responding
|
|
182
|
-
# to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
|
183
|
-
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
|
184
|
-
# call that tool.
|
|
185
|
-
#
|
|
186
|
-
# @return [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil]
|
|
187
|
-
required :tool_choice, union: -> { OpenAI::Beta::AssistantToolChoiceOption }, nil?: true
|
|
188
|
-
|
|
189
|
-
# @!attribute tools
|
|
190
|
-
# The list of tools that the
|
|
191
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
192
|
-
# for this run.
|
|
193
|
-
#
|
|
194
|
-
# @return [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>]
|
|
195
|
-
required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AssistantTool] }
|
|
196
|
-
|
|
197
|
-
# @!attribute truncation_strategy
|
|
198
|
-
# Controls for how a thread will be truncated prior to the run. Use this to
|
|
199
|
-
# control the initial context window of the run.
|
|
200
|
-
#
|
|
201
|
-
# @return [OpenAI::Models::Beta::Threads::Run::TruncationStrategy, nil]
|
|
202
|
-
required :truncation_strategy, -> { OpenAI::Beta::Threads::Run::TruncationStrategy }, nil?: true
|
|
203
|
-
|
|
204
|
-
# @!attribute usage
|
|
205
|
-
# Usage statistics related to the run. This value will be `null` if the run is not
|
|
206
|
-
# in a terminal state (i.e. `in_progress`, `queued`, etc.).
|
|
207
|
-
#
|
|
208
|
-
# @return [OpenAI::Models::Beta::Threads::Run::Usage, nil]
|
|
209
|
-
required :usage, -> { OpenAI::Beta::Threads::Run::Usage }, nil?: true
|
|
210
|
-
|
|
211
|
-
# @!attribute temperature
|
|
212
|
-
# The sampling temperature used for this run. If not set, defaults to 1.
|
|
213
|
-
#
|
|
214
|
-
# @return [Float, nil]
|
|
215
|
-
optional :temperature, Float, nil?: true
|
|
216
|
-
|
|
217
|
-
# @!attribute top_p
|
|
218
|
-
# The nucleus sampling value used for this run. If not set, defaults to 1.
|
|
219
|
-
#
|
|
220
|
-
# @return [Float, nil]
|
|
221
|
-
optional :top_p, Float, nil?: true
|
|
222
|
-
|
|
223
|
-
# @!method initialize(id:, assistant_id:, cancelled_at:, completed_at:, created_at:, expires_at:, failed_at:, incomplete_details:, instructions:, last_error:, max_completion_tokens:, max_prompt_tokens:, metadata:, model:, parallel_tool_calls:, required_action:, response_format:, started_at:, status:, thread_id:, tool_choice:, tools:, truncation_strategy:, usage:, temperature: nil, top_p: nil, object: :"thread.run")
|
|
224
|
-
# Represents an execution run on a
|
|
225
|
-
# [thread](https://developers.openai.com/api/docs/assistants/migration).
|
|
226
|
-
#
|
|
227
|
-
# @param id [String]
|
|
228
|
-
# The identifier, which can be referenced in API endpoints.
|
|
229
|
-
#
|
|
230
|
-
# @param assistant_id [String]
|
|
231
|
-
# The ID of the
|
|
232
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
233
|
-
# for execution of this run.
|
|
234
|
-
#
|
|
235
|
-
# @param cancelled_at [Integer, nil]
|
|
236
|
-
# The Unix timestamp (in seconds) for when the run was cancelled.
|
|
237
|
-
#
|
|
238
|
-
# @param completed_at [Integer, nil]
|
|
239
|
-
# The Unix timestamp (in seconds) for when the run was completed.
|
|
240
|
-
#
|
|
241
|
-
# @param created_at [Integer]
|
|
242
|
-
# The Unix timestamp (in seconds) for when the run was created.
|
|
243
|
-
#
|
|
244
|
-
# @param expires_at [Integer, nil]
|
|
245
|
-
# The Unix timestamp (in seconds) for when the run will expire.
|
|
246
|
-
#
|
|
247
|
-
# @param failed_at [Integer, nil]
|
|
248
|
-
# The Unix timestamp (in seconds) for when the run failed.
|
|
249
|
-
#
|
|
250
|
-
# @param incomplete_details [OpenAI::Models::Beta::Threads::Run::IncompleteDetails, nil]
|
|
251
|
-
# Details on why the run is incomplete. Will be `null` if the run is not
|
|
252
|
-
# incomplete.
|
|
253
|
-
#
|
|
254
|
-
# @param instructions [String]
|
|
255
|
-
# The instructions that the
|
|
256
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
257
|
-
# for this run.
|
|
258
|
-
#
|
|
259
|
-
# @param last_error [OpenAI::Models::Beta::Threads::Run::LastError, nil]
|
|
260
|
-
# The last error associated with this run. Will be `null` if there are no errors.
|
|
261
|
-
#
|
|
262
|
-
# @param max_completion_tokens [Integer, nil]
|
|
263
|
-
# The maximum number of completion tokens specified to have been used over the
|
|
264
|
-
# course of the run.
|
|
265
|
-
#
|
|
266
|
-
# @param max_prompt_tokens [Integer, nil]
|
|
267
|
-
# The maximum number of prompt tokens specified to have been used over the course
|
|
268
|
-
# of the run.
|
|
269
|
-
#
|
|
270
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
271
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
272
|
-
# for storing additional information about the object in a structured format, and
|
|
273
|
-
# querying for objects via API or the dashboard.
|
|
274
|
-
#
|
|
275
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
276
|
-
# a maximum length of 512 characters.
|
|
277
|
-
#
|
|
278
|
-
# @param model [String]
|
|
279
|
-
# The model that the
|
|
280
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
281
|
-
# for this run.
|
|
282
|
-
#
|
|
283
|
-
# @param parallel_tool_calls [Boolean]
|
|
284
|
-
# Whether to enable
|
|
285
|
-
# [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
|
|
286
|
-
# during tool use.
|
|
287
|
-
#
|
|
288
|
-
# @param required_action [OpenAI::Models::Beta::Threads::Run::RequiredAction, nil]
|
|
289
|
-
# Details on the action required to continue the run. Will be `null` if no action
|
|
290
|
-
# is required.
|
|
291
|
-
#
|
|
292
|
-
# @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
293
|
-
# Specifies the format that the model must output. Compatible with
|
|
294
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
295
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
296
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
297
|
-
#
|
|
298
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
299
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
300
|
-
# in the
|
|
301
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
302
|
-
#
|
|
303
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
304
|
-
# message the model generates is valid JSON.
|
|
305
|
-
#
|
|
306
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
307
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
308
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
309
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
310
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
311
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
312
|
-
# max context length.
|
|
313
|
-
#
|
|
314
|
-
# @param started_at [Integer, nil]
|
|
315
|
-
# The Unix timestamp (in seconds) for when the run was started.
|
|
316
|
-
#
|
|
317
|
-
# @param status [Symbol, OpenAI::Models::Beta::Threads::RunStatus]
|
|
318
|
-
# The status of the run, which can be either `queued`, `in_progress`,
|
|
319
|
-
# `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
|
320
|
-
# `incomplete`, or `expired`.
|
|
321
|
-
#
|
|
322
|
-
# @param thread_id [String]
|
|
323
|
-
# The ID of the
|
|
324
|
-
# [thread](https://developers.openai.com/api/docs/assistants/migration) that was
|
|
325
|
-
# executed on as a part of this run.
|
|
326
|
-
#
|
|
327
|
-
# @param tool_choice [Symbol, OpenAI::Models::Beta::AssistantToolChoiceOption::Auto, OpenAI::Models::Beta::AssistantToolChoice, nil]
|
|
328
|
-
# Controls which (if any) tool is called by the model. `none` means the model will
|
|
329
|
-
# not call any tools and instead generates a message. `auto` is the default value
|
|
330
|
-
# and means the model can pick between generating a message or calling one or more
|
|
331
|
-
# tools. `required` means the model must call one or more tools before responding
|
|
332
|
-
# to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
|
333
|
-
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
|
334
|
-
# call that tool.
|
|
335
|
-
#
|
|
336
|
-
# @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>]
|
|
337
|
-
# The list of tools that the
|
|
338
|
-
# [assistant](https://developers.openai.com/api/docs/assistants/migration) used
|
|
339
|
-
# for this run.
|
|
340
|
-
#
|
|
341
|
-
# @param truncation_strategy [OpenAI::Models::Beta::Threads::Run::TruncationStrategy, nil]
|
|
342
|
-
# Controls for how a thread will be truncated prior to the run. Use this to
|
|
343
|
-
# control the initial context window of the run.
|
|
344
|
-
#
|
|
345
|
-
# @param usage [OpenAI::Models::Beta::Threads::Run::Usage, nil]
|
|
346
|
-
# Usage statistics related to the run. This value will be `null` if the run is not
|
|
347
|
-
# in a terminal state (i.e. `in_progress`, `queued`, etc.).
|
|
348
|
-
#
|
|
349
|
-
# @param temperature [Float, nil]
|
|
350
|
-
# The sampling temperature used for this run. If not set, defaults to 1.
|
|
351
|
-
#
|
|
352
|
-
# @param top_p [Float, nil]
|
|
353
|
-
# The nucleus sampling value used for this run. If not set, defaults to 1.
|
|
354
|
-
#
|
|
355
|
-
# @param object [Symbol, :"thread.run"]
|
|
356
|
-
# The object type, which is always `thread.run`.
|
|
357
|
-
|
|
358
|
-
# @see OpenAI::Models::Beta::Threads::Run#incomplete_details
|
|
359
|
-
class IncompleteDetails < OpenAI::Internal::Type::BaseModel
|
|
360
|
-
# @!attribute reason
|
|
361
|
-
# The reason why the run is incomplete. This will point to which specific token
|
|
362
|
-
# limit was reached over the course of the run.
|
|
363
|
-
#
|
|
364
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::Run::IncompleteDetails::Reason, nil]
|
|
365
|
-
optional :reason, enum: -> { OpenAI::Beta::Threads::Run::IncompleteDetails::Reason }
|
|
366
|
-
|
|
367
|
-
# @!method initialize(reason: nil)
|
|
368
|
-
# Details on why the run is incomplete. Will be `null` if the run is not
|
|
369
|
-
# incomplete.
|
|
370
|
-
#
|
|
371
|
-
# @param reason [Symbol, OpenAI::Models::Beta::Threads::Run::IncompleteDetails::Reason]
|
|
372
|
-
# The reason why the run is incomplete. This will point to which specific token
|
|
373
|
-
# limit was reached over the course of the run.
|
|
374
|
-
|
|
375
|
-
# The reason why the run is incomplete. This will point to which specific token
|
|
376
|
-
# limit was reached over the course of the run.
|
|
377
|
-
#
|
|
378
|
-
# @see OpenAI::Models::Beta::Threads::Run::IncompleteDetails#reason
|
|
379
|
-
module Reason
|
|
380
|
-
extend OpenAI::Internal::Type::Enum
|
|
381
|
-
|
|
382
|
-
MAX_COMPLETION_TOKENS = :max_completion_tokens
|
|
383
|
-
MAX_PROMPT_TOKENS = :max_prompt_tokens
|
|
384
|
-
|
|
385
|
-
# @!method self.values
|
|
386
|
-
# @return [Array<Symbol>]
|
|
387
|
-
end
|
|
388
|
-
end
|
|
389
|
-
|
|
390
|
-
# @see OpenAI::Models::Beta::Threads::Run#last_error
|
|
391
|
-
class LastError < OpenAI::Internal::Type::BaseModel
|
|
392
|
-
# @!attribute code
|
|
393
|
-
# One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.
|
|
394
|
-
#
|
|
395
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::Run::LastError::Code]
|
|
396
|
-
required :code, enum: -> { OpenAI::Beta::Threads::Run::LastError::Code }
|
|
397
|
-
|
|
398
|
-
# @!attribute message
|
|
399
|
-
# A human-readable description of the error.
|
|
400
|
-
#
|
|
401
|
-
# @return [String]
|
|
402
|
-
required :message, String
|
|
403
|
-
|
|
404
|
-
# @!method initialize(code:, message:)
|
|
405
|
-
# The last error associated with this run. Will be `null` if there are no errors.
|
|
406
|
-
#
|
|
407
|
-
# @param code [Symbol, OpenAI::Models::Beta::Threads::Run::LastError::Code]
|
|
408
|
-
# One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.
|
|
409
|
-
#
|
|
410
|
-
# @param message [String]
|
|
411
|
-
# A human-readable description of the error.
|
|
412
|
-
|
|
413
|
-
# One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.
|
|
414
|
-
#
|
|
415
|
-
# @see OpenAI::Models::Beta::Threads::Run::LastError#code
|
|
416
|
-
module Code
|
|
417
|
-
extend OpenAI::Internal::Type::Enum
|
|
418
|
-
|
|
419
|
-
SERVER_ERROR = :server_error
|
|
420
|
-
RATE_LIMIT_EXCEEDED = :rate_limit_exceeded
|
|
421
|
-
INVALID_PROMPT = :invalid_prompt
|
|
422
|
-
|
|
423
|
-
# @!method self.values
|
|
424
|
-
# @return [Array<Symbol>]
|
|
425
|
-
end
|
|
426
|
-
end
|
|
427
|
-
|
|
428
|
-
# @see OpenAI::Models::Beta::Threads::Run#required_action
|
|
429
|
-
class RequiredAction < OpenAI::Internal::Type::BaseModel
|
|
430
|
-
# @!attribute submit_tool_outputs
|
|
431
|
-
# Details on the tool outputs needed for this run to continue.
|
|
432
|
-
#
|
|
433
|
-
# @return [OpenAI::Models::Beta::Threads::Run::RequiredAction::SubmitToolOutputs]
|
|
434
|
-
required :submit_tool_outputs, -> { OpenAI::Beta::Threads::Run::RequiredAction::SubmitToolOutputs }
|
|
435
|
-
|
|
436
|
-
# @!attribute type
|
|
437
|
-
# For now, this is always `submit_tool_outputs`.
|
|
438
|
-
#
|
|
439
|
-
# @return [Symbol, :submit_tool_outputs]
|
|
440
|
-
required :type, const: :submit_tool_outputs
|
|
441
|
-
|
|
442
|
-
# @!method initialize(submit_tool_outputs:, type: :submit_tool_outputs)
|
|
443
|
-
# Details on the action required to continue the run. Will be `null` if no action
|
|
444
|
-
# is required.
|
|
445
|
-
#
|
|
446
|
-
# @param submit_tool_outputs [OpenAI::Models::Beta::Threads::Run::RequiredAction::SubmitToolOutputs]
|
|
447
|
-
# Details on the tool outputs needed for this run to continue.
|
|
448
|
-
#
|
|
449
|
-
# @param type [Symbol, :submit_tool_outputs]
|
|
450
|
-
# For now, this is always `submit_tool_outputs`.
|
|
451
|
-
|
|
452
|
-
# @see OpenAI::Models::Beta::Threads::Run::RequiredAction#submit_tool_outputs
|
|
453
|
-
class SubmitToolOutputs < OpenAI::Internal::Type::BaseModel
|
|
454
|
-
# @!attribute tool_calls
|
|
455
|
-
# A list of the relevant tool calls.
|
|
456
|
-
#
|
|
457
|
-
# @return [Array<OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall>]
|
|
458
|
-
required(
|
|
459
|
-
:tool_calls,
|
|
460
|
-
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::RequiredActionFunctionToolCall] }
|
|
461
|
-
)
|
|
462
|
-
|
|
463
|
-
# @!method initialize(tool_calls:)
|
|
464
|
-
# Details on the tool outputs needed for this run to continue.
|
|
465
|
-
#
|
|
466
|
-
# @param tool_calls [Array<OpenAI::Models::Beta::Threads::RequiredActionFunctionToolCall>]
|
|
467
|
-
# A list of the relevant tool calls.
|
|
468
|
-
end
|
|
469
|
-
end
|
|
470
|
-
|
|
471
|
-
# @see OpenAI::Models::Beta::Threads::Run#truncation_strategy
|
|
472
|
-
class TruncationStrategy < OpenAI::Internal::Type::BaseModel
|
|
473
|
-
# @!attribute type
|
|
474
|
-
# The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
475
|
-
# `last_messages`, the thread will be truncated to the n most recent messages in
|
|
476
|
-
# the thread. When set to `auto`, messages in the middle of the thread will be
|
|
477
|
-
# dropped to fit the context length of the model, `max_prompt_tokens`.
|
|
478
|
-
#
|
|
479
|
-
# @return [Symbol, OpenAI::Models::Beta::Threads::Run::TruncationStrategy::Type]
|
|
480
|
-
required :type, enum: -> { OpenAI::Beta::Threads::Run::TruncationStrategy::Type }
|
|
481
|
-
|
|
482
|
-
# @!attribute last_messages
|
|
483
|
-
# The number of most recent messages from the thread when constructing the context
|
|
484
|
-
# for the run.
|
|
485
|
-
#
|
|
486
|
-
# @return [Integer, nil]
|
|
487
|
-
optional :last_messages, Integer, nil?: true
|
|
488
|
-
|
|
489
|
-
# @!method initialize(type:, last_messages: nil)
|
|
490
|
-
# Controls for how a thread will be truncated prior to the run. Use this to
|
|
491
|
-
# control the initial context window of the run.
|
|
492
|
-
#
|
|
493
|
-
# @param type [Symbol, OpenAI::Models::Beta::Threads::Run::TruncationStrategy::Type]
|
|
494
|
-
# The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
495
|
-
# `last_messages`, the thread will be truncated to the n most recent messages in
|
|
496
|
-
# the thread. When set to `auto`, messages in the middle of the thread will be
|
|
497
|
-
# dropped to fit the context length of the model, `max_prompt_tokens`.
|
|
498
|
-
#
|
|
499
|
-
# @param last_messages [Integer, nil]
|
|
500
|
-
# The number of most recent messages from the thread when constructing the context
|
|
501
|
-
# for the run.
|
|
502
|
-
|
|
503
|
-
# The truncation strategy to use for the thread. The default is `auto`. If set to
|
|
504
|
-
# `last_messages`, the thread will be truncated to the n most recent messages in
|
|
505
|
-
# the thread. When set to `auto`, messages in the middle of the thread will be
|
|
506
|
-
# dropped to fit the context length of the model, `max_prompt_tokens`.
|
|
507
|
-
#
|
|
508
|
-
# @see OpenAI::Models::Beta::Threads::Run::TruncationStrategy#type
|
|
509
|
-
module Type
|
|
510
|
-
extend OpenAI::Internal::Type::Enum
|
|
511
|
-
|
|
512
|
-
AUTO = :auto
|
|
513
|
-
LAST_MESSAGES = :last_messages
|
|
514
|
-
|
|
515
|
-
# @!method self.values
|
|
516
|
-
# @return [Array<Symbol>]
|
|
517
|
-
end
|
|
518
|
-
end
|
|
519
|
-
|
|
520
|
-
# @see OpenAI::Models::Beta::Threads::Run#usage
|
|
521
|
-
class Usage < OpenAI::Internal::Type::BaseModel
|
|
522
|
-
# @!attribute completion_tokens
|
|
523
|
-
# Number of completion tokens used over the course of the run.
|
|
524
|
-
#
|
|
525
|
-
# @return [Integer]
|
|
526
|
-
required :completion_tokens, Integer
|
|
527
|
-
|
|
528
|
-
# @!attribute prompt_tokens
|
|
529
|
-
# Number of prompt tokens used over the course of the run.
|
|
530
|
-
#
|
|
531
|
-
# @return [Integer]
|
|
532
|
-
required :prompt_tokens, Integer
|
|
533
|
-
|
|
534
|
-
# @!attribute total_tokens
|
|
535
|
-
# Total number of tokens used (prompt + completion).
|
|
536
|
-
#
|
|
537
|
-
# @return [Integer]
|
|
538
|
-
required :total_tokens, Integer
|
|
539
|
-
|
|
540
|
-
# @!method initialize(completion_tokens:, prompt_tokens:, total_tokens:)
|
|
541
|
-
# Usage statistics related to the run. This value will be `null` if the run is not
|
|
542
|
-
# in a terminal state (i.e. `in_progress`, `queued`, etc.).
|
|
543
|
-
#
|
|
544
|
-
# @param completion_tokens [Integer]
|
|
545
|
-
# Number of completion tokens used over the course of the run.
|
|
546
|
-
#
|
|
547
|
-
# @param prompt_tokens [Integer]
|
|
548
|
-
# Number of prompt tokens used over the course of the run.
|
|
549
|
-
#
|
|
550
|
-
# @param total_tokens [Integer]
|
|
551
|
-
# Total number of tokens used (prompt + completion).
|
|
552
|
-
end
|
|
553
|
-
end
|
|
554
|
-
end
|
|
555
|
-
end
|
|
556
|
-
end
|
|
557
|
-
end
|
|
@@ -1,30 +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#cancel
|
|
8
|
-
class RunCancelParams < 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 run_id
|
|
18
|
-
#
|
|
19
|
-
# @return [String]
|
|
20
|
-
required :run_id, String
|
|
21
|
-
|
|
22
|
-
# @!method initialize(thread_id:, run_id:, request_options: {})
|
|
23
|
-
# @param thread_id [String]
|
|
24
|
-
# @param run_id [String]
|
|
25
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|