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,20 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
# @see OpenAI::Resources::Videos#retrieve
|
|
6
|
-
class VideoRetrieveParams < OpenAI::Internal::Type::BaseModel
|
|
7
|
-
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include OpenAI::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute video_id
|
|
11
|
-
#
|
|
12
|
-
# @return [String]
|
|
13
|
-
required :video_id, String
|
|
14
|
-
|
|
15
|
-
# @!method initialize(video_id:, request_options: {})
|
|
16
|
-
# @param video_id [String]
|
|
17
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module VideoSeconds
|
|
6
|
-
extend OpenAI::Internal::Type::Enum
|
|
7
|
-
|
|
8
|
-
VIDEO_SECONDS_4 = :"4"
|
|
9
|
-
VIDEO_SECONDS_8 = :"8"
|
|
10
|
-
VIDEO_SECONDS_12 = :"12"
|
|
11
|
-
|
|
12
|
-
# @!method self.values
|
|
13
|
-
# @return [Array<Symbol>]
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Models
|
|
5
|
-
module VideoSize
|
|
6
|
-
extend OpenAI::Internal::Type::Enum
|
|
7
|
-
|
|
8
|
-
VIDEO_SIZE_720X1280 = :"720x1280"
|
|
9
|
-
VIDEO_SIZE_1280X720 = :"1280x720"
|
|
10
|
-
VIDEO_SIZE_1024X1792 = :"1024x1792"
|
|
11
|
-
VIDEO_SIZE_1792X1024 = :"1792x1024"
|
|
12
|
-
|
|
13
|
-
# @!method self.values
|
|
14
|
-
# @return [Array<Symbol>]
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Resources
|
|
5
|
-
class Beta
|
|
6
|
-
# Build Assistants that can call models and use tools.
|
|
7
|
-
class Assistants
|
|
8
|
-
# @deprecated
|
|
9
|
-
#
|
|
10
|
-
# Create an assistant with a model and instructions.
|
|
11
|
-
#
|
|
12
|
-
# @overload create(model:, description: nil, instructions: nil, metadata: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {})
|
|
13
|
-
#
|
|
14
|
-
# @param model [String, Symbol, OpenAI::Models::ChatModel]
|
|
15
|
-
# ID of the model to use. You can use the
|
|
16
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
17
|
-
# API to see all of your available models, or see our
|
|
18
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
19
|
-
# of them.
|
|
20
|
-
#
|
|
21
|
-
# @param description [String, nil]
|
|
22
|
-
# The description of the assistant. The maximum length is 512 characters.
|
|
23
|
-
#
|
|
24
|
-
# @param instructions [String, nil]
|
|
25
|
-
# The system instructions that the assistant uses. The maximum length is 256,000
|
|
26
|
-
# characters.
|
|
27
|
-
#
|
|
28
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
29
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
30
|
-
# for storing additional information about the object in a structured format, and
|
|
31
|
-
# querying for objects via API or the dashboard.
|
|
32
|
-
#
|
|
33
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
34
|
-
# a maximum length of 512 characters.
|
|
35
|
-
#
|
|
36
|
-
# @param name [String, nil]
|
|
37
|
-
# The name of the assistant. The maximum length is 256 characters.
|
|
38
|
-
#
|
|
39
|
-
# @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil]
|
|
40
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
41
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
42
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
43
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
44
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
45
|
-
# model-specific support.
|
|
46
|
-
#
|
|
47
|
-
# @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
48
|
-
# Specifies the format that the model must output. Compatible with
|
|
49
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
50
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
51
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
52
|
-
#
|
|
53
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
54
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
55
|
-
# in the
|
|
56
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
57
|
-
#
|
|
58
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
59
|
-
# message the model generates is valid JSON.
|
|
60
|
-
#
|
|
61
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
62
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
63
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
64
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
65
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
66
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
67
|
-
# max context length.
|
|
68
|
-
#
|
|
69
|
-
# @param temperature [Float, nil]
|
|
70
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
71
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
72
|
-
# focused and deterministic.
|
|
73
|
-
#
|
|
74
|
-
# @param tool_resources [OpenAI::Models::Beta::AssistantCreateParams::ToolResources, nil]
|
|
75
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
76
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
77
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
78
|
-
# IDs.
|
|
79
|
-
#
|
|
80
|
-
# @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>]
|
|
81
|
-
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
82
|
-
# assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
83
|
-
# `function`.
|
|
84
|
-
#
|
|
85
|
-
# @param top_p [Float, nil]
|
|
86
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
87
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
88
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
89
|
-
#
|
|
90
|
-
# We generally recommend altering this or temperature but not both.
|
|
91
|
-
#
|
|
92
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
93
|
-
#
|
|
94
|
-
# @return [OpenAI::Models::Beta::Assistant]
|
|
95
|
-
#
|
|
96
|
-
# @see OpenAI::Models::Beta::AssistantCreateParams
|
|
97
|
-
def create(params)
|
|
98
|
-
parsed, options = OpenAI::Beta::AssistantCreateParams.dump_request(params)
|
|
99
|
-
@client.request(
|
|
100
|
-
method: :post,
|
|
101
|
-
path: "assistants",
|
|
102
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
103
|
-
body: parsed,
|
|
104
|
-
model: OpenAI::Beta::Assistant,
|
|
105
|
-
security: {bearer_auth: true},
|
|
106
|
-
options: options
|
|
107
|
-
)
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# @deprecated
|
|
111
|
-
#
|
|
112
|
-
# Retrieves an assistant.
|
|
113
|
-
#
|
|
114
|
-
# @overload retrieve(assistant_id, request_options: {})
|
|
115
|
-
#
|
|
116
|
-
# @param assistant_id [String]
|
|
117
|
-
# The ID of the assistant to retrieve.
|
|
118
|
-
#
|
|
119
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
120
|
-
#
|
|
121
|
-
# @return [OpenAI::Models::Beta::Assistant]
|
|
122
|
-
#
|
|
123
|
-
# @see OpenAI::Models::Beta::AssistantRetrieveParams
|
|
124
|
-
def retrieve(assistant_id, params = {})
|
|
125
|
-
@client.request(
|
|
126
|
-
method: :get,
|
|
127
|
-
path: ["assistants/%1$s", assistant_id],
|
|
128
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
129
|
-
model: OpenAI::Beta::Assistant,
|
|
130
|
-
security: {bearer_auth: true},
|
|
131
|
-
options: params[:request_options]
|
|
132
|
-
)
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# @deprecated
|
|
136
|
-
#
|
|
137
|
-
# Modifies an assistant.
|
|
138
|
-
#
|
|
139
|
-
# @overload update(assistant_id, description: nil, instructions: nil, metadata: nil, model: nil, name: nil, reasoning_effort: nil, response_format: nil, temperature: nil, tool_resources: nil, tools: nil, top_p: nil, request_options: {})
|
|
140
|
-
#
|
|
141
|
-
# @param assistant_id [String]
|
|
142
|
-
# The ID of the assistant to modify.
|
|
143
|
-
#
|
|
144
|
-
# @param description [String, nil]
|
|
145
|
-
# The description of the assistant. The maximum length is 512 characters.
|
|
146
|
-
#
|
|
147
|
-
# @param instructions [String, nil]
|
|
148
|
-
# The system instructions that the assistant uses. The maximum length is 256,000
|
|
149
|
-
# characters.
|
|
150
|
-
#
|
|
151
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
152
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
153
|
-
# for storing additional information about the object in a structured format, and
|
|
154
|
-
# querying for objects via API or the dashboard.
|
|
155
|
-
#
|
|
156
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
157
|
-
# a maximum length of 512 characters.
|
|
158
|
-
#
|
|
159
|
-
# @param model [String, Symbol, OpenAI::Models::Beta::AssistantUpdateParams::Model]
|
|
160
|
-
# ID of the model to use. You can use the
|
|
161
|
-
# [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
162
|
-
# API to see all of your available models, or see our
|
|
163
|
-
# [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
164
|
-
# of them.
|
|
165
|
-
#
|
|
166
|
-
# @param name [String, nil]
|
|
167
|
-
# The name of the assistant. The maximum length is 256 characters.
|
|
168
|
-
#
|
|
169
|
-
# @param reasoning_effort [Symbol, OpenAI::Models::ReasoningEffort, nil]
|
|
170
|
-
# Constrains effort on reasoning for reasoning models. Currently supported values
|
|
171
|
-
# are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
172
|
-
# reasoning effort can result in faster responses and fewer tokens used on
|
|
173
|
-
# reasoning in a response. Not all reasoning models support every value. See the
|
|
174
|
-
# [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
175
|
-
# model-specific support.
|
|
176
|
-
#
|
|
177
|
-
# @param response_format [Symbol, :auto, OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONObject, OpenAI::Models::ResponseFormatJSONSchema, nil]
|
|
178
|
-
# Specifies the format that the model must output. Compatible with
|
|
179
|
-
# [GPT-4o](https://developers.openai.com/api/docs/models/gpt-4o),
|
|
180
|
-
# [GPT-4 Turbo](https://developers.openai.com/api/docs/models/gpt-4-turbo), and
|
|
181
|
-
# all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
182
|
-
#
|
|
183
|
-
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
184
|
-
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
185
|
-
# in the
|
|
186
|
-
# [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
187
|
-
#
|
|
188
|
-
# Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
|
189
|
-
# message the model generates is valid JSON.
|
|
190
|
-
#
|
|
191
|
-
# **Important:** when using JSON mode, you **must** also instruct the model to
|
|
192
|
-
# produce JSON yourself via a system or user message. Without this, the model may
|
|
193
|
-
# generate an unending stream of whitespace until the generation reaches the token
|
|
194
|
-
# limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
|
195
|
-
# the message content may be partially cut off if `finish_reason="length"`, which
|
|
196
|
-
# indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
|
197
|
-
# max context length.
|
|
198
|
-
#
|
|
199
|
-
# @param temperature [Float, nil]
|
|
200
|
-
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
201
|
-
# make the output more random, while lower values like 0.2 will make it more
|
|
202
|
-
# focused and deterministic.
|
|
203
|
-
#
|
|
204
|
-
# @param tool_resources [OpenAI::Models::Beta::AssistantUpdateParams::ToolResources, nil]
|
|
205
|
-
# A set of resources that are used by the assistant's tools. The resources are
|
|
206
|
-
# specific to the type of tool. For example, the `code_interpreter` tool requires
|
|
207
|
-
# a list of file IDs, while the `file_search` tool requires a list of vector store
|
|
208
|
-
# IDs.
|
|
209
|
-
#
|
|
210
|
-
# @param tools [Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>]
|
|
211
|
-
# A list of tool enabled on the assistant. There can be a maximum of 128 tools per
|
|
212
|
-
# assistant. Tools can be of types `code_interpreter`, `file_search`, or
|
|
213
|
-
# `function`.
|
|
214
|
-
#
|
|
215
|
-
# @param top_p [Float, nil]
|
|
216
|
-
# An alternative to sampling with temperature, called nucleus sampling, where the
|
|
217
|
-
# model considers the results of the tokens with top_p probability mass. So 0.1
|
|
218
|
-
# means only the tokens comprising the top 10% probability mass are considered.
|
|
219
|
-
#
|
|
220
|
-
# We generally recommend altering this or temperature but not both.
|
|
221
|
-
#
|
|
222
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
223
|
-
#
|
|
224
|
-
# @return [OpenAI::Models::Beta::Assistant]
|
|
225
|
-
#
|
|
226
|
-
# @see OpenAI::Models::Beta::AssistantUpdateParams
|
|
227
|
-
def update(assistant_id, params = {})
|
|
228
|
-
parsed, options = OpenAI::Beta::AssistantUpdateParams.dump_request(params)
|
|
229
|
-
@client.request(
|
|
230
|
-
method: :post,
|
|
231
|
-
path: ["assistants/%1$s", assistant_id],
|
|
232
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
233
|
-
body: parsed,
|
|
234
|
-
model: OpenAI::Beta::Assistant,
|
|
235
|
-
security: {bearer_auth: true},
|
|
236
|
-
options: options
|
|
237
|
-
)
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
# @deprecated
|
|
241
|
-
#
|
|
242
|
-
# Returns a list of assistants.
|
|
243
|
-
#
|
|
244
|
-
# @overload list(after: nil, before: nil, limit: nil, order: nil, request_options: {})
|
|
245
|
-
#
|
|
246
|
-
# @param after [String]
|
|
247
|
-
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
248
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
249
|
-
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
250
|
-
# fetch the next page of the list.
|
|
251
|
-
#
|
|
252
|
-
# @param before [String]
|
|
253
|
-
# A cursor for use in pagination. `before` is an object ID that defines your place
|
|
254
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
255
|
-
# starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
256
|
-
# to fetch the previous page of the list.
|
|
257
|
-
#
|
|
258
|
-
# @param limit [Integer]
|
|
259
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
260
|
-
# 100, and the default is 20.
|
|
261
|
-
#
|
|
262
|
-
# @param order [Symbol, OpenAI::Models::Beta::AssistantListParams::Order]
|
|
263
|
-
# Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
264
|
-
# order and `desc` for descending order.
|
|
265
|
-
#
|
|
266
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
267
|
-
#
|
|
268
|
-
# @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::Assistant>]
|
|
269
|
-
#
|
|
270
|
-
# @see OpenAI::Models::Beta::AssistantListParams
|
|
271
|
-
def list(params = {})
|
|
272
|
-
parsed, options = OpenAI::Beta::AssistantListParams.dump_request(params)
|
|
273
|
-
query = OpenAI::Internal::Util.encode_query_params(parsed)
|
|
274
|
-
@client.request(
|
|
275
|
-
method: :get,
|
|
276
|
-
path: "assistants",
|
|
277
|
-
query: query,
|
|
278
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
279
|
-
page: OpenAI::Internal::CursorPage,
|
|
280
|
-
model: OpenAI::Beta::Assistant,
|
|
281
|
-
security: {bearer_auth: true},
|
|
282
|
-
options: options
|
|
283
|
-
)
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
# @deprecated
|
|
287
|
-
#
|
|
288
|
-
# Delete an assistant.
|
|
289
|
-
#
|
|
290
|
-
# @overload delete(assistant_id, request_options: {})
|
|
291
|
-
#
|
|
292
|
-
# @param assistant_id [String]
|
|
293
|
-
# The ID of the assistant to delete.
|
|
294
|
-
#
|
|
295
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
296
|
-
#
|
|
297
|
-
# @return [OpenAI::Models::Beta::AssistantDeleted]
|
|
298
|
-
#
|
|
299
|
-
# @see OpenAI::Models::Beta::AssistantDeleteParams
|
|
300
|
-
def delete(assistant_id, params = {})
|
|
301
|
-
@client.request(
|
|
302
|
-
method: :delete,
|
|
303
|
-
path: ["assistants/%1$s", assistant_id],
|
|
304
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
305
|
-
model: OpenAI::Beta::AssistantDeleted,
|
|
306
|
-
security: {bearer_auth: true},
|
|
307
|
-
options: params[:request_options]
|
|
308
|
-
)
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
# @api private
|
|
312
|
-
#
|
|
313
|
-
# @param client [OpenAI::Client]
|
|
314
|
-
def initialize(client:)
|
|
315
|
-
@client = client
|
|
316
|
-
end
|
|
317
|
-
end
|
|
318
|
-
end
|
|
319
|
-
end
|
|
320
|
-
end
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module OpenAI
|
|
4
|
-
module Resources
|
|
5
|
-
class Beta
|
|
6
|
-
class Threads
|
|
7
|
-
# @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
8
|
-
#
|
|
9
|
-
# Build Assistants that can call models and use tools.
|
|
10
|
-
class Messages
|
|
11
|
-
# @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
12
|
-
#
|
|
13
|
-
# Create a message.
|
|
14
|
-
#
|
|
15
|
-
# @overload create(thread_id, content:, role:, attachments: nil, metadata: nil, request_options: {})
|
|
16
|
-
#
|
|
17
|
-
# @param thread_id [String]
|
|
18
|
-
# The ID of the
|
|
19
|
-
# [thread](https://developers.openai.com/api/docs/assistants/migration) to create
|
|
20
|
-
# a message for.
|
|
21
|
-
#
|
|
22
|
-
# @param content [String, Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlockParam>]
|
|
23
|
-
# The text contents of the message.
|
|
24
|
-
#
|
|
25
|
-
# @param role [Symbol, OpenAI::Models::Beta::Threads::MessageCreateParams::Role]
|
|
26
|
-
# The role of the entity that is creating the message. Allowed values include:
|
|
27
|
-
#
|
|
28
|
-
# - `user`: Indicates the message is sent by an actual user and should be used in
|
|
29
|
-
# most cases to represent user-generated messages.
|
|
30
|
-
# - `assistant`: Indicates the message is generated by the assistant. Use this
|
|
31
|
-
# value to insert messages from the assistant into the conversation.
|
|
32
|
-
#
|
|
33
|
-
# @param attachments [Array<OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment>, nil]
|
|
34
|
-
# A list of files attached to the message, and the tools they should be added to.
|
|
35
|
-
#
|
|
36
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
37
|
-
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
38
|
-
# for storing additional information about the object in a structured format, and
|
|
39
|
-
# querying for objects via API or the dashboard.
|
|
40
|
-
#
|
|
41
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
42
|
-
# a maximum length of 512 characters.
|
|
43
|
-
#
|
|
44
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
45
|
-
#
|
|
46
|
-
# @return [OpenAI::Models::Beta::Threads::Message]
|
|
47
|
-
#
|
|
48
|
-
# @see OpenAI::Models::Beta::Threads::MessageCreateParams
|
|
49
|
-
def create(thread_id, params)
|
|
50
|
-
parsed, options = OpenAI::Beta::Threads::MessageCreateParams.dump_request(params)
|
|
51
|
-
@client.request(
|
|
52
|
-
method: :post,
|
|
53
|
-
path: ["threads/%1$s/messages", thread_id],
|
|
54
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
55
|
-
body: parsed,
|
|
56
|
-
model: OpenAI::Beta::Threads::Message,
|
|
57
|
-
security: {bearer_auth: true},
|
|
58
|
-
options: options
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
63
|
-
#
|
|
64
|
-
# Retrieve a message.
|
|
65
|
-
#
|
|
66
|
-
# @overload retrieve(message_id, thread_id:, request_options: {})
|
|
67
|
-
#
|
|
68
|
-
# @param message_id [String]
|
|
69
|
-
# The ID of the message to retrieve.
|
|
70
|
-
#
|
|
71
|
-
# @param thread_id [String]
|
|
72
|
-
# The ID of the
|
|
73
|
-
# [thread](https://developers.openai.com/api/docs/assistants/migration) to which
|
|
74
|
-
# this message belongs.
|
|
75
|
-
#
|
|
76
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
77
|
-
#
|
|
78
|
-
# @return [OpenAI::Models::Beta::Threads::Message]
|
|
79
|
-
#
|
|
80
|
-
# @see OpenAI::Models::Beta::Threads::MessageRetrieveParams
|
|
81
|
-
def retrieve(message_id, params)
|
|
82
|
-
parsed, options = OpenAI::Beta::Threads::MessageRetrieveParams.dump_request(params)
|
|
83
|
-
thread_id = parsed.delete(:thread_id) do
|
|
84
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
@client.request(
|
|
88
|
-
method: :get,
|
|
89
|
-
path: ["threads/%1$s/messages/%2$s", thread_id, message_id],
|
|
90
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
91
|
-
model: OpenAI::Beta::Threads::Message,
|
|
92
|
-
security: {bearer_auth: true},
|
|
93
|
-
options: options
|
|
94
|
-
)
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
98
|
-
#
|
|
99
|
-
# Modifies a message.
|
|
100
|
-
#
|
|
101
|
-
# @overload update(message_id, thread_id:, metadata: nil, request_options: {})
|
|
102
|
-
#
|
|
103
|
-
# @param message_id [String]
|
|
104
|
-
# Path param: The ID of the message to modify.
|
|
105
|
-
#
|
|
106
|
-
# @param thread_id [String]
|
|
107
|
-
# Path param: The ID of the thread to which this message belongs.
|
|
108
|
-
#
|
|
109
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
110
|
-
# Body param: Set of 16 key-value pairs that can be attached to an object. This
|
|
111
|
-
# can be useful for storing additional information about the object in a
|
|
112
|
-
# structured format, and querying for objects via API or the dashboard.
|
|
113
|
-
#
|
|
114
|
-
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
115
|
-
# a maximum length of 512 characters.
|
|
116
|
-
#
|
|
117
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
118
|
-
#
|
|
119
|
-
# @return [OpenAI::Models::Beta::Threads::Message]
|
|
120
|
-
#
|
|
121
|
-
# @see OpenAI::Models::Beta::Threads::MessageUpdateParams
|
|
122
|
-
def update(message_id, params)
|
|
123
|
-
parsed, options = OpenAI::Beta::Threads::MessageUpdateParams.dump_request(params)
|
|
124
|
-
thread_id = parsed.delete(:thread_id) do
|
|
125
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
@client.request(
|
|
129
|
-
method: :post,
|
|
130
|
-
path: ["threads/%1$s/messages/%2$s", thread_id, message_id],
|
|
131
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
132
|
-
body: parsed,
|
|
133
|
-
model: OpenAI::Beta::Threads::Message,
|
|
134
|
-
security: {bearer_auth: true},
|
|
135
|
-
options: options
|
|
136
|
-
)
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
140
|
-
#
|
|
141
|
-
# Returns a list of messages for a given thread.
|
|
142
|
-
#
|
|
143
|
-
# @overload list(thread_id, after: nil, before: nil, limit: nil, order: nil, run_id: nil, request_options: {})
|
|
144
|
-
#
|
|
145
|
-
# @param thread_id [String]
|
|
146
|
-
# The ID of the
|
|
147
|
-
# [thread](https://developers.openai.com/api/docs/assistants/migration) the
|
|
148
|
-
# messages belong to.
|
|
149
|
-
#
|
|
150
|
-
# @param after [String]
|
|
151
|
-
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
152
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
153
|
-
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
154
|
-
# fetch the next page of the list.
|
|
155
|
-
#
|
|
156
|
-
# @param before [String]
|
|
157
|
-
# A cursor for use in pagination. `before` is an object ID that defines your place
|
|
158
|
-
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
159
|
-
# starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
160
|
-
# to fetch the previous page of the list.
|
|
161
|
-
#
|
|
162
|
-
# @param limit [Integer]
|
|
163
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
164
|
-
# 100, and the default is 20.
|
|
165
|
-
#
|
|
166
|
-
# @param order [Symbol, OpenAI::Models::Beta::Threads::MessageListParams::Order]
|
|
167
|
-
# Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
168
|
-
# order and `desc` for descending order.
|
|
169
|
-
#
|
|
170
|
-
# @param run_id [String]
|
|
171
|
-
# Filter messages by the run ID that generated them.
|
|
172
|
-
#
|
|
173
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
174
|
-
#
|
|
175
|
-
# @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::Threads::Message>]
|
|
176
|
-
#
|
|
177
|
-
# @see OpenAI::Models::Beta::Threads::MessageListParams
|
|
178
|
-
def list(thread_id, params = {})
|
|
179
|
-
parsed, options = OpenAI::Beta::Threads::MessageListParams.dump_request(params)
|
|
180
|
-
query = OpenAI::Internal::Util.encode_query_params(parsed)
|
|
181
|
-
@client.request(
|
|
182
|
-
method: :get,
|
|
183
|
-
path: ["threads/%1$s/messages", thread_id],
|
|
184
|
-
query: query,
|
|
185
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
186
|
-
page: OpenAI::Internal::CursorPage,
|
|
187
|
-
model: OpenAI::Beta::Threads::Message,
|
|
188
|
-
security: {bearer_auth: true},
|
|
189
|
-
options: options
|
|
190
|
-
)
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
194
|
-
#
|
|
195
|
-
# Deletes a message.
|
|
196
|
-
#
|
|
197
|
-
# @overload delete(message_id, thread_id:, request_options: {})
|
|
198
|
-
#
|
|
199
|
-
# @param message_id [String]
|
|
200
|
-
# The ID of the message to delete.
|
|
201
|
-
#
|
|
202
|
-
# @param thread_id [String]
|
|
203
|
-
# The ID of the thread to which this message belongs.
|
|
204
|
-
#
|
|
205
|
-
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
206
|
-
#
|
|
207
|
-
# @return [OpenAI::Models::Beta::Threads::MessageDeleted]
|
|
208
|
-
#
|
|
209
|
-
# @see OpenAI::Models::Beta::Threads::MessageDeleteParams
|
|
210
|
-
def delete(message_id, params)
|
|
211
|
-
parsed, options = OpenAI::Beta::Threads::MessageDeleteParams.dump_request(params)
|
|
212
|
-
thread_id = parsed.delete(:thread_id) do
|
|
213
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
@client.request(
|
|
217
|
-
method: :delete,
|
|
218
|
-
path: ["threads/%1$s/messages/%2$s", thread_id, message_id],
|
|
219
|
-
headers: {"openai-beta" => "assistants=v2"},
|
|
220
|
-
model: OpenAI::Beta::Threads::MessageDeleted,
|
|
221
|
-
security: {bearer_auth: true},
|
|
222
|
-
options: options
|
|
223
|
-
)
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
# @api private
|
|
227
|
-
#
|
|
228
|
-
# @param client [OpenAI::Client]
|
|
229
|
-
def initialize(client:)
|
|
230
|
-
@client = client
|
|
231
|
-
end
|
|
232
|
-
end
|
|
233
|
-
end
|
|
234
|
-
end
|
|
235
|
-
end
|
|
236
|
-
end
|