openai 0.3.0 → 0.4.0.pre.beta.1
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/.ignore +2 -0
- data/CHANGELOG.md +368 -0
- data/README.md +292 -28
- data/SECURITY.md +29 -0
- data/lib/openai/client.rb +136 -120
- data/lib/openai/errors.rb +228 -0
- data/lib/openai/file_part.rb +55 -0
- data/lib/openai/helpers/structured_output/array_of.rb +49 -0
- data/lib/openai/helpers/structured_output/base_model.rb +78 -0
- data/lib/openai/helpers/structured_output/boolean.rb +28 -0
- data/lib/openai/helpers/structured_output/enum_of.rb +63 -0
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +163 -0
- data/lib/openai/helpers/structured_output/union_of.rb +64 -0
- data/lib/openai/helpers/structured_output.rb +16 -0
- data/lib/openai/internal/cursor_page.rb +86 -0
- data/lib/openai/internal/page.rb +80 -0
- data/lib/openai/internal/stream.rb +60 -0
- data/lib/openai/internal/transport/base_client.rb +558 -0
- data/lib/openai/internal/transport/pooled_net_requester.rb +209 -0
- data/lib/openai/internal/type/array_of.rb +162 -0
- data/lib/openai/internal/type/base_model.rb +477 -0
- data/lib/openai/internal/type/base_page.rb +55 -0
- data/lib/openai/internal/type/base_stream.rb +90 -0
- data/lib/openai/internal/type/boolean.rb +71 -0
- data/lib/openai/internal/type/converter.rb +292 -0
- data/lib/openai/internal/type/enum.rb +145 -0
- data/lib/openai/internal/type/file_input.rb +103 -0
- data/lib/openai/internal/type/hash_of.rb +182 -0
- data/lib/openai/internal/type/request_parameters.rb +42 -0
- data/lib/openai/internal/type/union.rb +252 -0
- data/lib/openai/internal/type/unknown.rb +75 -0
- data/lib/openai/internal/util.rb +907 -0
- data/lib/openai/internal.rb +20 -0
- data/lib/openai/models/all_models.rb +30 -0
- data/lib/openai/models/audio/speech_create_params.rb +159 -0
- data/lib/openai/models/audio/speech_model.rb +18 -0
- data/lib/openai/models/audio/transcription.rb +61 -0
- data/lib/openai/models/audio/transcription_create_params.rb +222 -0
- data/lib/openai/models/audio/transcription_create_response.rb +26 -0
- data/lib/openai/models/audio/transcription_include.rb +16 -0
- data/lib/openai/models/audio/transcription_segment.rb +96 -0
- data/lib/openai/models/audio/transcription_stream_event.rb +26 -0
- data/lib/openai/models/audio/transcription_text_delta_event.rb +75 -0
- data/lib/openai/models/audio/transcription_text_done_event.rb +76 -0
- data/lib/openai/models/audio/transcription_verbose.rb +53 -0
- data/lib/openai/models/audio/transcription_word.rb +34 -0
- data/lib/openai/models/audio/translation.rb +17 -0
- data/lib/openai/models/audio/translation_create_params.rb +98 -0
- data/lib/openai/models/audio/translation_create_response.rb +19 -0
- data/lib/openai/models/audio/translation_verbose.rb +42 -0
- data/lib/openai/models/audio_model.rb +16 -0
- data/lib/openai/models/audio_response_format.rb +21 -0
- data/lib/openai/models/auto_file_chunking_strategy_param.rb +19 -0
- data/lib/openai/models/batch.rb +213 -0
- data/lib/openai/models/batch_cancel_params.rb +14 -0
- data/lib/openai/models/batch_create_params.rb +93 -0
- data/lib/openai/models/batch_error.rb +40 -0
- data/lib/openai/models/batch_list_params.rb +37 -0
- data/lib/openai/models/batch_request_counts.rb +34 -0
- data/lib/openai/models/batch_retrieve_params.rb +14 -0
- data/lib/openai/models/beta/assistant.rb +218 -0
- data/lib/openai/models/beta/assistant_create_params.rb +372 -0
- data/lib/openai/models/beta/assistant_delete_params.rb +16 -0
- data/lib/openai/models/beta/assistant_deleted.rb +30 -0
- data/lib/openai/models/beta/assistant_list_params.rb +71 -0
- data/lib/openai/models/beta/assistant_response_format_option.rb +50 -0
- data/lib/openai/models/beta/assistant_retrieve_params.rb +16 -0
- data/lib/openai/models/beta/assistant_stream_event.rb +754 -0
- data/lib/openai/models/beta/assistant_tool.rb +22 -0
- data/lib/openai/models/beta/assistant_tool_choice.rb +42 -0
- data/lib/openai/models/beta/assistant_tool_choice_function.rb +18 -0
- data/lib/openai/models/beta/assistant_tool_choice_option.rb +42 -0
- data/lib/openai/models/beta/assistant_update_params.rb +345 -0
- data/lib/openai/models/beta/code_interpreter_tool.rb +18 -0
- data/lib/openai/models/beta/file_search_tool.rb +110 -0
- data/lib/openai/models/beta/function_tool.rb +25 -0
- data/lib/openai/models/beta/message_stream_event.rb +171 -0
- data/lib/openai/models/beta/run_step_stream_event.rb +225 -0
- data/lib/openai/models/beta/run_stream_event.rb +299 -0
- data/lib/openai/models/beta/thread.rb +122 -0
- data/lib/openai/models/beta/thread_create_and_run_params.rb +722 -0
- data/lib/openai/models/beta/thread_create_params.rb +391 -0
- data/lib/openai/models/beta/thread_delete_params.rb +16 -0
- data/lib/openai/models/beta/thread_deleted.rb +30 -0
- data/lib/openai/models/beta/thread_retrieve_params.rb +16 -0
- data/lib/openai/models/beta/thread_stream_event.rb +41 -0
- data/lib/openai/models/beta/thread_update_params.rb +101 -0
- data/lib/openai/models/beta/threads/annotation.rb +27 -0
- data/lib/openai/models/beta/threads/annotation_delta.rb +27 -0
- data/lib/openai/models/beta/threads/file_citation_annotation.rb +65 -0
- data/lib/openai/models/beta/threads/file_citation_delta_annotation.rb +81 -0
- data/lib/openai/models/beta/threads/file_path_annotation.rb +64 -0
- data/lib/openai/models/beta/threads/file_path_delta_annotation.rb +72 -0
- data/lib/openai/models/beta/threads/image_file.rb +49 -0
- data/lib/openai/models/beta/threads/image_file_content_block.rb +30 -0
- data/lib/openai/models/beta/threads/image_file_delta.rb +49 -0
- data/lib/openai/models/beta/threads/image_file_delta_block.rb +38 -0
- data/lib/openai/models/beta/threads/image_url.rb +48 -0
- data/lib/openai/models/beta/threads/image_url_content_block.rb +29 -0
- data/lib/openai/models/beta/threads/image_url_delta.rb +48 -0
- data/lib/openai/models/beta/threads/image_url_delta_block.rb +37 -0
- data/lib/openai/models/beta/threads/message.rb +251 -0
- data/lib/openai/models/beta/threads/message_content.rb +32 -0
- data/lib/openai/models/beta/threads/message_content_delta.rb +32 -0
- data/lib/openai/models/beta/threads/message_content_part_param.rb +29 -0
- data/lib/openai/models/beta/threads/message_create_params.rb +150 -0
- data/lib/openai/models/beta/threads/message_delete_params.rb +24 -0
- data/lib/openai/models/beta/threads/message_deleted.rb +32 -0
- data/lib/openai/models/beta/threads/message_delta.rb +44 -0
- data/lib/openai/models/beta/threads/message_delta_event.rb +39 -0
- data/lib/openai/models/beta/threads/message_list_params.rb +81 -0
- data/lib/openai/models/beta/threads/message_retrieve_params.rb +24 -0
- data/lib/openai/models/beta/threads/message_update_params.rb +41 -0
- data/lib/openai/models/beta/threads/refusal_content_block.rb +29 -0
- data/lib/openai/models/beta/threads/refusal_delta_block.rb +37 -0
- data/lib/openai/models/beta/threads/required_action_function_tool_call.rb +68 -0
- data/lib/openai/models/beta/threads/run.rb +475 -0
- data/lib/openai/models/beta/threads/run_cancel_params.rb +24 -0
- data/lib/openai/models/beta/threads/run_create_params.rb +443 -0
- data/lib/openai/models/beta/threads/run_list_params.rb +73 -0
- data/lib/openai/models/beta/threads/run_retrieve_params.rb +24 -0
- data/lib/openai/models/beta/threads/run_status.rb +29 -0
- data/lib/openai/models/beta/threads/run_submit_tool_outputs_params.rb +62 -0
- data/lib/openai/models/beta/threads/run_update_params.rb +41 -0
- data/lib/openai/models/beta/threads/runs/code_interpreter_logs.rb +40 -0
- data/lib/openai/models/beta/threads/runs/code_interpreter_output_image.rb +54 -0
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call.rb +158 -0
- data/lib/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rb +100 -0
- data/lib/openai/models/beta/threads/runs/file_search_tool_call.rb +193 -0
- data/lib/openai/models/beta/threads/runs/file_search_tool_call_delta.rb +50 -0
- data/lib/openai/models/beta/threads/runs/function_tool_call.rb +78 -0
- data/lib/openai/models/beta/threads/runs/function_tool_call_delta.rb +86 -0
- data/lib/openai/models/beta/threads/runs/message_creation_step_details.rb +44 -0
- data/lib/openai/models/beta/threads/runs/run_step.rb +278 -0
- data/lib/openai/models/beta/threads/runs/run_step_delta.rb +44 -0
- data/lib/openai/models/beta/threads/runs/run_step_delta_event.rb +43 -0
- data/lib/openai/models/beta/threads/runs/run_step_delta_message_delta.rb +48 -0
- data/lib/openai/models/beta/threads/runs/run_step_include.rb +23 -0
- data/lib/openai/models/beta/threads/runs/step_list_params.rb +97 -0
- data/lib/openai/models/beta/threads/runs/step_retrieve_params.rb +52 -0
- data/lib/openai/models/beta/threads/runs/tool_call.rb +28 -0
- data/lib/openai/models/beta/threads/runs/tool_call_delta.rb +28 -0
- data/lib/openai/models/beta/threads/runs/tool_call_delta_object.rb +38 -0
- data/lib/openai/models/beta/threads/runs/tool_calls_step_details.rb +40 -0
- data/lib/openai/models/beta/threads/text.rb +30 -0
- data/lib/openai/models/beta/threads/text_content_block.rb +29 -0
- data/lib/openai/models/beta/threads/text_content_block_param.rb +30 -0
- data/lib/openai/models/beta/threads/text_delta.rb +28 -0
- data/lib/openai/models/beta/threads/text_delta_block.rb +37 -0
- data/lib/openai/models/chat/chat_completion.rb +225 -0
- data/lib/openai/models/chat/chat_completion_assistant_message_param.rb +178 -0
- data/lib/openai/models/chat/chat_completion_audio.rb +53 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +110 -0
- data/lib/openai/models/chat/chat_completion_chunk.rb +408 -0
- data/lib/openai/models/chat/chat_completion_content_part.rb +85 -0
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +69 -0
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +68 -0
- data/lib/openai/models/chat/chat_completion_content_part_refusal.rb +28 -0
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +31 -0
- data/lib/openai/models/chat/chat_completion_deleted.rb +37 -0
- data/lib/openai/models/chat/chat_completion_developer_message_param.rb +64 -0
- data/lib/openai/models/chat/chat_completion_function_call_option.rb +23 -0
- data/lib/openai/models/chat/chat_completion_function_message_param.rb +37 -0
- data/lib/openai/models/chat/chat_completion_message.rb +179 -0
- data/lib/openai/models/chat/chat_completion_message_param.rb +42 -0
- data/lib/openai/models/chat/chat_completion_message_tool_call.rb +71 -0
- data/lib/openai/models/chat/chat_completion_modality.rb +19 -0
- data/lib/openai/models/chat/chat_completion_named_tool_choice.rb +42 -0
- data/lib/openai/models/chat/chat_completion_prediction_content.rb +60 -0
- data/lib/openai/models/chat/chat_completion_reasoning_effort.rb +11 -0
- data/lib/openai/models/chat/chat_completion_role.rb +24 -0
- data/lib/openai/models/chat/chat_completion_store_message.rb +22 -0
- data/lib/openai/models/chat/chat_completion_stream_options.rb +31 -0
- data/lib/openai/models/chat/chat_completion_system_message_param.rb +64 -0
- data/lib/openai/models/chat/chat_completion_token_logprob.rb +90 -0
- data/lib/openai/models/chat/chat_completion_tool.rb +27 -0
- data/lib/openai/models/chat/chat_completion_tool_choice_option.rb +45 -0
- data/lib/openai/models/chat/chat_completion_tool_message_param.rb +56 -0
- data/lib/openai/models/chat/chat_completion_user_message_param.rb +63 -0
- data/lib/openai/models/chat/completion_create_params.rb +714 -0
- data/lib/openai/models/chat/completion_delete_params.rb +16 -0
- data/lib/openai/models/chat/completion_list_params.rb +74 -0
- data/lib/openai/models/chat/completion_retrieve_params.rb +16 -0
- data/lib/openai/models/chat/completion_update_params.rb +32 -0
- data/lib/openai/models/chat/completions/message_list_params.rb +58 -0
- data/lib/openai/models/chat_model.rb +67 -0
- data/lib/openai/models/comparison_filter.rb +87 -0
- data/lib/openai/models/completion.rb +76 -0
- data/lib/openai/models/completion_choice.rb +89 -0
- data/lib/openai/models/completion_create_params.rb +306 -0
- data/lib/openai/models/completion_usage.rb +117 -0
- data/lib/openai/models/compound_filter.rb +57 -0
- data/lib/openai/models/container_create_params.rb +75 -0
- data/lib/openai/models/container_create_response.rb +98 -0
- data/lib/openai/models/container_delete_params.rb +14 -0
- data/lib/openai/models/container_list_params.rb +58 -0
- data/lib/openai/models/container_list_response.rb +98 -0
- data/lib/openai/models/container_retrieve_params.rb +14 -0
- data/lib/openai/models/container_retrieve_response.rb +98 -0
- data/lib/openai/models/containers/file_create_params.rb +35 -0
- data/lib/openai/models/containers/file_create_response.rb +67 -0
- data/lib/openai/models/containers/file_delete_params.rb +22 -0
- data/lib/openai/models/containers/file_list_params.rb +60 -0
- data/lib/openai/models/containers/file_list_response.rb +67 -0
- data/lib/openai/models/containers/file_retrieve_params.rb +22 -0
- data/lib/openai/models/containers/file_retrieve_response.rb +67 -0
- data/lib/openai/models/containers/files/content_retrieve_params.rb +24 -0
- data/lib/openai/models/create_embedding_response.rb +63 -0
- data/lib/openai/models/embedding.rb +39 -0
- data/lib/openai/models/embedding_create_params.rb +139 -0
- data/lib/openai/models/embedding_model.rb +16 -0
- data/lib/openai/models/error_object.rb +33 -0
- data/lib/openai/models/eval_create_params.rb +451 -0
- data/lib/openai/models/eval_create_response.rb +214 -0
- data/lib/openai/models/eval_custom_data_source_config.rb +35 -0
- data/lib/openai/models/eval_delete_params.rb +14 -0
- data/lib/openai/models/eval_delete_response.rb +28 -0
- data/lib/openai/models/eval_list_params.rb +75 -0
- data/lib/openai/models/eval_list_response.rb +214 -0
- data/lib/openai/models/eval_retrieve_params.rb +14 -0
- data/lib/openai/models/eval_retrieve_response.rb +214 -0
- data/lib/openai/models/eval_stored_completions_data_source_config.rb +44 -0
- data/lib/openai/models/eval_update_params.rb +38 -0
- data/lib/openai/models/eval_update_response.rb +214 -0
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +465 -0
- data/lib/openai/models/evals/create_eval_jsonl_run_data_source.rb +102 -0
- data/lib/openai/models/evals/eval_api_error.rb +30 -0
- data/lib/openai/models/evals/run_cancel_params.rb +22 -0
- data/lib/openai/models/evals/run_cancel_response.rb +758 -0
- data/lib/openai/models/evals/run_create_params.rb +602 -0
- data/lib/openai/models/evals/run_create_response.rb +758 -0
- data/lib/openai/models/evals/run_delete_params.rb +22 -0
- data/lib/openai/models/evals/run_delete_response.rb +30 -0
- data/lib/openai/models/evals/run_list_params.rb +80 -0
- data/lib/openai/models/evals/run_list_response.rb +758 -0
- data/lib/openai/models/evals/run_retrieve_params.rb +22 -0
- data/lib/openai/models/evals/run_retrieve_response.rb +762 -0
- data/lib/openai/models/evals/runs/output_item_list_params.rb +86 -0
- data/lib/openai/models/evals/runs/output_item_list_response.rb +265 -0
- data/lib/openai/models/evals/runs/output_item_retrieve_params.rb +30 -0
- data/lib/openai/models/evals/runs/output_item_retrieve_response.rb +266 -0
- data/lib/openai/models/file_chunking_strategy.rb +20 -0
- data/lib/openai/models/file_chunking_strategy_param.rb +22 -0
- data/lib/openai/models/file_content.rb +7 -0
- data/lib/openai/models/file_content_params.rb +14 -0
- data/lib/openai/models/file_create_params.rb +36 -0
- data/lib/openai/models/file_delete_params.rb +14 -0
- data/lib/openai/models/file_deleted.rb +28 -0
- data/lib/openai/models/file_list_params.rb +66 -0
- data/lib/openai/models/file_object.rb +131 -0
- data/lib/openai/models/file_purpose.rb +23 -0
- data/lib/openai/models/file_retrieve_params.rb +14 -0
- data/lib/openai/models/fine_tuning/alpha/grader_run_params.rb +89 -0
- data/lib/openai/models/fine_tuning/alpha/grader_run_response.rb +175 -0
- data/lib/openai/models/fine_tuning/alpha/grader_validate_params.rb +49 -0
- data/lib/openai/models/fine_tuning/alpha/grader_validate_response.rb +46 -0
- data/lib/openai/models/fine_tuning/checkpoints/permission_create_params.rb +26 -0
- data/lib/openai/models/fine_tuning/checkpoints/permission_create_response.rb +48 -0
- data/lib/openai/models/fine_tuning/checkpoints/permission_delete_params.rb +24 -0
- data/lib/openai/models/fine_tuning/checkpoints/permission_delete_response.rb +37 -0
- data/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rb +61 -0
- data/lib/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rb +83 -0
- data/lib/openai/models/fine_tuning/dpo_hyperparameters.rb +112 -0
- data/lib/openai/models/fine_tuning/dpo_method.rb +20 -0
- data/lib/openai/models/fine_tuning/fine_tuning_job.rb +384 -0
- data/lib/openai/models/fine_tuning/fine_tuning_job_event.rb +98 -0
- data/lib/openai/models/fine_tuning/fine_tuning_job_integration.rb +11 -0
- data/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rb +57 -0
- data/lib/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rb +35 -0
- data/lib/openai/models/fine_tuning/job_cancel_params.rb +16 -0
- data/lib/openai/models/fine_tuning/job_create_params.rb +377 -0
- data/lib/openai/models/fine_tuning/job_list_events_params.rb +32 -0
- data/lib/openai/models/fine_tuning/job_list_params.rb +44 -0
- data/lib/openai/models/fine_tuning/job_pause_params.rb +16 -0
- data/lib/openai/models/fine_tuning/job_resume_params.rb +16 -0
- data/lib/openai/models/fine_tuning/job_retrieve_params.rb +16 -0
- data/lib/openai/models/fine_tuning/jobs/checkpoint_list_params.rb +34 -0
- data/lib/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rb +121 -0
- data/lib/openai/models/fine_tuning/reinforcement_hyperparameters.rb +181 -0
- data/lib/openai/models/fine_tuning/reinforcement_method.rb +53 -0
- data/lib/openai/models/fine_tuning/supervised_hyperparameters.rb +88 -0
- data/lib/openai/models/fine_tuning/supervised_method.rb +20 -0
- data/lib/openai/models/function_definition.rb +55 -0
- data/lib/openai/models/function_parameters.rb +8 -0
- data/lib/openai/models/graders/label_model_grader.rb +171 -0
- data/lib/openai/models/graders/multi_grader.rb +71 -0
- data/lib/openai/models/graders/python_grader.rb +46 -0
- data/lib/openai/models/graders/score_model_grader.rb +171 -0
- data/lib/openai/models/graders/string_check_grader.rb +70 -0
- data/lib/openai/models/graders/text_similarity_grader.rb +80 -0
- data/lib/openai/models/image.rb +41 -0
- data/lib/openai/models/image_create_variation_params.rb +112 -0
- data/lib/openai/models/image_edit_params.rb +225 -0
- data/lib/openai/models/image_generate_params.rb +272 -0
- data/lib/openai/models/image_model.rb +16 -0
- data/lib/openai/models/images_response.rb +98 -0
- data/lib/openai/models/metadata.rb +8 -0
- data/lib/openai/models/model.rb +43 -0
- data/lib/openai/models/model_delete_params.rb +14 -0
- data/lib/openai/models/model_deleted.rb +28 -0
- data/lib/openai/models/model_list_params.rb +14 -0
- data/lib/openai/models/model_retrieve_params.rb +14 -0
- data/lib/openai/models/moderation.rb +563 -0
- data/lib/openai/models/moderation_create_params.rb +80 -0
- data/lib/openai/models/moderation_create_response.rb +35 -0
- data/lib/openai/models/moderation_image_url_input.rb +40 -0
- data/lib/openai/models/moderation_model.rb +17 -0
- data/lib/openai/models/moderation_multi_modal_input.rb +21 -0
- data/lib/openai/models/moderation_text_input.rb +26 -0
- data/lib/openai/models/other_file_chunking_strategy_object.rb +20 -0
- data/lib/openai/models/reasoning.rb +89 -0
- data/lib/openai/models/reasoning_effort.rb +22 -0
- data/lib/openai/models/response_format_json_object.rb +20 -0
- data/lib/openai/models/response_format_json_schema.rb +85 -0
- data/lib/openai/models/response_format_text.rb +18 -0
- data/lib/openai/models/responses/computer_tool.rb +61 -0
- data/lib/openai/models/responses/easy_input_message.rb +91 -0
- data/lib/openai/models/responses/file_search_tool.rb +114 -0
- data/lib/openai/models/responses/function_tool.rb +63 -0
- data/lib/openai/models/responses/input_item_list_params.rb +78 -0
- data/lib/openai/models/responses/response.rb +393 -0
- data/lib/openai/models/responses/response_audio_delta_event.rb +39 -0
- data/lib/openai/models/responses/response_audio_done_event.rb +31 -0
- data/lib/openai/models/responses/response_audio_transcript_delta_event.rb +39 -0
- data/lib/openai/models/responses/response_audio_transcript_done_event.rb +31 -0
- data/lib/openai/models/responses/response_cancel_params.rb +16 -0
- data/lib/openai/models/responses/response_code_interpreter_call_code_delta_event.rb +48 -0
- data/lib/openai/models/responses/response_code_interpreter_call_code_done_event.rb +48 -0
- data/lib/openai/models/responses/response_code_interpreter_call_completed_event.rb +48 -0
- data/lib/openai/models/responses/response_code_interpreter_call_in_progress_event.rb +48 -0
- data/lib/openai/models/responses/response_code_interpreter_call_interpreting_event.rb +48 -0
- data/lib/openai/models/responses/response_code_interpreter_tool_call.rb +171 -0
- data/lib/openai/models/responses/response_completed_event.rb +39 -0
- data/lib/openai/models/responses/response_computer_tool_call.rb +493 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +111 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_screenshot.rb +41 -0
- data/lib/openai/models/responses/response_content.rb +30 -0
- data/lib/openai/models/responses/response_content_part_added_event.rb +81 -0
- data/lib/openai/models/responses/response_content_part_done_event.rb +81 -0
- data/lib/openai/models/responses/response_create_params.rb +369 -0
- data/lib/openai/models/responses/response_created_event.rb +39 -0
- data/lib/openai/models/responses/response_delete_params.rb +16 -0
- data/lib/openai/models/responses/response_error.rb +60 -0
- data/lib/openai/models/responses/response_error_event.rb +55 -0
- data/lib/openai/models/responses/response_failed_event.rb +39 -0
- data/lib/openai/models/responses/response_file_search_call_completed_event.rb +48 -0
- data/lib/openai/models/responses/response_file_search_call_in_progress_event.rb +48 -0
- data/lib/openai/models/responses/response_file_search_call_searching_event.rb +48 -0
- data/lib/openai/models/responses/response_file_search_tool_call.rb +147 -0
- data/lib/openai/models/responses/response_format_text_config.rb +48 -0
- data/lib/openai/models/responses/response_format_text_json_schema_config.rb +70 -0
- data/lib/openai/models/responses/response_function_call_arguments_delta_event.rb +56 -0
- data/lib/openai/models/responses/response_function_call_arguments_done_event.rb +51 -0
- data/lib/openai/models/responses/response_function_tool_call.rb +87 -0
- data/lib/openai/models/responses/response_function_tool_call_item.rb +25 -0
- data/lib/openai/models/responses/response_function_tool_call_output_item.rb +70 -0
- data/lib/openai/models/responses/response_function_web_search.rb +56 -0
- data/lib/openai/models/responses/response_image_gen_call_completed_event.rb +45 -0
- data/lib/openai/models/responses/response_image_gen_call_generating_event.rb +45 -0
- data/lib/openai/models/responses/response_image_gen_call_in_progress_event.rb +44 -0
- data/lib/openai/models/responses/response_image_gen_call_partial_image_event.rb +65 -0
- data/lib/openai/models/responses/response_in_progress_event.rb +39 -0
- data/lib/openai/models/responses/response_includable.rb +32 -0
- data/lib/openai/models/responses/response_incomplete_event.rb +39 -0
- data/lib/openai/models/responses/response_input.rb +10 -0
- data/lib/openai/models/responses/response_input_audio.rb +52 -0
- data/lib/openai/models/responses/response_input_content.rb +26 -0
- data/lib/openai/models/responses/response_input_file.rb +47 -0
- data/lib/openai/models/responses/response_input_image.rb +65 -0
- data/lib/openai/models/responses/response_input_item.rb +876 -0
- data/lib/openai/models/responses/response_input_message_content_list.rb +11 -0
- data/lib/openai/models/responses/response_input_message_item.rb +99 -0
- data/lib/openai/models/responses/response_input_text.rb +28 -0
- data/lib/openai/models/responses/response_item.rb +549 -0
- data/lib/openai/models/responses/response_item_list.rb +54 -0
- data/lib/openai/models/responses/response_mcp_call_arguments_delta_event.rb +53 -0
- data/lib/openai/models/responses/response_mcp_call_arguments_done_event.rb +52 -0
- data/lib/openai/models/responses/response_mcp_call_completed_event.rb +28 -0
- data/lib/openai/models/responses/response_mcp_call_failed_event.rb +28 -0
- data/lib/openai/models/responses/response_mcp_call_in_progress_event.rb +44 -0
- data/lib/openai/models/responses/response_mcp_list_tools_completed_event.rb +28 -0
- data/lib/openai/models/responses/response_mcp_list_tools_failed_event.rb +28 -0
- data/lib/openai/models/responses/response_mcp_list_tools_in_progress_event.rb +29 -0
- data/lib/openai/models/responses/response_output_audio.rb +39 -0
- data/lib/openai/models/responses/response_output_item.rb +442 -0
- data/lib/openai/models/responses/response_output_item_added_event.rb +47 -0
- data/lib/openai/models/responses/response_output_item_done_event.rb +47 -0
- data/lib/openai/models/responses/response_output_message.rb +90 -0
- data/lib/openai/models/responses/response_output_refusal.rb +28 -0
- data/lib/openai/models/responses/response_output_text.rb +171 -0
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +68 -0
- data/lib/openai/models/responses/response_queued_event.rb +36 -0
- data/lib/openai/models/responses/response_reasoning_delta_event.rb +60 -0
- data/lib/openai/models/responses/response_reasoning_done_event.rb +60 -0
- data/lib/openai/models/responses/response_reasoning_item.rb +98 -0
- data/lib/openai/models/responses/response_reasoning_summary_delta_event.rb +65 -0
- data/lib/openai/models/responses/response_reasoning_summary_done_event.rb +60 -0
- data/lib/openai/models/responses/response_reasoning_summary_part_added_event.rb +86 -0
- data/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb +86 -0
- data/lib/openai/models/responses/response_reasoning_summary_text_delta_event.rb +64 -0
- data/lib/openai/models/responses/response_reasoning_summary_text_done_event.rb +64 -0
- data/lib/openai/models/responses/response_refusal_delta_event.rb +63 -0
- data/lib/openai/models/responses/response_refusal_done_event.rb +63 -0
- data/lib/openai/models/responses/response_retrieve_params.rb +28 -0
- data/lib/openai/models/responses/response_status.rb +23 -0
- data/lib/openai/models/responses/response_stream_event.rb +217 -0
- data/lib/openai/models/responses/response_text_config.rb +39 -0
- data/lib/openai/models/responses/response_text_delta_event.rb +63 -0
- data/lib/openai/models/responses/response_text_done_event.rb +63 -0
- data/lib/openai/models/responses/response_usage.rb +85 -0
- data/lib/openai/models/responses/response_web_search_call_completed_event.rb +48 -0
- data/lib/openai/models/responses/response_web_search_call_in_progress_event.rb +48 -0
- data/lib/openai/models/responses/response_web_search_call_searching_event.rb +48 -0
- data/lib/openai/models/responses/tool.rb +512 -0
- data/lib/openai/models/responses/tool_choice_function.rb +28 -0
- data/lib/openai/models/responses/tool_choice_options.rb +26 -0
- data/lib/openai/models/responses/tool_choice_types.rb +62 -0
- data/lib/openai/models/responses/web_search_tool.rb +123 -0
- data/lib/openai/models/responses_model.rb +30 -0
- data/lib/openai/models/static_file_chunking_strategy.rb +30 -0
- data/lib/openai/models/static_file_chunking_strategy_object.rb +23 -0
- data/lib/openai/models/static_file_chunking_strategy_object_param.rb +25 -0
- data/lib/openai/models/upload.rb +103 -0
- data/lib/openai/models/upload_cancel_params.rb +14 -0
- data/lib/openai/models/upload_complete_params.rb +34 -0
- data/lib/openai/models/upload_create_params.rb +55 -0
- data/lib/openai/models/uploads/part_create_params.rb +27 -0
- data/lib/openai/models/uploads/upload_part.rb +47 -0
- data/lib/openai/models/vector_store.rb +195 -0
- data/lib/openai/models/vector_store_create_params.rb +90 -0
- data/lib/openai/models/vector_store_delete_params.rb +14 -0
- data/lib/openai/models/vector_store_deleted.rb +28 -0
- data/lib/openai/models/vector_store_list_params.rb +69 -0
- data/lib/openai/models/vector_store_retrieve_params.rb +14 -0
- data/lib/openai/models/vector_store_search_params.rb +116 -0
- data/lib/openai/models/vector_store_search_response.rb +103 -0
- data/lib/openai/models/vector_store_update_params.rb +71 -0
- data/lib/openai/models/vector_stores/file_batch_cancel_params.rb +22 -0
- data/lib/openai/models/vector_stores/file_batch_create_params.rb +67 -0
- data/lib/openai/models/vector_stores/file_batch_list_files_params.rb +99 -0
- data/lib/openai/models/vector_stores/file_batch_retrieve_params.rb +22 -0
- data/lib/openai/models/vector_stores/file_content_params.rb +22 -0
- data/lib/openai/models/vector_stores/file_content_response.rb +27 -0
- data/lib/openai/models/vector_stores/file_create_params.rb +67 -0
- data/lib/openai/models/vector_stores/file_delete_params.rb +22 -0
- data/lib/openai/models/vector_stores/file_list_params.rb +92 -0
- data/lib/openai/models/vector_stores/file_retrieve_params.rb +22 -0
- data/lib/openai/models/vector_stores/file_update_params.rb +55 -0
- data/lib/openai/models/vector_stores/vector_store_file.rb +172 -0
- data/lib/openai/models/vector_stores/vector_store_file_batch.rb +130 -0
- data/lib/openai/models/vector_stores/vector_store_file_deleted.rb +32 -0
- data/lib/openai/models.rb +237 -0
- data/lib/openai/request_options.rb +77 -0
- data/lib/openai/resources/audio/speech.rb +52 -0
- data/lib/openai/resources/audio/transcriptions.rb +116 -0
- data/lib/openai/resources/audio/translations.rb +50 -0
- data/lib/openai/resources/audio.rb +26 -0
- data/lib/openai/resources/batches.rb +109 -0
- data/lib/openai/resources/beta/assistants.rb +180 -0
- data/lib/openai/resources/beta/threads/messages.rb +177 -0
- data/lib/openai/resources/beta/threads/runs/steps.rb +101 -0
- data/lib/openai/resources/beta/threads/runs.rb +374 -0
- data/lib/openai/resources/beta/threads.rb +248 -0
- data/lib/openai/resources/beta.rb +22 -0
- data/lib/openai/resources/chat/completions/messages.rb +51 -0
- data/lib/openai/resources/chat/completions.rb +412 -0
- data/lib/openai/resources/chat.rb +18 -0
- data/lib/openai/resources/completions.rb +143 -0
- data/lib/openai/resources/containers/files/content.rb +43 -0
- data/lib/openai/resources/containers/files.rb +135 -0
- data/lib/openai/resources/containers.rb +113 -0
- data/lib/openai/resources/embeddings.rb +47 -0
- data/lib/openai/resources/evals/runs/output_items.rb +91 -0
- data/lib/openai/resources/evals/runs.rb +168 -0
- data/lib/openai/resources/evals.rb +155 -0
- data/lib/openai/resources/files.rb +155 -0
- data/lib/openai/resources/fine_tuning/alpha/graders.rb +66 -0
- data/lib/openai/resources/fine_tuning/alpha.rb +20 -0
- data/lib/openai/resources/fine_tuning/checkpoints/permissions.rb +125 -0
- data/lib/openai/resources/fine_tuning/checkpoints.rb +20 -0
- data/lib/openai/resources/fine_tuning/jobs/checkpoints.rb +48 -0
- data/lib/openai/resources/fine_tuning/jobs.rb +221 -0
- data/lib/openai/resources/fine_tuning/methods.rb +16 -0
- data/lib/openai/resources/fine_tuning.rb +30 -0
- data/lib/openai/resources/graders/grader_models.rb +16 -0
- data/lib/openai/resources/graders.rb +18 -0
- data/lib/openai/resources/images.rb +143 -0
- data/lib/openai/resources/models.rb +76 -0
- data/lib/openai/resources/moderations.rb +42 -0
- data/lib/openai/resources/responses/input_items.rb +52 -0
- data/lib/openai/resources/responses.rb +323 -0
- data/lib/openai/resources/uploads/parts.rb +54 -0
- data/lib/openai/resources/uploads.rb +125 -0
- data/lib/openai/resources/vector_stores/file_batches.rb +144 -0
- data/lib/openai/resources/vector_stores/files.rb +203 -0
- data/lib/openai/resources/vector_stores.rb +195 -0
- data/lib/openai/structured_output.rb +10 -0
- data/lib/openai/version.rb +3 -1
- data/lib/openai.rb +520 -7
- data/manifest.yaml +15 -0
- data/rbi/openai/client.rbi +109 -0
- data/rbi/openai/errors.rbi +189 -0
- data/rbi/openai/file_part.rbi +37 -0
- data/rbi/openai/helpers/structured_output/array_of.rbi +16 -0
- data/rbi/openai/helpers/structured_output/base_model.rbi +22 -0
- data/rbi/openai/helpers/structured_output/boolean.rbi +11 -0
- data/rbi/openai/helpers/structured_output/enum_of.rbi +30 -0
- data/rbi/openai/helpers/structured_output/json_schema_converter.rbi +83 -0
- data/rbi/openai/helpers/structured_output/union_of.rbi +23 -0
- data/rbi/openai/helpers/structured_output.rbi +16 -0
- data/rbi/openai/internal/cursor_page.rbi +22 -0
- data/rbi/openai/internal/page.rbi +22 -0
- data/rbi/openai/internal/stream.rbi +18 -0
- data/rbi/openai/internal/transport/base_client.rbi +309 -0
- data/rbi/openai/internal/transport/pooled_net_requester.rbi +78 -0
- data/rbi/openai/internal/type/array_of.rbi +104 -0
- data/rbi/openai/internal/type/base_model.rbi +295 -0
- data/rbi/openai/internal/type/base_page.rbi +42 -0
- data/rbi/openai/internal/type/base_stream.rbi +68 -0
- data/rbi/openai/internal/type/boolean.rbi +56 -0
- data/rbi/openai/internal/type/converter.rbi +158 -0
- data/rbi/openai/internal/type/enum.rbi +82 -0
- data/rbi/openai/internal/type/file_input.rbi +59 -0
- data/rbi/openai/internal/type/hash_of.rbi +104 -0
- data/rbi/openai/internal/type/request_parameters.rbi +29 -0
- data/rbi/openai/internal/type/union.rbi +116 -0
- data/rbi/openai/internal/type/unknown.rbi +56 -0
- data/rbi/openai/internal/util.rbi +482 -0
- data/rbi/openai/internal.rbi +16 -0
- data/rbi/openai/models/all_models.rbi +56 -0
- data/rbi/openai/models/audio/speech_create_params.rbi +273 -0
- data/rbi/openai/models/audio/speech_model.rbi +26 -0
- data/rbi/openai/models/audio/transcription.rbi +118 -0
- data/rbi/openai/models/audio/transcription_create_params.rbi +424 -0
- data/rbi/openai/models/audio/transcription_create_response.rbi +31 -0
- data/rbi/openai/models/audio/transcription_include.rbi +26 -0
- data/rbi/openai/models/audio/transcription_segment.rbi +120 -0
- data/rbi/openai/models/audio/transcription_stream_event.rbi +31 -0
- data/rbi/openai/models/audio/transcription_text_delta_event.rbi +142 -0
- data/rbi/openai/models/audio/transcription_text_done_event.rbi +144 -0
- data/rbi/openai/models/audio/transcription_verbose.rbi +90 -0
- data/rbi/openai/models/audio/transcription_word.rbi +45 -0
- data/rbi/openai/models/audio/translation.rbi +25 -0
- data/rbi/openai/models/audio/translation_create_params.rbi +190 -0
- data/rbi/openai/models/audio/translation_create_response.rbi +24 -0
- data/rbi/openai/models/audio/translation_verbose.rbi +72 -0
- data/rbi/openai/models/audio_model.rbi +22 -0
- data/rbi/openai/models/audio_response_format.rbi +28 -0
- data/rbi/openai/models/auto_file_chunking_strategy_param.rbi +32 -0
- data/rbi/openai/models/batch.rbi +290 -0
- data/rbi/openai/models/batch_cancel_params.rbi +27 -0
- data/rbi/openai/models/batch_create_params.rbi +170 -0
- data/rbi/openai/models/batch_error.rbi +65 -0
- data/rbi/openai/models/batch_list_params.rbi +65 -0
- data/rbi/openai/models/batch_request_counts.rbi +48 -0
- data/rbi/openai/models/batch_retrieve_params.rbi +27 -0
- data/rbi/openai/models/beta/assistant.rbi +384 -0
- data/rbi/openai/models/beta/assistant_create_params.rbi +760 -0
- data/rbi/openai/models/beta/assistant_delete_params.rbi +32 -0
- data/rbi/openai/models/beta/assistant_deleted.rbi +37 -0
- data/rbi/openai/models/beta/assistant_list_params.rbi +126 -0
- data/rbi/openai/models/beta/assistant_response_format_option.rbi +49 -0
- data/rbi/openai/models/beta/assistant_retrieve_params.rbi +32 -0
- data/rbi/openai/models/beta/assistant_stream_event.rbi +1170 -0
- data/rbi/openai/models/beta/assistant_tool.rbi +26 -0
- data/rbi/openai/models/beta/assistant_tool_choice.rbi +89 -0
- data/rbi/openai/models/beta/assistant_tool_choice_function.rbi +32 -0
- data/rbi/openai/models/beta/assistant_tool_choice_option.rbi +74 -0
- data/rbi/openai/models/beta/assistant_update_params.rbi +682 -0
- data/rbi/openai/models/beta/code_interpreter_tool.rbi +29 -0
- data/rbi/openai/models/beta/file_search_tool.rbi +246 -0
- data/rbi/openai/models/beta/function_tool.rbi +45 -0
- data/rbi/openai/models/beta/message_stream_event.rbi +263 -0
- data/rbi/openai/models/beta/run_step_stream_event.rbi +362 -0
- data/rbi/openai/models/beta/run_stream_event.rbi +485 -0
- data/rbi/openai/models/beta/thread.rbi +233 -0
- data/rbi/openai/models/beta/thread_create_and_run_params.rbi +1535 -0
- data/rbi/openai/models/beta/thread_create_params.rbi +847 -0
- data/rbi/openai/models/beta/thread_delete_params.rbi +29 -0
- data/rbi/openai/models/beta/thread_deleted.rbi +37 -0
- data/rbi/openai/models/beta/thread_retrieve_params.rbi +29 -0
- data/rbi/openai/models/beta/thread_stream_event.rbi +60 -0
- data/rbi/openai/models/beta/thread_update_params.rbi +225 -0
- data/rbi/openai/models/beta/threads/annotation.rbi +32 -0
- data/rbi/openai/models/beta/threads/annotation_delta.rbi +32 -0
- data/rbi/openai/models/beta/threads/file_citation_annotation.rbi +110 -0
- data/rbi/openai/models/beta/threads/file_citation_delta_annotation.rbi +145 -0
- data/rbi/openai/models/beta/threads/file_path_annotation.rbi +106 -0
- data/rbi/openai/models/beta/threads/file_path_delta_annotation.rbi +133 -0
- data/rbi/openai/models/beta/threads/image_file.rbi +102 -0
- data/rbi/openai/models/beta/threads/image_file_content_block.rbi +54 -0
- data/rbi/openai/models/beta/threads/image_file_delta.rbi +113 -0
- data/rbi/openai/models/beta/threads/image_file_delta_block.rbi +67 -0
- data/rbi/openai/models/beta/threads/image_url.rbi +97 -0
- data/rbi/openai/models/beta/threads/image_url_content_block.rbi +53 -0
- data/rbi/openai/models/beta/threads/image_url_delta.rbi +111 -0
- data/rbi/openai/models/beta/threads/image_url_delta_block.rbi +64 -0
- data/rbi/openai/models/beta/threads/message.rbi +486 -0
- data/rbi/openai/models/beta/threads/message_content.rbi +33 -0
- data/rbi/openai/models/beta/threads/message_content_delta.rbi +33 -0
- data/rbi/openai/models/beta/threads/message_content_part_param.rbi +32 -0
- data/rbi/openai/models/beta/threads/message_create_params.rbi +318 -0
- data/rbi/openai/models/beta/threads/message_delete_params.rbi +42 -0
- data/rbi/openai/models/beta/threads/message_deleted.rbi +44 -0
- data/rbi/openai/models/beta/threads/message_delta.rbi +128 -0
- data/rbi/openai/models/beta/threads/message_delta_event.rbi +67 -0
- data/rbi/openai/models/beta/threads/message_list_params.rbi +157 -0
- data/rbi/openai/models/beta/threads/message_retrieve_params.rbi +42 -0
- data/rbi/openai/models/beta/threads/message_update_params.rbi +66 -0
- data/rbi/openai/models/beta/threads/refusal_content_block.rbi +41 -0
- data/rbi/openai/models/beta/threads/refusal_delta_block.rbi +54 -0
- data/rbi/openai/models/beta/threads/required_action_function_tool_call.rbi +117 -0
- data/rbi/openai/models/beta/threads/run.rbi +870 -0
- data/rbi/openai/models/beta/threads/run_cancel_params.rbi +42 -0
- data/rbi/openai/models/beta/threads/run_create_params.rbi +882 -0
- data/rbi/openai/models/beta/threads/run_list_params.rbi +143 -0
- data/rbi/openai/models/beta/threads/run_retrieve_params.rbi +42 -0
- data/rbi/openai/models/beta/threads/run_status.rbi +50 -0
- data/rbi/openai/models/beta/threads/run_submit_tool_outputs_params.rbi +111 -0
- data/rbi/openai/models/beta/threads/run_update_params.rbi +66 -0
- data/rbi/openai/models/beta/threads/runs/code_interpreter_logs.rbi +58 -0
- data/rbi/openai/models/beta/threads/runs/code_interpreter_output_image.rbi +106 -0
- data/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call.rbi +281 -0
- data/rbi/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbi +196 -0
- data/rbi/openai/models/beta/threads/runs/file_search_tool_call.rbi +432 -0
- data/rbi/openai/models/beta/threads/runs/file_search_tool_call_delta.rbi +75 -0
- data/rbi/openai/models/beta/threads/runs/function_tool_call.rbi +128 -0
- data/rbi/openai/models/beta/threads/runs/function_tool_call_delta.rbi +149 -0
- data/rbi/openai/models/beta/threads/runs/message_creation_step_details.rbi +92 -0
- data/rbi/openai/models/beta/threads/runs/run_step.rbi +485 -0
- data/rbi/openai/models/beta/threads/runs/run_step_delta.rbi +94 -0
- data/rbi/openai/models/beta/threads/runs/run_step_delta_event.rbi +73 -0
- data/rbi/openai/models/beta/threads/runs/run_step_delta_message_delta.rbi +99 -0
- data/rbi/openai/models/beta/threads/runs/run_step_include.rbi +39 -0
- data/rbi/openai/models/beta/threads/runs/step_list_params.rbi +203 -0
- data/rbi/openai/models/beta/threads/runs/step_retrieve_params.rbi +100 -0
- data/rbi/openai/models/beta/threads/runs/tool_call.rbi +33 -0
- data/rbi/openai/models/beta/threads/runs/tool_call_delta.rbi +33 -0
- data/rbi/openai/models/beta/threads/runs/tool_call_delta_object.rbi +89 -0
- data/rbi/openai/models/beta/threads/runs/tool_calls_step_details.rbi +69 -0
- data/rbi/openai/models/beta/threads/text.rbi +54 -0
- data/rbi/openai/models/beta/threads/text_content_block.rbi +51 -0
- data/rbi/openai/models/beta/threads/text_content_block_param.rbi +41 -0
- data/rbi/openai/models/beta/threads/text_delta.rbi +76 -0
- data/rbi/openai/models/beta/threads/text_delta_block.rbi +62 -0
- data/rbi/openai/models/chat/chat_completion.rbi +419 -0
- data/rbi/openai/models/chat/chat_completion_assistant_message_param.rbi +299 -0
- data/rbi/openai/models/chat/chat_completion_audio.rbi +72 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +213 -0
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +841 -0
- data/rbi/openai/models/chat/chat_completion_content_part.rbi +141 -0
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +162 -0
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +148 -0
- data/rbi/openai/models/chat/chat_completion_content_part_refusal.rbi +40 -0
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +42 -0
- data/rbi/openai/models/chat/chat_completion_deleted.rbi +52 -0
- data/rbi/openai/models/chat/chat_completion_developer_message_param.rbi +106 -0
- data/rbi/openai/models/chat/chat_completion_function_call_option.rbi +36 -0
- data/rbi/openai/models/chat/chat_completion_function_message_param.rbi +57 -0
- data/rbi/openai/models/chat/chat_completion_message.rbi +309 -0
- data/rbi/openai/models/chat/chat_completion_message_param.rbi +36 -0
- data/rbi/openai/models/chat/chat_completion_message_tool_call.rbi +113 -0
- data/rbi/openai/models/chat/chat_completion_modality.rbi +29 -0
- data/rbi/openai/models/chat/chat_completion_named_tool_choice.rbi +86 -0
- data/rbi/openai/models/chat/chat_completion_prediction_content.rbi +99 -0
- data/rbi/openai/models/chat/chat_completion_reasoning_effort.rbi +11 -0
- data/rbi/openai/models/chat/chat_completion_role.rbi +36 -0
- data/rbi/openai/models/chat/chat_completion_store_message.rbi +35 -0
- data/rbi/openai/models/chat/chat_completion_stream_options.rbi +50 -0
- data/rbi/openai/models/chat/chat_completion_system_message_param.rbi +105 -0
- data/rbi/openai/models/chat/chat_completion_token_logprob.rbi +151 -0
- data/rbi/openai/models/chat/chat_completion_tool.rbi +47 -0
- data/rbi/openai/models/chat/chat_completion_tool_choice_option.rbi +77 -0
- data/rbi/openai/models/chat/chat_completion_tool_message_param.rbi +97 -0
- data/rbi/openai/models/chat/chat_completion_user_message_param.rbi +104 -0
- data/rbi/openai/models/chat/completion_create_params.rbi +1351 -0
- data/rbi/openai/models/chat/completion_delete_params.rbi +32 -0
- data/rbi/openai/models/chat/completion_list_params.rbi +131 -0
- data/rbi/openai/models/chat/completion_retrieve_params.rbi +32 -0
- data/rbi/openai/models/chat/completion_update_params.rbi +58 -0
- data/rbi/openai/models/chat/completions/message_list_params.rbi +126 -0
- data/rbi/openai/models/chat_model.rbi +119 -0
- data/rbi/openai/models/comparison_filter.rbi +116 -0
- data/rbi/openai/models/completion.rbi +97 -0
- data/rbi/openai/models/completion_choice.rbi +158 -0
- data/rbi/openai/models/completion_create_params.rbi +445 -0
- data/rbi/openai/models/completion_usage.rbi +215 -0
- data/rbi/openai/models/compound_filter.rbi +81 -0
- data/rbi/openai/models/container_create_params.rbi +145 -0
- data/rbi/openai/models/container_create_response.rbi +192 -0
- data/rbi/openai/models/container_delete_params.rbi +27 -0
- data/rbi/openai/models/container_list_params.rbi +99 -0
- data/rbi/openai/models/container_list_response.rbi +190 -0
- data/rbi/openai/models/container_retrieve_params.rbi +27 -0
- data/rbi/openai/models/container_retrieve_response.rbi +193 -0
- data/rbi/openai/models/containers/file_create_params.rbi +62 -0
- data/rbi/openai/models/containers/file_create_response.rbi +90 -0
- data/rbi/openai/models/containers/file_delete_params.rbi +40 -0
- data/rbi/openai/models/containers/file_list_params.rbi +116 -0
- data/rbi/openai/models/containers/file_list_response.rbi +90 -0
- data/rbi/openai/models/containers/file_retrieve_params.rbi +40 -0
- data/rbi/openai/models/containers/file_retrieve_response.rbi +90 -0
- data/rbi/openai/models/containers/files/content_retrieve_params.rbi +42 -0
- data/rbi/openai/models/create_embedding_response.rbi +102 -0
- data/rbi/openai/models/embedding.rbi +52 -0
- data/rbi/openai/models/embedding_create_params.rbi +231 -0
- data/rbi/openai/models/embedding_model.rbi +23 -0
- data/rbi/openai/models/error_object.rbi +46 -0
- data/rbi/openai/models/eval_create_params.rbi +806 -0
- data/rbi/openai/models/eval_create_response.rbi +330 -0
- data/rbi/openai/models/eval_custom_data_source_config.rbi +47 -0
- data/rbi/openai/models/eval_delete_params.rbi +27 -0
- data/rbi/openai/models/eval_delete_response.rbi +37 -0
- data/rbi/openai/models/eval_list_params.rbi +127 -0
- data/rbi/openai/models/eval_list_response.rbi +328 -0
- data/rbi/openai/models/eval_retrieve_params.rbi +27 -0
- data/rbi/openai/models/eval_retrieve_response.rbi +332 -0
- data/rbi/openai/models/eval_stored_completions_data_source_config.rbi +69 -0
- data/rbi/openai/models/eval_update_params.rbi +64 -0
- data/rbi/openai/models/eval_update_response.rbi +330 -0
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +874 -0
- data/rbi/openai/models/evals/create_eval_jsonl_run_data_source.rbi +215 -0
- data/rbi/openai/models/evals/eval_api_error.rbi +38 -0
- data/rbi/openai/models/evals/run_cancel_params.rbi +37 -0
- data/rbi/openai/models/evals/run_cancel_response.rbi +1296 -0
- data/rbi/openai/models/evals/run_create_params.rbi +1064 -0
- data/rbi/openai/models/evals/run_create_response.rbi +1296 -0
- data/rbi/openai/models/evals/run_delete_params.rbi +37 -0
- data/rbi/openai/models/evals/run_delete_response.rbi +51 -0
- data/rbi/openai/models/evals/run_list_params.rbi +149 -0
- data/rbi/openai/models/evals/run_list_response.rbi +1292 -0
- data/rbi/openai/models/evals/run_retrieve_params.rbi +37 -0
- data/rbi/openai/models/evals/run_retrieve_response.rbi +1298 -0
- data/rbi/openai/models/evals/runs/output_item_list_params.rbi +186 -0
- data/rbi/openai/models/evals/runs/output_item_list_response.rbi +411 -0
- data/rbi/openai/models/evals/runs/output_item_retrieve_params.rbi +50 -0
- data/rbi/openai/models/evals/runs/output_item_retrieve_response.rbi +413 -0
- data/rbi/openai/models/file_chunking_strategy.rbi +22 -0
- data/rbi/openai/models/file_chunking_strategy_param.rbi +25 -0
- data/rbi/openai/models/file_content.rbi +7 -0
- data/rbi/openai/models/file_content_params.rbi +27 -0
- data/rbi/openai/models/file_create_params.rbi +57 -0
- data/rbi/openai/models/file_delete_params.rbi +27 -0
- data/rbi/openai/models/file_deleted.rbi +33 -0
- data/rbi/openai/models/file_list_params.rbi +110 -0
- data/rbi/openai/models/file_object.rbi +164 -0
- data/rbi/openai/models/file_purpose.rbi +27 -0
- data/rbi/openai/models/file_retrieve_params.rbi +27 -0
- data/rbi/openai/models/fine_tuning/alpha/grader_run_params.rbi +150 -0
- data/rbi/openai/models/fine_tuning/alpha/grader_run_response.rbi +268 -0
- data/rbi/openai/models/fine_tuning/alpha/grader_validate_params.rbi +100 -0
- data/rbi/openai/models/fine_tuning/alpha/grader_validate_response.rbi +98 -0
- data/rbi/openai/models/fine_tuning/checkpoints/permission_create_params.rbi +50 -0
- data/rbi/openai/models/fine_tuning/checkpoints/permission_create_response.rbi +70 -0
- data/rbi/openai/models/fine_tuning/checkpoints/permission_delete_params.rbi +45 -0
- data/rbi/openai/models/fine_tuning/checkpoints/permission_delete_response.rbi +54 -0
- data/rbi/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rbi +134 -0
- data/rbi/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rbi +139 -0
- data/rbi/openai/models/fine_tuning/dpo_hyperparameters.rbi +157 -0
- data/rbi/openai/models/fine_tuning/dpo_method.rbi +45 -0
- data/rbi/openai/models/fine_tuning/fine_tuning_job.rbi +625 -0
- data/rbi/openai/models/fine_tuning/fine_tuning_job_event.rbi +181 -0
- data/rbi/openai/models/fine_tuning/fine_tuning_job_integration.rbi +12 -0
- data/rbi/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rbi +85 -0
- data/rbi/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rbi +66 -0
- data/rbi/openai/models/fine_tuning/job_cancel_params.rbi +32 -0
- data/rbi/openai/models/fine_tuning/job_create_params.rbi +665 -0
- data/rbi/openai/models/fine_tuning/job_list_events_params.rbi +62 -0
- data/rbi/openai/models/fine_tuning/job_list_params.rbi +69 -0
- data/rbi/openai/models/fine_tuning/job_pause_params.rbi +29 -0
- data/rbi/openai/models/fine_tuning/job_resume_params.rbi +32 -0
- data/rbi/openai/models/fine_tuning/job_retrieve_params.rbi +32 -0
- data/rbi/openai/models/fine_tuning/jobs/checkpoint_list_params.rbi +64 -0
- data/rbi/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rbi +197 -0
- data/rbi/openai/models/fine_tuning/reinforcement_hyperparameters.rbi +281 -0
- data/rbi/openai/models/fine_tuning/reinforcement_method.rbi +112 -0
- data/rbi/openai/models/fine_tuning/supervised_hyperparameters.rbi +128 -0
- data/rbi/openai/models/fine_tuning/supervised_method.rbi +52 -0
- data/rbi/openai/models/function_definition.rbi +91 -0
- data/rbi/openai/models/function_parameters.rbi +11 -0
- data/rbi/openai/models/graders/label_model_grader.rbi +300 -0
- data/rbi/openai/models/graders/multi_grader.rbi +123 -0
- data/rbi/openai/models/graders/python_grader.rbi +64 -0
- data/rbi/openai/models/graders/score_model_grader.rbi +307 -0
- data/rbi/openai/models/graders/string_check_grader.rbi +118 -0
- data/rbi/openai/models/graders/text_similarity_grader.rbi +161 -0
- data/rbi/openai/models/image.rbi +62 -0
- data/rbi/openai/models/image_create_variation_params.rbi +201 -0
- data/rbi/openai/models/image_edit_params.rbi +336 -0
- data/rbi/openai/models/image_generate_params.rbi +442 -0
- data/rbi/openai/models/image_model.rbi +20 -0
- data/rbi/openai/models/images_response.rbi +165 -0
- data/rbi/openai/models/metadata.rbi +11 -0
- data/rbi/openai/models/model.rbi +54 -0
- data/rbi/openai/models/model_delete_params.rbi +27 -0
- data/rbi/openai/models/model_deleted.rbi +33 -0
- data/rbi/openai/models/model_list_params.rbi +27 -0
- data/rbi/openai/models/model_retrieve_params.rbi +27 -0
- data/rbi/openai/models/moderation.rbi +1061 -0
- data/rbi/openai/models/moderation_create_params.rbi +122 -0
- data/rbi/openai/models/moderation_create_response.rbi +53 -0
- data/rbi/openai/models/moderation_image_url_input.rbi +76 -0
- data/rbi/openai/models/moderation_model.rbi +28 -0
- data/rbi/openai/models/moderation_multi_modal_input.rbi +21 -0
- data/rbi/openai/models/moderation_text_input.rbi +34 -0
- data/rbi/openai/models/other_file_chunking_strategy_object.rbi +33 -0
- data/rbi/openai/models/reasoning.rbi +127 -0
- data/rbi/openai/models/reasoning_effort.rbi +26 -0
- data/rbi/openai/models/response_format_json_object.rbi +30 -0
- data/rbi/openai/models/response_format_json_schema.rbi +150 -0
- data/rbi/openai/models/response_format_text.rbi +28 -0
- data/rbi/openai/models/responses/computer_tool.rbi +113 -0
- data/rbi/openai/models/responses/easy_input_message.rbi +164 -0
- data/rbi/openai/models/responses/file_search_tool.rbi +223 -0
- data/rbi/openai/models/responses/function_tool.rbi +76 -0
- data/rbi/openai/models/responses/input_item_list_params.rbi +157 -0
- data/rbi/openai/models/responses/response.rbi +664 -0
- data/rbi/openai/models/responses/response_audio_delta_event.rbi +53 -0
- data/rbi/openai/models/responses/response_audio_done_event.rbi +43 -0
- data/rbi/openai/models/responses/response_audio_transcript_delta_event.rbi +53 -0
- data/rbi/openai/models/responses/response_audio_transcript_done_event.rbi +43 -0
- data/rbi/openai/models/responses/response_cancel_params.rbi +32 -0
- data/rbi/openai/models/responses/response_code_interpreter_call_code_delta_event.rbi +67 -0
- data/rbi/openai/models/responses/response_code_interpreter_call_code_done_event.rbi +67 -0
- data/rbi/openai/models/responses/response_code_interpreter_call_completed_event.rbi +77 -0
- data/rbi/openai/models/responses/response_code_interpreter_call_in_progress_event.rbi +77 -0
- data/rbi/openai/models/responses/response_code_interpreter_call_interpreting_event.rbi +77 -0
- data/rbi/openai/models/responses/response_code_interpreter_tool_call.rbi +297 -0
- data/rbi/openai/models/responses/response_completed_event.rbi +62 -0
- data/rbi/openai/models/responses/response_computer_tool_call.rbi +795 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +223 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_screenshot.rbi +59 -0
- data/rbi/openai/models/responses/response_content.rbi +31 -0
- data/rbi/openai/models/responses/response_content_part_added_event.rbi +115 -0
- data/rbi/openai/models/responses/response_content_part_done_event.rbi +115 -0
- data/rbi/openai/models/responses/response_create_params.rbi +688 -0
- data/rbi/openai/models/responses/response_created_event.rbi +62 -0
- data/rbi/openai/models/responses/response_delete_params.rbi +32 -0
- data/rbi/openai/models/responses/response_error.rbi +158 -0
- data/rbi/openai/models/responses/response_error_event.rbi +75 -0
- data/rbi/openai/models/responses/response_failed_event.rbi +62 -0
- data/rbi/openai/models/responses/response_file_search_call_completed_event.rbi +67 -0
- data/rbi/openai/models/responses/response_file_search_call_in_progress_event.rbi +67 -0
- data/rbi/openai/models/responses/response_file_search_call_searching_event.rbi +67 -0
- data/rbi/openai/models/responses/response_file_search_tool_call.rbi +276 -0
- data/rbi/openai/models/responses/response_format_text_config.rbi +41 -0
- data/rbi/openai/models/responses/response_format_text_json_schema_config.rbi +94 -0
- data/rbi/openai/models/responses/response_function_call_arguments_delta_event.rbi +75 -0
- data/rbi/openai/models/responses/response_function_call_arguments_done_event.rbi +73 -0
- data/rbi/openai/models/responses/response_function_tool_call.rbi +148 -0
- data/rbi/openai/models/responses/response_function_tool_call_item.rbi +35 -0
- data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +133 -0
- data/rbi/openai/models/responses/response_function_web_search.rbi +112 -0
- data/rbi/openai/models/responses/response_image_gen_call_completed_event.rbi +68 -0
- data/rbi/openai/models/responses/response_image_gen_call_generating_event.rbi +68 -0
- data/rbi/openai/models/responses/response_image_gen_call_in_progress_event.rbi +67 -0
- data/rbi/openai/models/responses/response_image_gen_call_partial_image_event.rbi +85 -0
- data/rbi/openai/models/responses/response_in_progress_event.rbi +62 -0
- data/rbi/openai/models/responses/response_includable.rbi +57 -0
- data/rbi/openai/models/responses/response_incomplete_event.rbi +62 -0
- data/rbi/openai/models/responses/response_input.rbi +15 -0
- data/rbi/openai/models/responses/response_input_audio.rbi +91 -0
- data/rbi/openai/models/responses/response_input_content.rbi +29 -0
- data/rbi/openai/models/responses/response_input_file.rbi +73 -0
- data/rbi/openai/models/responses/response_input_image.rbi +110 -0
- data/rbi/openai/models/responses/response_input_item.rbi +1499 -0
- data/rbi/openai/models/responses/response_input_message_content_list.rbi +15 -0
- data/rbi/openai/models/responses/response_input_message_item.rbi +225 -0
- data/rbi/openai/models/responses/response_input_text.rbi +39 -0
- data/rbi/openai/models/responses/response_item.rbi +820 -0
- data/rbi/openai/models/responses/response_item_list.rbi +97 -0
- data/rbi/openai/models/responses/response_mcp_call_arguments_delta_event.rbi +76 -0
- data/rbi/openai/models/responses/response_mcp_call_arguments_done_event.rbi +75 -0
- data/rbi/openai/models/responses/response_mcp_call_completed_event.rbi +43 -0
- data/rbi/openai/models/responses/response_mcp_call_failed_event.rbi +43 -0
- data/rbi/openai/models/responses/response_mcp_call_in_progress_event.rbi +67 -0
- data/rbi/openai/models/responses/response_mcp_list_tools_completed_event.rbi +43 -0
- data/rbi/openai/models/responses/response_mcp_list_tools_failed_event.rbi +43 -0
- data/rbi/openai/models/responses/response_mcp_list_tools_in_progress_event.rbi +44 -0
- data/rbi/openai/models/responses/response_output_audio.rbi +51 -0
- data/rbi/openai/models/responses/response_output_item.rbi +645 -0
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +81 -0
- data/rbi/openai/models/responses/response_output_item_done_event.rbi +81 -0
- data/rbi/openai/models/responses/response_output_message.rbi +162 -0
- data/rbi/openai/models/responses/response_output_refusal.rbi +39 -0
- data/rbi/openai/models/responses/response_output_text.rbi +271 -0
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +91 -0
- data/rbi/openai/models/responses/response_queued_event.rbi +62 -0
- data/rbi/openai/models/responses/response_reasoning_delta_event.rbi +83 -0
- data/rbi/openai/models/responses/response_reasoning_done_event.rbi +83 -0
- data/rbi/openai/models/responses/response_reasoning_item.rbi +170 -0
- data/rbi/openai/models/responses/response_reasoning_summary_delta_event.rbi +85 -0
- data/rbi/openai/models/responses/response_reasoning_summary_done_event.rbi +83 -0
- data/rbi/openai/models/responses/response_reasoning_summary_part_added_event.rbi +129 -0
- data/rbi/openai/models/responses/response_reasoning_summary_part_done_event.rbi +129 -0
- data/rbi/openai/models/responses/response_reasoning_summary_text_delta_event.rbi +83 -0
- data/rbi/openai/models/responses/response_reasoning_summary_text_done_event.rbi +83 -0
- data/rbi/openai/models/responses/response_refusal_delta_event.rbi +83 -0
- data/rbi/openai/models/responses/response_refusal_done_event.rbi +83 -0
- data/rbi/openai/models/responses/response_retrieve_params.rbi +62 -0
- data/rbi/openai/models/responses/response_status.rbi +36 -0
- data/rbi/openai/models/responses/response_stream_event.rbi +79 -0
- data/rbi/openai/models/responses/response_text_config.rbi +103 -0
- data/rbi/openai/models/responses/response_text_delta_event.rbi +83 -0
- data/rbi/openai/models/responses/response_text_done_event.rbi +83 -0
- data/rbi/openai/models/responses/response_usage.rbi +147 -0
- data/rbi/openai/models/responses/response_web_search_call_completed_event.rbi +67 -0
- data/rbi/openai/models/responses/response_web_search_call_in_progress_event.rbi +67 -0
- data/rbi/openai/models/responses/response_web_search_call_searching_event.rbi +67 -0
- data/rbi/openai/models/responses/tool.rbi +1063 -0
- data/rbi/openai/models/responses/tool_choice_function.rbi +39 -0
- data/rbi/openai/models/responses/tool_choice_options.rbi +36 -0
- data/rbi/openai/models/responses/tool_choice_types.rbi +121 -0
- data/rbi/openai/models/responses/web_search_tool.rbi +231 -0
- data/rbi/openai/models/responses_model.rbi +61 -0
- data/rbi/openai/models/static_file_chunking_strategy.rbi +48 -0
- data/rbi/openai/models/static_file_chunking_strategy_object.rbi +46 -0
- data/rbi/openai/models/static_file_chunking_strategy_object_param.rbi +47 -0
- data/rbi/openai/models/upload.rbi +123 -0
- data/rbi/openai/models/upload_cancel_params.rbi +27 -0
- data/rbi/openai/models/upload_complete_params.rbi +56 -0
- data/rbi/openai/models/upload_create_params.rbi +79 -0
- data/rbi/openai/models/uploads/part_create_params.rbi +45 -0
- data/rbi/openai/models/uploads/upload_part.rbi +66 -0
- data/rbi/openai/models/vector_store.rbi +254 -0
- data/rbi/openai/models/vector_store_create_params.rbi +166 -0
- data/rbi/openai/models/vector_store_delete_params.rbi +27 -0
- data/rbi/openai/models/vector_store_deleted.rbi +35 -0
- data/rbi/openai/models/vector_store_list_params.rbi +116 -0
- data/rbi/openai/models/vector_store_retrieve_params.rbi +27 -0
- data/rbi/openai/models/vector_store_search_params.rbi +242 -0
- data/rbi/openai/models/vector_store_search_response.rbi +202 -0
- data/rbi/openai/models/vector_store_update_params.rbi +113 -0
- data/rbi/openai/models/vector_stores/file_batch_cancel_params.rbi +40 -0
- data/rbi/openai/models/vector_stores/file_batch_create_params.rbi +143 -0
- data/rbi/openai/models/vector_stores/file_batch_list_files_params.rbi +224 -0
- data/rbi/openai/models/vector_stores/file_batch_retrieve_params.rbi +40 -0
- data/rbi/openai/models/vector_stores/file_content_params.rbi +40 -0
- data/rbi/openai/models/vector_stores/file_content_response.rbi +44 -0
- data/rbi/openai/models/vector_stores/file_create_params.rbi +143 -0
- data/rbi/openai/models/vector_stores/file_delete_params.rbi +40 -0
- data/rbi/openai/models/vector_stores/file_list_params.rbi +202 -0
- data/rbi/openai/models/vector_stores/file_retrieve_params.rbi +40 -0
- data/rbi/openai/models/vector_stores/file_update_params.rbi +99 -0
- data/rbi/openai/models/vector_stores/vector_store_file.rbi +337 -0
- data/rbi/openai/models/vector_stores/vector_store_file_batch.rbi +219 -0
- data/rbi/openai/models/vector_stores/vector_store_file_deleted.rbi +42 -0
- data/rbi/openai/models.rbi +202 -0
- data/rbi/openai/request_options.rbi +55 -0
- data/rbi/openai/resources/audio/speech.rbi +52 -0
- data/rbi/openai/resources/audio/transcriptions.rbi +178 -0
- data/rbi/openai/resources/audio/translations.rbi +51 -0
- data/rbi/openai/resources/audio.rbi +21 -0
- data/rbi/openai/resources/batches.rbi +104 -0
- data/rbi/openai/resources/beta/assistants.rbi +294 -0
- data/rbi/openai/resources/beta/threads/messages.rbi +159 -0
- data/rbi/openai/resources/beta/threads/runs/steps.rbi +106 -0
- data/rbi/openai/resources/beta/threads/runs.rbi +546 -0
- data/rbi/openai/resources/beta/threads.rbi +415 -0
- data/rbi/openai/resources/beta.rbi +18 -0
- data/rbi/openai/resources/chat/completions/messages.rbi +46 -0
- data/rbi/openai/resources/chat/completions.rbi +682 -0
- data/rbi/openai/resources/chat.rbi +15 -0
- data/rbi/openai/resources/completions.rbi +292 -0
- data/rbi/openai/resources/containers/files/content.rbi +27 -0
- data/rbi/openai/resources/containers/files.rbi +92 -0
- data/rbi/openai/resources/containers.rbi +86 -0
- data/rbi/openai/resources/embeddings.rbi +55 -0
- data/rbi/openai/resources/evals/runs/output_items.rbi +73 -0
- data/rbi/openai/resources/evals/runs.rbi +133 -0
- data/rbi/openai/resources/evals.rbi +146 -0
- data/rbi/openai/resources/files.rbi +122 -0
- data/rbi/openai/resources/fine_tuning/alpha/graders.rbi +65 -0
- data/rbi/openai/resources/fine_tuning/alpha.rbi +17 -0
- data/rbi/openai/resources/fine_tuning/checkpoints/permissions.rbi +94 -0
- data/rbi/openai/resources/fine_tuning/checkpoints.rbi +17 -0
- data/rbi/openai/resources/fine_tuning/jobs/checkpoints.rbi +40 -0
- data/rbi/openai/resources/fine_tuning/jobs.rbi +214 -0
- data/rbi/openai/resources/fine_tuning/methods.rbi +14 -0
- data/rbi/openai/resources/fine_tuning.rbi +24 -0
- data/rbi/openai/resources/graders/grader_models.rbi +14 -0
- data/rbi/openai/resources/graders.rbi +15 -0
- data/rbi/openai/resources/images.rbi +205 -0
- data/rbi/openai/resources/models.rbi +52 -0
- data/rbi/openai/resources/moderations.rbi +34 -0
- data/rbi/openai/resources/responses/input_items.rbi +52 -0
- data/rbi/openai/resources/responses.rbi +485 -0
- data/rbi/openai/resources/uploads/parts.rbi +41 -0
- data/rbi/openai/resources/uploads.rbi +109 -0
- data/rbi/openai/resources/vector_stores/file_batches.rbi +134 -0
- data/rbi/openai/resources/vector_stores/files.rbi +183 -0
- data/rbi/openai/resources/vector_stores.rbi +182 -0
- data/rbi/openai/structured_output.rbi +10 -0
- data/rbi/openai/version.rbi +5 -0
- data/sig/openai/client.rbs +64 -0
- data/sig/openai/errors.rbs +107 -0
- data/sig/openai/file_part.rbs +21 -0
- data/sig/openai/internal/cursor_page.rbs +13 -0
- data/sig/openai/internal/page.rbs +13 -0
- data/sig/openai/internal/stream.rbs +9 -0
- data/sig/openai/internal/transport/base_client.rbs +131 -0
- data/sig/openai/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/openai/internal/type/array_of.rbs +48 -0
- data/sig/openai/internal/type/base_model.rbs +102 -0
- data/sig/openai/internal/type/base_page.rbs +24 -0
- data/sig/openai/internal/type/base_stream.rbs +33 -0
- data/sig/openai/internal/type/boolean.rbs +26 -0
- data/sig/openai/internal/type/converter.rbs +56 -0
- data/sig/openai/internal/type/enum.rbs +32 -0
- data/sig/openai/internal/type/file_input.rbs +25 -0
- data/sig/openai/internal/type/hash_of.rbs +48 -0
- data/sig/openai/internal/type/request_parameters.rbs +17 -0
- data/sig/openai/internal/type/union.rbs +52 -0
- data/sig/openai/internal/type/unknown.rbs +26 -0
- data/sig/openai/internal/util.rbs +185 -0
- data/sig/openai/internal.rbs +9 -0
- data/sig/openai/models/all_models.rbs +31 -0
- data/sig/openai/models/audio/speech_create_params.rbs +116 -0
- data/sig/openai/models/audio/speech_model.rbs +17 -0
- data/sig/openai/models/audio/transcription.rbs +59 -0
- data/sig/openai/models/audio/transcription_create_params.rbs +163 -0
- data/sig/openai/models/audio/transcription_create_response.rbs +14 -0
- data/sig/openai/models/audio/transcription_include.rbs +15 -0
- data/sig/openai/models/audio/transcription_segment.rbs +67 -0
- data/sig/openai/models/audio/transcription_stream_event.rbs +15 -0
- data/sig/openai/models/audio/transcription_text_delta_event.rbs +60 -0
- data/sig/openai/models/audio/transcription_text_done_event.rbs +60 -0
- data/sig/openai/models/audio/transcription_verbose.rbs +50 -0
- data/sig/openai/models/audio/transcription_word.rbs +19 -0
- data/sig/openai/models/audio/translation.rbs +15 -0
- data/sig/openai/models/audio/translation_create_params.rbs +78 -0
- data/sig/openai/models/audio/translation_create_response.rbs +14 -0
- data/sig/openai/models/audio/translation_verbose.rbs +41 -0
- data/sig/openai/models/audio_model.rbs +16 -0
- data/sig/openai/models/audio_response_format.rbs +17 -0
- data/sig/openai/models/auto_file_chunking_strategy_param.rbs +13 -0
- data/sig/openai/models/batch.rbs +185 -0
- data/sig/openai/models/batch_cancel_params.rbs +14 -0
- data/sig/openai/models/batch_create_params.rbs +68 -0
- data/sig/openai/models/batch_error.rbs +34 -0
- data/sig/openai/models/batch_list_params.rbs +32 -0
- data/sig/openai/models/batch_request_counts.rbs +22 -0
- data/sig/openai/models/batch_retrieve_params.rbs +15 -0
- data/sig/openai/models/beta/assistant.rbs +136 -0
- data/sig/openai/models/beta/assistant_create_params.rbs +257 -0
- data/sig/openai/models/beta/assistant_delete_params.rbs +17 -0
- data/sig/openai/models/beta/assistant_deleted.rbs +28 -0
- data/sig/openai/models/beta/assistant_list_params.rbs +64 -0
- data/sig/openai/models/beta/assistant_response_format_option.rbs +17 -0
- data/sig/openai/models/beta/assistant_retrieve_params.rbs +17 -0
- data/sig/openai/models/beta/assistant_stream_event.rbs +535 -0
- data/sig/openai/models/beta/assistant_tool.rbs +16 -0
- data/sig/openai/models/beta/assistant_tool_choice.rbs +43 -0
- data/sig/openai/models/beta/assistant_tool_choice_function.rbs +15 -0
- data/sig/openai/models/beta/assistant_tool_choice_option.rbs +27 -0
- data/sig/openai/models/beta/assistant_update_params.rbs +222 -0
- data/sig/openai/models/beta/code_interpreter_tool.rbs +15 -0
- data/sig/openai/models/beta/file_search_tool.rbs +96 -0
- data/sig/openai/models/beta/function_tool.rbs +24 -0
- data/sig/openai/models/beta/message_stream_event.rbs +128 -0
- data/sig/openai/models/beta/run_step_stream_event.rbs +174 -0
- data/sig/openai/models/beta/run_stream_event.rbs +216 -0
- data/sig/openai/models/beta/thread.rbs +96 -0
- data/sig/openai/models/beta/thread_create_and_run_params.rbs +500 -0
- data/sig/openai/models/beta/thread_create_params.rbs +312 -0
- data/sig/openai/models/beta/thread_delete_params.rbs +17 -0
- data/sig/openai/models/beta/thread_deleted.rbs +24 -0
- data/sig/openai/models/beta/thread_retrieve_params.rbs +17 -0
- data/sig/openai/models/beta/thread_stream_event.rbs +30 -0
- data/sig/openai/models/beta/thread_update_params.rbs +87 -0
- data/sig/openai/models/beta/threads/annotation.rbs +17 -0
- data/sig/openai/models/beta/threads/annotation_delta.rbs +17 -0
- data/sig/openai/models/beta/threads/file_citation_annotation.rbs +54 -0
- data/sig/openai/models/beta/threads/file_citation_delta_annotation.rbs +75 -0
- data/sig/openai/models/beta/threads/file_path_annotation.rbs +54 -0
- data/sig/openai/models/beta/threads/file_path_delta_annotation.rbs +71 -0
- data/sig/openai/models/beta/threads/image_file.rbs +45 -0
- data/sig/openai/models/beta/threads/image_file_content_block.rbs +26 -0
- data/sig/openai/models/beta/threads/image_file_delta.rbs +47 -0
- data/sig/openai/models/beta/threads/image_file_delta_block.rbs +38 -0
- data/sig/openai/models/beta/threads/image_url.rbs +45 -0
- data/sig/openai/models/beta/threads/image_url_content_block.rbs +26 -0
- data/sig/openai/models/beta/threads/image_url_delta.rbs +47 -0
- data/sig/openai/models/beta/threads/image_url_delta_block.rbs +38 -0
- data/sig/openai/models/beta/threads/message.rbs +197 -0
- data/sig/openai/models/beta/threads/message_content.rbs +19 -0
- data/sig/openai/models/beta/threads/message_content_delta.rbs +19 -0
- data/sig/openai/models/beta/threads/message_content_part_param.rbs +18 -0
- data/sig/openai/models/beta/threads/message_create_params.rbs +116 -0
- data/sig/openai/models/beta/threads/message_delete_params.rbs +27 -0
- data/sig/openai/models/beta/threads/message_deleted.rbs +30 -0
- data/sig/openai/models/beta/threads/message_delta.rbs +48 -0
- data/sig/openai/models/beta/threads/message_delta_event.rbs +34 -0
- data/sig/openai/models/beta/threads/message_list_params.rbs +73 -0
- data/sig/openai/models/beta/threads/message_retrieve_params.rbs +27 -0
- data/sig/openai/models/beta/threads/message_update_params.rbs +32 -0
- data/sig/openai/models/beta/threads/refusal_content_block.rbs +19 -0
- data/sig/openai/models/beta/threads/refusal_delta_block.rbs +28 -0
- data/sig/openai/models/beta/threads/required_action_function_tool_call.rbs +46 -0
- data/sig/openai/models/beta/threads/run.rbs +319 -0
- data/sig/openai/models/beta/threads/run_cancel_params.rbs +27 -0
- data/sig/openai/models/beta/threads/run_create_params.rbs +260 -0
- data/sig/openai/models/beta/threads/run_list_params.rbs +66 -0
- data/sig/openai/models/beta/threads/run_retrieve_params.rbs +27 -0
- data/sig/openai/models/beta/threads/run_status.rbs +34 -0
- data/sig/openai/models/beta/threads/run_submit_tool_outputs_params.rbs +51 -0
- data/sig/openai/models/beta/threads/run_update_params.rbs +32 -0
- data/sig/openai/models/beta/threads/runs/code_interpreter_logs.rbs +30 -0
- data/sig/openai/models/beta/threads/runs/code_interpreter_output_image.rbs +52 -0
- data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call.rbs +112 -0
- data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbs +85 -0
- data/sig/openai/models/beta/threads/runs/file_search_tool_call.rbs +173 -0
- data/sig/openai/models/beta/threads/runs/file_search_tool_call_delta.rbs +38 -0
- data/sig/openai/models/beta/threads/runs/function_tool_call.rbs +58 -0
- data/sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs +73 -0
- data/sig/openai/models/beta/threads/runs/message_creation_step_details.rbs +41 -0
- data/sig/openai/models/beta/threads/runs/run_step.rbs +199 -0
- data/sig/openai/models/beta/threads/runs/run_step_delta.rbs +42 -0
- data/sig/openai/models/beta/threads/runs/run_step_delta_event.rbs +38 -0
- data/sig/openai/models/beta/threads/runs/run_step_delta_message_delta.rbs +49 -0
- data/sig/openai/models/beta/threads/runs/run_step_include.rbs +22 -0
- data/sig/openai/models/beta/threads/runs/step_list_params.rbs +82 -0
- data/sig/openai/models/beta/threads/runs/step_retrieve_params.rbs +46 -0
- data/sig/openai/models/beta/threads/runs/tool_call.rbs +20 -0
- data/sig/openai/models/beta/threads/runs/tool_call_delta.rbs +20 -0
- data/sig/openai/models/beta/threads/runs/tool_call_delta_object.rbs +35 -0
- data/sig/openai/models/beta/threads/runs/tool_calls_step_details.rbs +31 -0
- data/sig/openai/models/beta/threads/text.rbs +29 -0
- data/sig/openai/models/beta/threads/text_content_block.rbs +23 -0
- data/sig/openai/models/beta/threads/text_content_block_param.rbs +19 -0
- data/sig/openai/models/beta/threads/text_delta.rbs +35 -0
- data/sig/openai/models/beta/threads/text_delta_block.rbs +38 -0
- data/sig/openai/models/chat/chat_completion.rbs +144 -0
- data/sig/openai/models/chat/chat_completion_assistant_message_param.rbs +104 -0
- data/sig/openai/models/chat/chat_completion_audio.rbs +34 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +76 -0
- data/sig/openai/models/chat/chat_completion_chunk.rbs +289 -0
- data/sig/openai/models/chat/chat_completion_content_part.rbs +69 -0
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +67 -0
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +62 -0
- data/sig/openai/models/chat/chat_completion_content_part_refusal.rbs +20 -0
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +19 -0
- data/sig/openai/models/chat/chat_completion_deleted.rbs +30 -0
- data/sig/openai/models/chat/chat_completion_developer_message_param.rbs +47 -0
- data/sig/openai/models/chat/chat_completion_function_call_option.rbs +17 -0
- data/sig/openai/models/chat/chat_completion_function_message_param.rbs +26 -0
- data/sig/openai/models/chat/chat_completion_message.rbs +132 -0
- data/sig/openai/models/chat/chat_completion_message_param.rbs +21 -0
- data/sig/openai/models/chat/chat_completion_message_tool_call.rbs +46 -0
- data/sig/openai/models/chat/chat_completion_modality.rbs +18 -0
- data/sig/openai/models/chat/chat_completion_named_tool_choice.rbs +39 -0
- data/sig/openai/models/chat/chat_completion_prediction_content.rbs +40 -0
- data/sig/openai/models/chat/chat_completion_reasoning_effort.rbs +9 -0
- data/sig/openai/models/chat/chat_completion_role.rbs +23 -0
- data/sig/openai/models/chat/chat_completion_store_message.rbs +19 -0
- data/sig/openai/models/chat/chat_completion_stream_options.rbs +19 -0
- data/sig/openai/models/chat/chat_completion_system_message_param.rbs +47 -0
- data/sig/openai/models/chat/chat_completion_token_logprob.rbs +62 -0
- data/sig/openai/models/chat/chat_completion_tool.rbs +26 -0
- data/sig/openai/models/chat/chat_completion_tool_choice_option.rbs +29 -0
- data/sig/openai/models/chat/chat_completion_tool_message_param.rbs +45 -0
- data/sig/openai/models/chat/chat_completion_user_message_param.rbs +47 -0
- data/sig/openai/models/chat/completion_create_params.rbs +407 -0
- data/sig/openai/models/chat/completion_delete_params.rbs +17 -0
- data/sig/openai/models/chat/completion_list_params.rbs +69 -0
- data/sig/openai/models/chat/completion_retrieve_params.rbs +17 -0
- data/sig/openai/models/chat/completion_update_params.rbs +26 -0
- data/sig/openai/models/chat/completions/message_list_params.rbs +59 -0
- data/sig/openai/models/chat_model.rbs +120 -0
- data/sig/openai/models/comparison_filter.rbs +53 -0
- data/sig/openai/models/completion.rbs +54 -0
- data/sig/openai/models/completion_choice.rbs +89 -0
- data/sig/openai/models/completion_create_params.rbs +146 -0
- data/sig/openai/models/completion_usage.rbs +108 -0
- data/sig/openai/models/compound_filter.rbs +44 -0
- data/sig/openai/models/container_create_params.rbs +74 -0
- data/sig/openai/models/container_create_response.rbs +87 -0
- data/sig/openai/models/container_delete_params.rbs +15 -0
- data/sig/openai/models/container_list_params.rbs +55 -0
- data/sig/openai/models/container_list_response.rbs +87 -0
- data/sig/openai/models/container_retrieve_params.rbs +15 -0
- data/sig/openai/models/container_retrieve_response.rbs +87 -0
- data/sig/openai/models/containers/file_create_params.rbs +36 -0
- data/sig/openai/models/containers/file_create_response.rbs +52 -0
- data/sig/openai/models/containers/file_delete_params.rbs +25 -0
- data/sig/openai/models/containers/file_list_params.rbs +57 -0
- data/sig/openai/models/containers/file_list_response.rbs +52 -0
- data/sig/openai/models/containers/file_retrieve_params.rbs +25 -0
- data/sig/openai/models/containers/file_retrieve_response.rbs +52 -0
- data/sig/openai/models/containers/files/content_retrieve_params.rbs +27 -0
- data/sig/openai/models/create_embedding_response.rbs +47 -0
- data/sig/openai/models/embedding.rbs +26 -0
- data/sig/openai/models/embedding_create_params.rbs +88 -0
- data/sig/openai/models/embedding_model.rbs +18 -0
- data/sig/openai/models/error_object.rbs +30 -0
- data/sig/openai/models/eval_create_params.rbs +308 -0
- data/sig/openai/models/eval_create_response.rbs +137 -0
- data/sig/openai/models/eval_custom_data_source_config.rbs +16 -0
- data/sig/openai/models/eval_delete_params.rbs +14 -0
- data/sig/openai/models/eval_delete_response.rbs +18 -0
- data/sig/openai/models/eval_list_params.rbs +75 -0
- data/sig/openai/models/eval_list_response.rbs +137 -0
- data/sig/openai/models/eval_retrieve_params.rbs +15 -0
- data/sig/openai/models/eval_retrieve_response.rbs +137 -0
- data/sig/openai/models/eval_stored_completions_data_source_config.rbs +30 -0
- data/sig/openai/models/eval_update_params.rbs +30 -0
- data/sig/openai/models/eval_update_response.rbs +137 -0
- data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +345 -0
- data/sig/openai/models/evals/create_eval_jsonl_run_data_source.rbs +92 -0
- data/sig/openai/models/evals/eval_api_error.rbs +19 -0
- data/sig/openai/models/evals/run_cancel_params.rbs +25 -0
- data/sig/openai/models/evals/run_cancel_response.rbs +563 -0
- data/sig/openai/models/evals/run_create_params.rbs +434 -0
- data/sig/openai/models/evals/run_create_response.rbs +563 -0
- data/sig/openai/models/evals/run_delete_params.rbs +25 -0
- data/sig/openai/models/evals/run_delete_response.rbs +30 -0
- data/sig/openai/models/evals/run_list_params.rbs +80 -0
- data/sig/openai/models/evals/run_list_response.rbs +563 -0
- data/sig/openai/models/evals/run_retrieve_params.rbs +25 -0
- data/sig/openai/models/evals/run_retrieve_response.rbs +563 -0
- data/sig/openai/models/evals/runs/output_item_list_params.rbs +84 -0
- data/sig/openai/models/evals/runs/output_item_list_response.rbs +191 -0
- data/sig/openai/models/evals/runs/output_item_retrieve_params.rbs +32 -0
- data/sig/openai/models/evals/runs/output_item_retrieve_response.rbs +191 -0
- data/sig/openai/models/file_chunking_strategy.rbs +13 -0
- data/sig/openai/models/file_chunking_strategy_param.rbs +13 -0
- data/sig/openai/models/file_content.rbs +5 -0
- data/sig/openai/models/file_content_params.rbs +14 -0
- data/sig/openai/models/file_create_params.rbs +31 -0
- data/sig/openai/models/file_delete_params.rbs +14 -0
- data/sig/openai/models/file_deleted.rbs +17 -0
- data/sig/openai/models/file_list_params.rbs +62 -0
- data/sig/openai/models/file_object.rbs +99 -0
- data/sig/openai/models/file_purpose.rbs +19 -0
- data/sig/openai/models/file_retrieve_params.rbs +15 -0
- data/sig/openai/models/fine_tuning/alpha/grader_run_params.rbs +63 -0
- data/sig/openai/models/fine_tuning/alpha/grader_run_response.rbs +168 -0
- data/sig/openai/models/fine_tuning/alpha/grader_validate_params.rbs +43 -0
- data/sig/openai/models/fine_tuning/alpha/grader_validate_response.rbs +41 -0
- data/sig/openai/models/fine_tuning/checkpoints/permission_create_params.rbs +28 -0
- data/sig/openai/models/fine_tuning/checkpoints/permission_create_response.rbs +39 -0
- data/sig/openai/models/fine_tuning/checkpoints/permission_delete_params.rbs +28 -0
- data/sig/openai/models/fine_tuning/checkpoints/permission_delete_response.rbs +30 -0
- data/sig/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rbs +66 -0
- data/sig/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rbs +76 -0
- data/sig/openai/models/fine_tuning/dpo_hyperparameters.rbs +85 -0
- data/sig/openai/models/fine_tuning/dpo_method.rbs +24 -0
- data/sig/openai/models/fine_tuning/fine_tuning_job.rbs +272 -0
- data/sig/openai/models/fine_tuning/fine_tuning_job_event.rbs +83 -0
- data/sig/openai/models/fine_tuning/fine_tuning_job_integration.rbs +9 -0
- data/sig/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rbs +41 -0
- data/sig/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rbs +29 -0
- data/sig/openai/models/fine_tuning/job_cancel_params.rbs +16 -0
- data/sig/openai/models/fine_tuning/job_create_params.rbs +269 -0
- data/sig/openai/models/fine_tuning/job_list_events_params.rbs +34 -0
- data/sig/openai/models/fine_tuning/job_list_params.rbs +38 -0
- data/sig/openai/models/fine_tuning/job_pause_params.rbs +16 -0
- data/sig/openai/models/fine_tuning/job_resume_params.rbs +16 -0
- data/sig/openai/models/fine_tuning/job_retrieve_params.rbs +17 -0
- data/sig/openai/models/fine_tuning/jobs/checkpoint_list_params.rbs +36 -0
- data/sig/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rbs +115 -0
- data/sig/openai/models/fine_tuning/reinforcement_hyperparameters.rbs +141 -0
- data/sig/openai/models/fine_tuning/reinforcement_method.rbs +44 -0
- data/sig/openai/models/fine_tuning/supervised_hyperparameters.rbs +68 -0
- data/sig/openai/models/fine_tuning/supervised_method.rbs +24 -0
- data/sig/openai/models/function_definition.rbs +41 -0
- data/sig/openai/models/function_parameters.rbs +7 -0
- data/sig/openai/models/graders/label_model_grader.rbs +126 -0
- data/sig/openai/models/graders/multi_grader.rbs +52 -0
- data/sig/openai/models/graders/python_grader.rbs +36 -0
- data/sig/openai/models/graders/score_model_grader.rbs +130 -0
- data/sig/openai/models/graders/string_check_grader.rbs +57 -0
- data/sig/openai/models/graders/text_similarity_grader.rbs +73 -0
- data/sig/openai/models/image.rbs +31 -0
- data/sig/openai/models/image_create_variation_params.rbs +84 -0
- data/sig/openai/models/image_edit_params.rbs +152 -0
- data/sig/openai/models/image_generate_params.rbs +188 -0
- data/sig/openai/models/image_model.rbs +15 -0
- data/sig/openai/models/images_response.rbs +81 -0
- data/sig/openai/models/metadata.rbs +7 -0
- data/sig/openai/models/model.rbs +30 -0
- data/sig/openai/models/model_delete_params.rbs +14 -0
- data/sig/openai/models/model_deleted.rbs +17 -0
- data/sig/openai/models/model_list_params.rbs +14 -0
- data/sig/openai/models/model_retrieve_params.rbs +15 -0
- data/sig/openai/models/moderation.rbs +402 -0
- data/sig/openai/models/moderation_create_params.rbs +58 -0
- data/sig/openai/models/moderation_create_response.rbs +26 -0
- data/sig/openai/models/moderation_image_url_input.rbs +32 -0
- data/sig/openai/models/moderation_model.rbs +20 -0
- data/sig/openai/models/moderation_multi_modal_input.rbs +12 -0
- data/sig/openai/models/moderation_text_input.rbs +15 -0
- data/sig/openai/models/other_file_chunking_strategy_object.rbs +13 -0
- data/sig/openai/models/reasoning.rbs +54 -0
- data/sig/openai/models/reasoning_effort.rbs +15 -0
- data/sig/openai/models/response_format_json_object.rbs +13 -0
- data/sig/openai/models/response_format_json_schema.rbs +61 -0
- data/sig/openai/models/response_format_text.rbs +13 -0
- data/sig/openai/models/responses/computer_tool.rbs +51 -0
- data/sig/openai/models/responses/easy_input_message.rbs +69 -0
- data/sig/openai/models/responses/file_search_tool.rbs +95 -0
- data/sig/openai/models/responses/function_tool.rbs +42 -0
- data/sig/openai/models/responses/input_item_list_params.rbs +73 -0
- data/sig/openai/models/responses/response.rbs +217 -0
- data/sig/openai/models/responses/response_audio_delta_event.rbs +32 -0
- data/sig/openai/models/responses/response_audio_done_event.rbs +24 -0
- data/sig/openai/models/responses/response_audio_transcript_delta_event.rbs +32 -0
- data/sig/openai/models/responses/response_audio_transcript_done_event.rbs +24 -0
- data/sig/openai/models/responses/response_cancel_params.rbs +17 -0
- data/sig/openai/models/responses/response_code_interpreter_call_code_delta_event.rbs +37 -0
- data/sig/openai/models/responses/response_code_interpreter_call_code_done_event.rbs +37 -0
- data/sig/openai/models/responses/response_code_interpreter_call_completed_event.rbs +37 -0
- data/sig/openai/models/responses/response_code_interpreter_call_in_progress_event.rbs +37 -0
- data/sig/openai/models/responses/response_code_interpreter_call_interpreting_event.rbs +37 -0
- data/sig/openai/models/responses/response_code_interpreter_tool_call.rbs +117 -0
- data/sig/openai/models/responses/response_completed_event.rbs +32 -0
- data/sig/openai/models/responses/response_computer_tool_call.rbs +294 -0
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +82 -0
- data/sig/openai/models/responses/response_computer_tool_call_output_screenshot.rbs +32 -0
- data/sig/openai/models/responses/response_content.rbs +18 -0
- data/sig/openai/models/responses/response_content_part_added_event.rbs +57 -0
- data/sig/openai/models/responses/response_content_part_done_event.rbs +57 -0
- data/sig/openai/models/responses/response_create_params.rbs +174 -0
- data/sig/openai/models/responses/response_created_event.rbs +32 -0
- data/sig/openai/models/responses/response_delete_params.rbs +17 -0
- data/sig/openai/models/responses/response_error.rbs +72 -0
- data/sig/openai/models/responses/response_error_event.rbs +42 -0
- data/sig/openai/models/responses/response_failed_event.rbs +32 -0
- data/sig/openai/models/responses/response_file_search_call_completed_event.rbs +37 -0
- data/sig/openai/models/responses/response_file_search_call_in_progress_event.rbs +37 -0
- data/sig/openai/models/responses/response_file_search_call_searching_event.rbs +37 -0
- data/sig/openai/models/responses/response_file_search_tool_call.rbs +110 -0
- data/sig/openai/models/responses/response_format_text_config.rbs +16 -0
- data/sig/openai/models/responses/response_format_text_json_schema_config.rbs +44 -0
- data/sig/openai/models/responses/response_function_call_arguments_delta_event.rbs +42 -0
- data/sig/openai/models/responses/response_function_call_arguments_done_event.rbs +42 -0
- data/sig/openai/models/responses/response_function_tool_call.rbs +65 -0
- data/sig/openai/models/responses/response_function_tool_call_item.rbs +17 -0
- data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +58 -0
- data/sig/openai/models/responses/response_function_web_search.rbs +45 -0
- data/sig/openai/models/responses/response_image_gen_call_completed_event.rbs +37 -0
- data/sig/openai/models/responses/response_image_gen_call_generating_event.rbs +37 -0
- data/sig/openai/models/responses/response_image_gen_call_in_progress_event.rbs +37 -0
- data/sig/openai/models/responses/response_image_gen_call_partial_image_event.rbs +47 -0
- data/sig/openai/models/responses/response_in_progress_event.rbs +32 -0
- data/sig/openai/models/responses/response_includable.rbs +22 -0
- data/sig/openai/models/responses/response_incomplete_event.rbs +32 -0
- data/sig/openai/models/responses/response_input.rbs +10 -0
- data/sig/openai/models/responses/response_input_audio.rbs +43 -0
- data/sig/openai/models/responses/response_input_content.rbs +16 -0
- data/sig/openai/models/responses/response_input_file.rbs +41 -0
- data/sig/openai/models/responses/response_input_image.rbs +49 -0
- data/sig/openai/models/responses/response_input_item.rbs +630 -0
- data/sig/openai/models/responses/response_input_message_content_list.rbs +10 -0
- data/sig/openai/models/responses/response_input_message_item.rbs +84 -0
- data/sig/openai/models/responses/response_input_text.rbs +17 -0
- data/sig/openai/models/responses/response_item.rbs +399 -0
- data/sig/openai/models/responses/response_item_list.rbs +44 -0
- data/sig/openai/models/responses/response_mcp_call_arguments_delta_event.rbs +42 -0
- data/sig/openai/models/responses/response_mcp_call_arguments_done_event.rbs +42 -0
- data/sig/openai/models/responses/response_mcp_call_completed_event.rbs +24 -0
- data/sig/openai/models/responses/response_mcp_call_failed_event.rbs +24 -0
- data/sig/openai/models/responses/response_mcp_call_in_progress_event.rbs +37 -0
- data/sig/openai/models/responses/response_mcp_list_tools_completed_event.rbs +24 -0
- data/sig/openai/models/responses/response_mcp_list_tools_failed_event.rbs +24 -0
- data/sig/openai/models/responses/response_mcp_list_tools_in_progress_event.rbs +27 -0
- data/sig/openai/models/responses/response_output_audio.rbs +28 -0
- data/sig/openai/models/responses/response_output_item.rbs +314 -0
- data/sig/openai/models/responses/response_output_item_added_event.rbs +37 -0
- data/sig/openai/models/responses/response_output_item_done_event.rbs +37 -0
- data/sig/openai/models/responses/response_output_message.rbs +64 -0
- data/sig/openai/models/responses/response_output_refusal.rbs +17 -0
- data/sig/openai/models/responses/response_output_text.rbs +125 -0
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +52 -0
- data/sig/openai/models/responses/response_queued_event.rbs +32 -0
- data/sig/openai/models/responses/response_reasoning_delta_event.rbs +47 -0
- data/sig/openai/models/responses/response_reasoning_done_event.rbs +47 -0
- data/sig/openai/models/responses/response_reasoning_item.rbs +70 -0
- data/sig/openai/models/responses/response_reasoning_summary_delta_event.rbs +47 -0
- data/sig/openai/models/responses/response_reasoning_summary_done_event.rbs +47 -0
- data/sig/openai/models/responses/response_reasoning_summary_part_added_event.rbs +59 -0
- data/sig/openai/models/responses/response_reasoning_summary_part_done_event.rbs +59 -0
- data/sig/openai/models/responses/response_reasoning_summary_text_delta_event.rbs +47 -0
- data/sig/openai/models/responses/response_reasoning_summary_text_done_event.rbs +47 -0
- data/sig/openai/models/responses/response_refusal_delta_event.rbs +47 -0
- data/sig/openai/models/responses/response_refusal_done_event.rbs +47 -0
- data/sig/openai/models/responses/response_retrieve_params.rbs +30 -0
- data/sig/openai/models/responses/response_status.rbs +21 -0
- data/sig/openai/models/responses/response_stream_event.rbs +66 -0
- data/sig/openai/models/responses/response_text_config.rbs +24 -0
- data/sig/openai/models/responses/response_text_delta_event.rbs +47 -0
- data/sig/openai/models/responses/response_text_done_event.rbs +47 -0
- data/sig/openai/models/responses/response_usage.rbs +62 -0
- data/sig/openai/models/responses/response_web_search_call_completed_event.rbs +37 -0
- data/sig/openai/models/responses/response_web_search_call_in_progress_event.rbs +37 -0
- data/sig/openai/models/responses/response_web_search_call_searching_event.rbs +37 -0
- data/sig/openai/models/responses/tool.rbs +400 -0
- data/sig/openai/models/responses/tool_choice_function.rbs +17 -0
- data/sig/openai/models/responses/tool_choice_options.rbs +17 -0
- data/sig/openai/models/responses/tool_choice_types.rbs +43 -0
- data/sig/openai/models/responses/web_search_tool.rbs +96 -0
- data/sig/openai/models/responses_model.rbs +31 -0
- data/sig/openai/models/static_file_chunking_strategy.rbs +22 -0
- data/sig/openai/models/static_file_chunking_strategy_object.rbs +22 -0
- data/sig/openai/models/static_file_chunking_strategy_object_param.rbs +22 -0
- data/sig/openai/models/upload.rbs +73 -0
- data/sig/openai/models/upload_cancel_params.rbs +15 -0
- data/sig/openai/models/upload_complete_params.rbs +30 -0
- data/sig/openai/models/upload_create_params.rbs +41 -0
- data/sig/openai/models/uploads/part_create_params.rbs +26 -0
- data/sig/openai/models/uploads/upload_part.rbs +39 -0
- data/sig/openai/models/vector_store.rbs +135 -0
- data/sig/openai/models/vector_store_create_params.rbs +70 -0
- data/sig/openai/models/vector_store_delete_params.rbs +15 -0
- data/sig/openai/models/vector_store_deleted.rbs +26 -0
- data/sig/openai/models/vector_store_list_params.rbs +62 -0
- data/sig/openai/models/vector_store_retrieve_params.rbs +15 -0
- data/sig/openai/models/vector_store_search_params.rbs +115 -0
- data/sig/openai/models/vector_store_search_response.rbs +80 -0
- data/sig/openai/models/vector_store_update_params.rbs +48 -0
- data/sig/openai/models/vector_stores/file_batch_cancel_params.rbs +25 -0
- data/sig/openai/models/vector_stores/file_batch_create_params.rbs +50 -0
- data/sig/openai/models/vector_stores/file_batch_list_files_params.rbs +91 -0
- data/sig/openai/models/vector_stores/file_batch_retrieve_params.rbs +25 -0
- data/sig/openai/models/vector_stores/file_content_params.rbs +25 -0
- data/sig/openai/models/vector_stores/file_content_response.rbs +21 -0
- data/sig/openai/models/vector_stores/file_create_params.rbs +50 -0
- data/sig/openai/models/vector_stores/file_delete_params.rbs +25 -0
- data/sig/openai/models/vector_stores/file_list_params.rbs +86 -0
- data/sig/openai/models/vector_stores/file_retrieve_params.rbs +25 -0
- data/sig/openai/models/vector_stores/file_update_params.rbs +41 -0
- data/sig/openai/models/vector_stores/vector_store_file.rbs +123 -0
- data/sig/openai/models/vector_stores/vector_store_file_batch.rbs +99 -0
- data/sig/openai/models/vector_stores/vector_store_file_deleted.rbs +30 -0
- data/sig/openai/models.rbs +195 -0
- data/sig/openai/request_options.rbs +34 -0
- data/sig/openai/resources/audio/speech.rbs +19 -0
- data/sig/openai/resources/audio/transcriptions.rbs +35 -0
- data/sig/openai/resources/audio/translations.rbs +18 -0
- data/sig/openai/resources/audio.rbs +13 -0
- data/sig/openai/resources/batches.rbs +31 -0
- data/sig/openai/resources/beta/assistants.rbs +58 -0
- data/sig/openai/resources/beta/threads/messages.rbs +49 -0
- data/sig/openai/resources/beta/threads/runs/steps.rbs +32 -0
- data/sig/openai/resources/beta/threads/runs.rbs +99 -0
- data/sig/openai/resources/beta/threads.rbs +75 -0
- data/sig/openai/resources/beta.rbs +11 -0
- data/sig/openai/resources/chat/completions/messages.rbs +19 -0
- data/sig/openai/resources/chat/completions.rbs +104 -0
- data/sig/openai/resources/chat.rbs +9 -0
- data/sig/openai/resources/completions.rbs +49 -0
- data/sig/openai/resources/containers/files/content.rbs +17 -0
- data/sig/openai/resources/containers/files.rbs +38 -0
- data/sig/openai/resources/containers.rbs +33 -0
- data/sig/openai/resources/embeddings.rbs +16 -0
- data/sig/openai/resources/evals/runs/output_items.rbs +28 -0
- data/sig/openai/resources/evals/runs.rbs +46 -0
- data/sig/openai/resources/evals.rbs +42 -0
- data/sig/openai/resources/files.rbs +36 -0
- data/sig/openai/resources/fine_tuning/alpha/graders.rbs +23 -0
- data/sig/openai/resources/fine_tuning/alpha.rbs +11 -0
- data/sig/openai/resources/fine_tuning/checkpoints/permissions.rbs +32 -0
- data/sig/openai/resources/fine_tuning/checkpoints.rbs +11 -0
- data/sig/openai/resources/fine_tuning/jobs/checkpoints.rbs +18 -0
- data/sig/openai/resources/fine_tuning/jobs.rbs +58 -0
- data/sig/openai/resources/fine_tuning/methods.rbs +9 -0
- data/sig/openai/resources/fine_tuning.rbs +15 -0
- data/sig/openai/resources/graders/grader_models.rbs +9 -0
- data/sig/openai/resources/graders.rbs +9 -0
- data/sig/openai/resources/images.rbs +47 -0
- data/sig/openai/resources/models.rbs +21 -0
- data/sig/openai/resources/moderations.rbs +13 -0
- data/sig/openai/resources/responses/input_items.rbs +19 -0
- data/sig/openai/resources/responses.rbs +71 -0
- data/sig/openai/resources/uploads/parts.rbs +15 -0
- data/sig/openai/resources/uploads.rbs +29 -0
- data/sig/openai/resources/vector_stores/file_batches.rbs +40 -0
- data/sig/openai/resources/vector_stores/files.rbs +52 -0
- data/sig/openai/resources/vector_stores.rbs +56 -0
- data/sig/openai/version.rbs +3 -0
- metadata +1498 -80
- data/.gitignore +0 -9
- data/.travis.yml +0 -6
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -21
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/openai/choice.rb +0 -3
- data/lib/openai/completion.rb +0 -7
- data/lib/openai/engine.rb +0 -3
- data/lib/openai/logprobs.rb +0 -3
- data/lib/openai/search_result.rb +0 -3
- data/openai.gemspec +0 -32
@@ -0,0 +1,1351 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Chat
|
6
|
+
class CompletionCreateParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Chat::CompletionCreateParams,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# A list of messages comprising the conversation so far. Depending on the
|
19
|
+
# [model](https://platform.openai.com/docs/models) you use, different message
|
20
|
+
# types (modalities) are supported, like
|
21
|
+
# [text](https://platform.openai.com/docs/guides/text-generation),
|
22
|
+
# [images](https://platform.openai.com/docs/guides/vision), and
|
23
|
+
# [audio](https://platform.openai.com/docs/guides/audio).
|
24
|
+
sig do
|
25
|
+
returns(
|
26
|
+
T::Array[
|
27
|
+
T.any(
|
28
|
+
OpenAI::Chat::ChatCompletionDeveloperMessageParam,
|
29
|
+
OpenAI::Chat::ChatCompletionSystemMessageParam,
|
30
|
+
OpenAI::Chat::ChatCompletionUserMessageParam,
|
31
|
+
OpenAI::Chat::ChatCompletionAssistantMessageParam,
|
32
|
+
OpenAI::Chat::ChatCompletionToolMessageParam,
|
33
|
+
OpenAI::Chat::ChatCompletionFunctionMessageParam
|
34
|
+
)
|
35
|
+
]
|
36
|
+
)
|
37
|
+
end
|
38
|
+
attr_accessor :messages
|
39
|
+
|
40
|
+
# Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
|
41
|
+
# wide range of models with different capabilities, performance characteristics,
|
42
|
+
# and price points. Refer to the
|
43
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
44
|
+
# available models.
|
45
|
+
sig { returns(T.any(String, OpenAI::ChatModel::OrSymbol)) }
|
46
|
+
attr_accessor :model
|
47
|
+
|
48
|
+
# Parameters for audio output. Required when audio output is requested with
|
49
|
+
# `modalities: ["audio"]`.
|
50
|
+
# [Learn more](https://platform.openai.com/docs/guides/audio).
|
51
|
+
sig { returns(T.nilable(OpenAI::Chat::ChatCompletionAudioParam)) }
|
52
|
+
attr_reader :audio
|
53
|
+
|
54
|
+
sig do
|
55
|
+
params(
|
56
|
+
audio: T.nilable(OpenAI::Chat::ChatCompletionAudioParam::OrHash)
|
57
|
+
).void
|
58
|
+
end
|
59
|
+
attr_writer :audio
|
60
|
+
|
61
|
+
# Number between -2.0 and 2.0. Positive values penalize new tokens based on their
|
62
|
+
# existing frequency in the text so far, decreasing the model's likelihood to
|
63
|
+
# repeat the same line verbatim.
|
64
|
+
sig { returns(T.nilable(Float)) }
|
65
|
+
attr_accessor :frequency_penalty
|
66
|
+
|
67
|
+
# Deprecated in favor of `tool_choice`.
|
68
|
+
#
|
69
|
+
# Controls which (if any) function is called by the model.
|
70
|
+
#
|
71
|
+
# `none` means the model will not call a function and instead generates a message.
|
72
|
+
#
|
73
|
+
# `auto` means the model can pick between generating a message or calling a
|
74
|
+
# function.
|
75
|
+
#
|
76
|
+
# Specifying a particular function via `{"name": "my_function"}` forces the model
|
77
|
+
# to call that function.
|
78
|
+
#
|
79
|
+
# `none` is the default when no functions are present. `auto` is the default if
|
80
|
+
# functions are present.
|
81
|
+
sig do
|
82
|
+
returns(
|
83
|
+
T.nilable(
|
84
|
+
T.any(
|
85
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::OrSymbol,
|
86
|
+
OpenAI::Chat::ChatCompletionFunctionCallOption
|
87
|
+
)
|
88
|
+
)
|
89
|
+
)
|
90
|
+
end
|
91
|
+
attr_reader :function_call
|
92
|
+
|
93
|
+
sig do
|
94
|
+
params(
|
95
|
+
function_call:
|
96
|
+
T.any(
|
97
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::OrSymbol,
|
98
|
+
OpenAI::Chat::ChatCompletionFunctionCallOption::OrHash
|
99
|
+
)
|
100
|
+
).void
|
101
|
+
end
|
102
|
+
attr_writer :function_call
|
103
|
+
|
104
|
+
# Deprecated in favor of `tools`.
|
105
|
+
#
|
106
|
+
# A list of functions the model may generate JSON inputs for.
|
107
|
+
sig do
|
108
|
+
returns(
|
109
|
+
T.nilable(T::Array[OpenAI::Chat::CompletionCreateParams::Function])
|
110
|
+
)
|
111
|
+
end
|
112
|
+
attr_reader :functions
|
113
|
+
|
114
|
+
sig do
|
115
|
+
params(
|
116
|
+
functions:
|
117
|
+
T::Array[OpenAI::Chat::CompletionCreateParams::Function::OrHash]
|
118
|
+
).void
|
119
|
+
end
|
120
|
+
attr_writer :functions
|
121
|
+
|
122
|
+
# Modify the likelihood of specified tokens appearing in the completion.
|
123
|
+
#
|
124
|
+
# Accepts a JSON object that maps tokens (specified by their token ID in the
|
125
|
+
# tokenizer) to an associated bias value from -100 to 100. Mathematically, the
|
126
|
+
# bias is added to the logits generated by the model prior to sampling. The exact
|
127
|
+
# effect will vary per model, but values between -1 and 1 should decrease or
|
128
|
+
# increase likelihood of selection; values like -100 or 100 should result in a ban
|
129
|
+
# or exclusive selection of the relevant token.
|
130
|
+
sig { returns(T.nilable(T::Hash[Symbol, Integer])) }
|
131
|
+
attr_accessor :logit_bias
|
132
|
+
|
133
|
+
# Whether to return log probabilities of the output tokens or not. If true,
|
134
|
+
# returns the log probabilities of each output token returned in the `content` of
|
135
|
+
# `message`.
|
136
|
+
sig { returns(T.nilable(T::Boolean)) }
|
137
|
+
attr_accessor :logprobs
|
138
|
+
|
139
|
+
# An upper bound for the number of tokens that can be generated for a completion,
|
140
|
+
# including visible output tokens and
|
141
|
+
# [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
142
|
+
sig { returns(T.nilable(Integer)) }
|
143
|
+
attr_accessor :max_completion_tokens
|
144
|
+
|
145
|
+
# The maximum number of [tokens](/tokenizer) that can be generated in the chat
|
146
|
+
# completion. This value can be used to control
|
147
|
+
# [costs](https://openai.com/api/pricing/) for text generated via API.
|
148
|
+
#
|
149
|
+
# This value is now deprecated in favor of `max_completion_tokens`, and is not
|
150
|
+
# compatible with
|
151
|
+
# [o-series models](https://platform.openai.com/docs/guides/reasoning).
|
152
|
+
sig { returns(T.nilable(Integer)) }
|
153
|
+
attr_accessor :max_tokens
|
154
|
+
|
155
|
+
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
156
|
+
# for storing additional information about the object in a structured format, and
|
157
|
+
# querying for objects via API or the dashboard.
|
158
|
+
#
|
159
|
+
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
160
|
+
# a maximum length of 512 characters.
|
161
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
162
|
+
attr_accessor :metadata
|
163
|
+
|
164
|
+
# Output types that you would like the model to generate. Most models are capable
|
165
|
+
# of generating text, which is the default:
|
166
|
+
#
|
167
|
+
# `["text"]`
|
168
|
+
#
|
169
|
+
# The `gpt-4o-audio-preview` model can also be used to
|
170
|
+
# [generate audio](https://platform.openai.com/docs/guides/audio). To request that
|
171
|
+
# this model generate both text and audio responses, you can use:
|
172
|
+
#
|
173
|
+
# `["text", "audio"]`
|
174
|
+
sig do
|
175
|
+
returns(
|
176
|
+
T.nilable(
|
177
|
+
T::Array[OpenAI::Chat::CompletionCreateParams::Modality::OrSymbol]
|
178
|
+
)
|
179
|
+
)
|
180
|
+
end
|
181
|
+
attr_accessor :modalities
|
182
|
+
|
183
|
+
# How many chat completion choices to generate for each input message. Note that
|
184
|
+
# you will be charged based on the number of generated tokens across all of the
|
185
|
+
# choices. Keep `n` as `1` to minimize costs.
|
186
|
+
sig { returns(T.nilable(Integer)) }
|
187
|
+
attr_accessor :n
|
188
|
+
|
189
|
+
# Whether to enable
|
190
|
+
# [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
191
|
+
# during tool use.
|
192
|
+
sig { returns(T.nilable(T::Boolean)) }
|
193
|
+
attr_reader :parallel_tool_calls
|
194
|
+
|
195
|
+
sig { params(parallel_tool_calls: T::Boolean).void }
|
196
|
+
attr_writer :parallel_tool_calls
|
197
|
+
|
198
|
+
# Static predicted output content, such as the content of a text file that is
|
199
|
+
# being regenerated.
|
200
|
+
sig do
|
201
|
+
returns(T.nilable(OpenAI::Chat::ChatCompletionPredictionContent))
|
202
|
+
end
|
203
|
+
attr_reader :prediction
|
204
|
+
|
205
|
+
sig do
|
206
|
+
params(
|
207
|
+
prediction:
|
208
|
+
T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash)
|
209
|
+
).void
|
210
|
+
end
|
211
|
+
attr_writer :prediction
|
212
|
+
|
213
|
+
# Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
214
|
+
# whether they appear in the text so far, increasing the model's likelihood to
|
215
|
+
# talk about new topics.
|
216
|
+
sig { returns(T.nilable(Float)) }
|
217
|
+
attr_accessor :presence_penalty
|
218
|
+
|
219
|
+
# **o-series models only**
|
220
|
+
#
|
221
|
+
# Constrains effort on reasoning for
|
222
|
+
# [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
|
223
|
+
# supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
|
224
|
+
# result in faster responses and fewer tokens used on reasoning in a response.
|
225
|
+
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
226
|
+
attr_accessor :reasoning_effort
|
227
|
+
|
228
|
+
# An object specifying the format that the model must output.
|
229
|
+
#
|
230
|
+
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
231
|
+
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
232
|
+
# in the
|
233
|
+
# [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
234
|
+
#
|
235
|
+
# Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
236
|
+
# ensures the message the model generates is valid JSON. Using `json_schema` is
|
237
|
+
# preferred for models that support it.
|
238
|
+
sig do
|
239
|
+
returns(
|
240
|
+
T.nilable(
|
241
|
+
T.any(
|
242
|
+
OpenAI::ResponseFormatText,
|
243
|
+
OpenAI::ResponseFormatJSONSchema,
|
244
|
+
OpenAI::StructuredOutput::JsonSchemaConverter,
|
245
|
+
OpenAI::ResponseFormatJSONObject
|
246
|
+
)
|
247
|
+
)
|
248
|
+
)
|
249
|
+
end
|
250
|
+
attr_reader :response_format
|
251
|
+
|
252
|
+
sig do
|
253
|
+
params(
|
254
|
+
response_format:
|
255
|
+
T.any(
|
256
|
+
OpenAI::ResponseFormatText::OrHash,
|
257
|
+
OpenAI::ResponseFormatJSONSchema::OrHash,
|
258
|
+
OpenAI::StructuredOutput::JsonSchemaConverter,
|
259
|
+
OpenAI::ResponseFormatJSONObject::OrHash
|
260
|
+
)
|
261
|
+
).void
|
262
|
+
end
|
263
|
+
attr_writer :response_format
|
264
|
+
|
265
|
+
# This feature is in Beta. If specified, our system will make a best effort to
|
266
|
+
# sample deterministically, such that repeated requests with the same `seed` and
|
267
|
+
# parameters should return the same result. Determinism is not guaranteed, and you
|
268
|
+
# should refer to the `system_fingerprint` response parameter to monitor changes
|
269
|
+
# in the backend.
|
270
|
+
sig { returns(T.nilable(Integer)) }
|
271
|
+
attr_accessor :seed
|
272
|
+
|
273
|
+
# Specifies the latency tier to use for processing the request. This parameter is
|
274
|
+
# relevant for customers subscribed to the scale tier service:
|
275
|
+
#
|
276
|
+
# - If set to 'auto', and the Project is Scale tier enabled, the system will
|
277
|
+
# utilize scale tier credits until they are exhausted.
|
278
|
+
# - If set to 'auto', and the Project is not Scale tier enabled, the request will
|
279
|
+
# be processed using the default service tier with a lower uptime SLA and no
|
280
|
+
# latency guarentee.
|
281
|
+
# - If set to 'default', the request will be processed using the default service
|
282
|
+
# tier with a lower uptime SLA and no latency guarentee.
|
283
|
+
# - If set to 'flex', the request will be processed with the Flex Processing
|
284
|
+
# service tier.
|
285
|
+
# [Learn more](https://platform.openai.com/docs/guides/flex-processing).
|
286
|
+
# - When not set, the default behavior is 'auto'.
|
287
|
+
#
|
288
|
+
# When this parameter is set, the response body will include the `service_tier`
|
289
|
+
# utilized.
|
290
|
+
sig do
|
291
|
+
returns(
|
292
|
+
T.nilable(
|
293
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::OrSymbol
|
294
|
+
)
|
295
|
+
)
|
296
|
+
end
|
297
|
+
attr_accessor :service_tier
|
298
|
+
|
299
|
+
# Not supported with latest reasoning models `o3` and `o4-mini`.
|
300
|
+
#
|
301
|
+
# Up to 4 sequences where the API will stop generating further tokens. The
|
302
|
+
# returned text will not contain the stop sequence.
|
303
|
+
sig do
|
304
|
+
returns(
|
305
|
+
T.nilable(OpenAI::Chat::CompletionCreateParams::Stop::Variants)
|
306
|
+
)
|
307
|
+
end
|
308
|
+
attr_accessor :stop
|
309
|
+
|
310
|
+
# Whether or not to store the output of this chat completion request for use in
|
311
|
+
# our [model distillation](https://platform.openai.com/docs/guides/distillation)
|
312
|
+
# or [evals](https://platform.openai.com/docs/guides/evals) products.
|
313
|
+
sig { returns(T.nilable(T::Boolean)) }
|
314
|
+
attr_accessor :store
|
315
|
+
|
316
|
+
# Options for streaming response. Only set this when you set `stream: true`.
|
317
|
+
sig { returns(T.nilable(OpenAI::Chat::ChatCompletionStreamOptions)) }
|
318
|
+
attr_reader :stream_options
|
319
|
+
|
320
|
+
sig do
|
321
|
+
params(
|
322
|
+
stream_options:
|
323
|
+
T.nilable(OpenAI::Chat::ChatCompletionStreamOptions::OrHash)
|
324
|
+
).void
|
325
|
+
end
|
326
|
+
attr_writer :stream_options
|
327
|
+
|
328
|
+
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
329
|
+
# make the output more random, while lower values like 0.2 will make it more
|
330
|
+
# focused and deterministic. We generally recommend altering this or `top_p` but
|
331
|
+
# not both.
|
332
|
+
sig { returns(T.nilable(Float)) }
|
333
|
+
attr_accessor :temperature
|
334
|
+
|
335
|
+
# Controls which (if any) tool is called by the model. `none` means the model will
|
336
|
+
# not call any tool and instead generates a message. `auto` means the model can
|
337
|
+
# pick between generating a message or calling one or more tools. `required` means
|
338
|
+
# the model must call one or more tools. Specifying a particular tool via
|
339
|
+
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
340
|
+
# call that tool.
|
341
|
+
#
|
342
|
+
# `none` is the default when no tools are present. `auto` is the default if tools
|
343
|
+
# are present.
|
344
|
+
sig do
|
345
|
+
returns(
|
346
|
+
T.nilable(
|
347
|
+
T.any(
|
348
|
+
OpenAI::Chat::ChatCompletionToolChoiceOption::Auto::OrSymbol,
|
349
|
+
OpenAI::Chat::ChatCompletionNamedToolChoice
|
350
|
+
)
|
351
|
+
)
|
352
|
+
)
|
353
|
+
end
|
354
|
+
attr_reader :tool_choice
|
355
|
+
|
356
|
+
sig do
|
357
|
+
params(
|
358
|
+
tool_choice:
|
359
|
+
T.any(
|
360
|
+
OpenAI::Chat::ChatCompletionToolChoiceOption::Auto::OrSymbol,
|
361
|
+
OpenAI::Chat::ChatCompletionNamedToolChoice::OrHash
|
362
|
+
)
|
363
|
+
).void
|
364
|
+
end
|
365
|
+
attr_writer :tool_choice
|
366
|
+
|
367
|
+
# A list of tools the model may call. Currently, only functions are supported as a
|
368
|
+
# tool. Use this to provide a list of functions the model may generate JSON inputs
|
369
|
+
# for. A max of 128 functions are supported.
|
370
|
+
sig { returns(T.nilable(T::Array[OpenAI::Chat::ChatCompletionTool])) }
|
371
|
+
attr_reader :tools
|
372
|
+
|
373
|
+
sig do
|
374
|
+
params(
|
375
|
+
tools:
|
376
|
+
T::Array[
|
377
|
+
T.any(
|
378
|
+
OpenAI::Chat::ChatCompletionTool::OrHash,
|
379
|
+
OpenAI::StructuredOutput::JsonSchemaConverter
|
380
|
+
)
|
381
|
+
]
|
382
|
+
).void
|
383
|
+
end
|
384
|
+
attr_writer :tools
|
385
|
+
|
386
|
+
# An integer between 0 and 20 specifying the number of most likely tokens to
|
387
|
+
# return at each token position, each with an associated log probability.
|
388
|
+
# `logprobs` must be set to `true` if this parameter is used.
|
389
|
+
sig { returns(T.nilable(Integer)) }
|
390
|
+
attr_accessor :top_logprobs
|
391
|
+
|
392
|
+
# An alternative to sampling with temperature, called nucleus sampling, where the
|
393
|
+
# model considers the results of the tokens with top_p probability mass. So 0.1
|
394
|
+
# means only the tokens comprising the top 10% probability mass are considered.
|
395
|
+
#
|
396
|
+
# We generally recommend altering this or `temperature` but not both.
|
397
|
+
sig { returns(T.nilable(Float)) }
|
398
|
+
attr_accessor :top_p
|
399
|
+
|
400
|
+
# A stable identifier for your end-users. Used to boost cache hit rates by better
|
401
|
+
# bucketing similar requests and to help OpenAI detect and prevent abuse.
|
402
|
+
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
403
|
+
sig { returns(T.nilable(String)) }
|
404
|
+
attr_reader :user
|
405
|
+
|
406
|
+
sig { params(user: String).void }
|
407
|
+
attr_writer :user
|
408
|
+
|
409
|
+
# This tool searches the web for relevant results to use in a response. Learn more
|
410
|
+
# about the
|
411
|
+
# [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
|
412
|
+
sig do
|
413
|
+
returns(
|
414
|
+
T.nilable(OpenAI::Chat::CompletionCreateParams::WebSearchOptions)
|
415
|
+
)
|
416
|
+
end
|
417
|
+
attr_reader :web_search_options
|
418
|
+
|
419
|
+
sig do
|
420
|
+
params(
|
421
|
+
web_search_options:
|
422
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::OrHash
|
423
|
+
).void
|
424
|
+
end
|
425
|
+
attr_writer :web_search_options
|
426
|
+
|
427
|
+
sig do
|
428
|
+
params(
|
429
|
+
messages:
|
430
|
+
T::Array[
|
431
|
+
T.any(
|
432
|
+
OpenAI::Chat::ChatCompletionDeveloperMessageParam::OrHash,
|
433
|
+
OpenAI::Chat::ChatCompletionSystemMessageParam::OrHash,
|
434
|
+
OpenAI::Chat::ChatCompletionUserMessageParam::OrHash,
|
435
|
+
OpenAI::Chat::ChatCompletionAssistantMessageParam::OrHash,
|
436
|
+
OpenAI::Chat::ChatCompletionToolMessageParam::OrHash,
|
437
|
+
OpenAI::Chat::ChatCompletionFunctionMessageParam::OrHash
|
438
|
+
)
|
439
|
+
],
|
440
|
+
model: T.any(String, OpenAI::ChatModel::OrSymbol),
|
441
|
+
audio: T.nilable(OpenAI::Chat::ChatCompletionAudioParam::OrHash),
|
442
|
+
frequency_penalty: T.nilable(Float),
|
443
|
+
function_call:
|
444
|
+
T.any(
|
445
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::OrSymbol,
|
446
|
+
OpenAI::Chat::ChatCompletionFunctionCallOption::OrHash
|
447
|
+
),
|
448
|
+
functions:
|
449
|
+
T::Array[OpenAI::Chat::CompletionCreateParams::Function::OrHash],
|
450
|
+
logit_bias: T.nilable(T::Hash[Symbol, Integer]),
|
451
|
+
logprobs: T.nilable(T::Boolean),
|
452
|
+
max_completion_tokens: T.nilable(Integer),
|
453
|
+
max_tokens: T.nilable(Integer),
|
454
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
455
|
+
modalities:
|
456
|
+
T.nilable(
|
457
|
+
T::Array[
|
458
|
+
OpenAI::Chat::CompletionCreateParams::Modality::OrSymbol
|
459
|
+
]
|
460
|
+
),
|
461
|
+
n: T.nilable(Integer),
|
462
|
+
parallel_tool_calls: T::Boolean,
|
463
|
+
prediction:
|
464
|
+
T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash),
|
465
|
+
presence_penalty: T.nilable(Float),
|
466
|
+
reasoning_effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
467
|
+
response_format:
|
468
|
+
T.any(
|
469
|
+
OpenAI::ResponseFormatText::OrHash,
|
470
|
+
OpenAI::ResponseFormatJSONSchema::OrHash,
|
471
|
+
OpenAI::StructuredOutput::JsonSchemaConverter,
|
472
|
+
OpenAI::ResponseFormatJSONObject::OrHash
|
473
|
+
),
|
474
|
+
seed: T.nilable(Integer),
|
475
|
+
service_tier:
|
476
|
+
T.nilable(
|
477
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::OrSymbol
|
478
|
+
),
|
479
|
+
stop:
|
480
|
+
T.nilable(OpenAI::Chat::CompletionCreateParams::Stop::Variants),
|
481
|
+
store: T.nilable(T::Boolean),
|
482
|
+
stream_options:
|
483
|
+
T.nilable(OpenAI::Chat::ChatCompletionStreamOptions::OrHash),
|
484
|
+
temperature: T.nilable(Float),
|
485
|
+
tool_choice:
|
486
|
+
T.any(
|
487
|
+
OpenAI::Chat::ChatCompletionToolChoiceOption::Auto::OrSymbol,
|
488
|
+
OpenAI::Chat::ChatCompletionNamedToolChoice::OrHash
|
489
|
+
),
|
490
|
+
tools:
|
491
|
+
T::Array[
|
492
|
+
T.any(
|
493
|
+
OpenAI::Chat::ChatCompletionTool::OrHash,
|
494
|
+
OpenAI::StructuredOutput::JsonSchemaConverter
|
495
|
+
)
|
496
|
+
],
|
497
|
+
top_logprobs: T.nilable(Integer),
|
498
|
+
top_p: T.nilable(Float),
|
499
|
+
user: String,
|
500
|
+
web_search_options:
|
501
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::OrHash,
|
502
|
+
request_options: OpenAI::RequestOptions::OrHash
|
503
|
+
).returns(T.attached_class)
|
504
|
+
end
|
505
|
+
def self.new(
|
506
|
+
# A list of messages comprising the conversation so far. Depending on the
|
507
|
+
# [model](https://platform.openai.com/docs/models) you use, different message
|
508
|
+
# types (modalities) are supported, like
|
509
|
+
# [text](https://platform.openai.com/docs/guides/text-generation),
|
510
|
+
# [images](https://platform.openai.com/docs/guides/vision), and
|
511
|
+
# [audio](https://platform.openai.com/docs/guides/audio).
|
512
|
+
messages:,
|
513
|
+
# Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
|
514
|
+
# wide range of models with different capabilities, performance characteristics,
|
515
|
+
# and price points. Refer to the
|
516
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
517
|
+
# available models.
|
518
|
+
model:,
|
519
|
+
# Parameters for audio output. Required when audio output is requested with
|
520
|
+
# `modalities: ["audio"]`.
|
521
|
+
# [Learn more](https://platform.openai.com/docs/guides/audio).
|
522
|
+
audio: nil,
|
523
|
+
# Number between -2.0 and 2.0. Positive values penalize new tokens based on their
|
524
|
+
# existing frequency in the text so far, decreasing the model's likelihood to
|
525
|
+
# repeat the same line verbatim.
|
526
|
+
frequency_penalty: nil,
|
527
|
+
# Deprecated in favor of `tool_choice`.
|
528
|
+
#
|
529
|
+
# Controls which (if any) function is called by the model.
|
530
|
+
#
|
531
|
+
# `none` means the model will not call a function and instead generates a message.
|
532
|
+
#
|
533
|
+
# `auto` means the model can pick between generating a message or calling a
|
534
|
+
# function.
|
535
|
+
#
|
536
|
+
# Specifying a particular function via `{"name": "my_function"}` forces the model
|
537
|
+
# to call that function.
|
538
|
+
#
|
539
|
+
# `none` is the default when no functions are present. `auto` is the default if
|
540
|
+
# functions are present.
|
541
|
+
function_call: nil,
|
542
|
+
# Deprecated in favor of `tools`.
|
543
|
+
#
|
544
|
+
# A list of functions the model may generate JSON inputs for.
|
545
|
+
functions: nil,
|
546
|
+
# Modify the likelihood of specified tokens appearing in the completion.
|
547
|
+
#
|
548
|
+
# Accepts a JSON object that maps tokens (specified by their token ID in the
|
549
|
+
# tokenizer) to an associated bias value from -100 to 100. Mathematically, the
|
550
|
+
# bias is added to the logits generated by the model prior to sampling. The exact
|
551
|
+
# effect will vary per model, but values between -1 and 1 should decrease or
|
552
|
+
# increase likelihood of selection; values like -100 or 100 should result in a ban
|
553
|
+
# or exclusive selection of the relevant token.
|
554
|
+
logit_bias: nil,
|
555
|
+
# Whether to return log probabilities of the output tokens or not. If true,
|
556
|
+
# returns the log probabilities of each output token returned in the `content` of
|
557
|
+
# `message`.
|
558
|
+
logprobs: nil,
|
559
|
+
# An upper bound for the number of tokens that can be generated for a completion,
|
560
|
+
# including visible output tokens and
|
561
|
+
# [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
562
|
+
max_completion_tokens: nil,
|
563
|
+
# The maximum number of [tokens](/tokenizer) that can be generated in the chat
|
564
|
+
# completion. This value can be used to control
|
565
|
+
# [costs](https://openai.com/api/pricing/) for text generated via API.
|
566
|
+
#
|
567
|
+
# This value is now deprecated in favor of `max_completion_tokens`, and is not
|
568
|
+
# compatible with
|
569
|
+
# [o-series models](https://platform.openai.com/docs/guides/reasoning).
|
570
|
+
max_tokens: nil,
|
571
|
+
# Set of 16 key-value pairs that can be attached to an object. This can be useful
|
572
|
+
# for storing additional information about the object in a structured format, and
|
573
|
+
# querying for objects via API or the dashboard.
|
574
|
+
#
|
575
|
+
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
576
|
+
# a maximum length of 512 characters.
|
577
|
+
metadata: nil,
|
578
|
+
# Output types that you would like the model to generate. Most models are capable
|
579
|
+
# of generating text, which is the default:
|
580
|
+
#
|
581
|
+
# `["text"]`
|
582
|
+
#
|
583
|
+
# The `gpt-4o-audio-preview` model can also be used to
|
584
|
+
# [generate audio](https://platform.openai.com/docs/guides/audio). To request that
|
585
|
+
# this model generate both text and audio responses, you can use:
|
586
|
+
#
|
587
|
+
# `["text", "audio"]`
|
588
|
+
modalities: nil,
|
589
|
+
# How many chat completion choices to generate for each input message. Note that
|
590
|
+
# you will be charged based on the number of generated tokens across all of the
|
591
|
+
# choices. Keep `n` as `1` to minimize costs.
|
592
|
+
n: nil,
|
593
|
+
# Whether to enable
|
594
|
+
# [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
595
|
+
# during tool use.
|
596
|
+
parallel_tool_calls: nil,
|
597
|
+
# Static predicted output content, such as the content of a text file that is
|
598
|
+
# being regenerated.
|
599
|
+
prediction: nil,
|
600
|
+
# Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
601
|
+
# whether they appear in the text so far, increasing the model's likelihood to
|
602
|
+
# talk about new topics.
|
603
|
+
presence_penalty: nil,
|
604
|
+
# **o-series models only**
|
605
|
+
#
|
606
|
+
# Constrains effort on reasoning for
|
607
|
+
# [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
|
608
|
+
# supported values are `low`, `medium`, and `high`. Reducing reasoning effort can
|
609
|
+
# result in faster responses and fewer tokens used on reasoning in a response.
|
610
|
+
reasoning_effort: nil,
|
611
|
+
# An object specifying the format that the model must output.
|
612
|
+
#
|
613
|
+
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
614
|
+
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
615
|
+
# in the
|
616
|
+
# [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
617
|
+
#
|
618
|
+
# Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
619
|
+
# ensures the message the model generates is valid JSON. Using `json_schema` is
|
620
|
+
# preferred for models that support it.
|
621
|
+
response_format: nil,
|
622
|
+
# This feature is in Beta. If specified, our system will make a best effort to
|
623
|
+
# sample deterministically, such that repeated requests with the same `seed` and
|
624
|
+
# parameters should return the same result. Determinism is not guaranteed, and you
|
625
|
+
# should refer to the `system_fingerprint` response parameter to monitor changes
|
626
|
+
# in the backend.
|
627
|
+
seed: nil,
|
628
|
+
# Specifies the latency tier to use for processing the request. This parameter is
|
629
|
+
# relevant for customers subscribed to the scale tier service:
|
630
|
+
#
|
631
|
+
# - If set to 'auto', and the Project is Scale tier enabled, the system will
|
632
|
+
# utilize scale tier credits until they are exhausted.
|
633
|
+
# - If set to 'auto', and the Project is not Scale tier enabled, the request will
|
634
|
+
# be processed using the default service tier with a lower uptime SLA and no
|
635
|
+
# latency guarentee.
|
636
|
+
# - If set to 'default', the request will be processed using the default service
|
637
|
+
# tier with a lower uptime SLA and no latency guarentee.
|
638
|
+
# - If set to 'flex', the request will be processed with the Flex Processing
|
639
|
+
# service tier.
|
640
|
+
# [Learn more](https://platform.openai.com/docs/guides/flex-processing).
|
641
|
+
# - When not set, the default behavior is 'auto'.
|
642
|
+
#
|
643
|
+
# When this parameter is set, the response body will include the `service_tier`
|
644
|
+
# utilized.
|
645
|
+
service_tier: nil,
|
646
|
+
# Not supported with latest reasoning models `o3` and `o4-mini`.
|
647
|
+
#
|
648
|
+
# Up to 4 sequences where the API will stop generating further tokens. The
|
649
|
+
# returned text will not contain the stop sequence.
|
650
|
+
stop: nil,
|
651
|
+
# Whether or not to store the output of this chat completion request for use in
|
652
|
+
# our [model distillation](https://platform.openai.com/docs/guides/distillation)
|
653
|
+
# or [evals](https://platform.openai.com/docs/guides/evals) products.
|
654
|
+
store: nil,
|
655
|
+
# Options for streaming response. Only set this when you set `stream: true`.
|
656
|
+
stream_options: nil,
|
657
|
+
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
658
|
+
# make the output more random, while lower values like 0.2 will make it more
|
659
|
+
# focused and deterministic. We generally recommend altering this or `top_p` but
|
660
|
+
# not both.
|
661
|
+
temperature: nil,
|
662
|
+
# Controls which (if any) tool is called by the model. `none` means the model will
|
663
|
+
# not call any tool and instead generates a message. `auto` means the model can
|
664
|
+
# pick between generating a message or calling one or more tools. `required` means
|
665
|
+
# the model must call one or more tools. Specifying a particular tool via
|
666
|
+
# `{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
667
|
+
# call that tool.
|
668
|
+
#
|
669
|
+
# `none` is the default when no tools are present. `auto` is the default if tools
|
670
|
+
# are present.
|
671
|
+
tool_choice: nil,
|
672
|
+
# A list of tools the model may call. Currently, only functions are supported as a
|
673
|
+
# tool. Use this to provide a list of functions the model may generate JSON inputs
|
674
|
+
# for. A max of 128 functions are supported.
|
675
|
+
tools: nil,
|
676
|
+
# An integer between 0 and 20 specifying the number of most likely tokens to
|
677
|
+
# return at each token position, each with an associated log probability.
|
678
|
+
# `logprobs` must be set to `true` if this parameter is used.
|
679
|
+
top_logprobs: nil,
|
680
|
+
# An alternative to sampling with temperature, called nucleus sampling, where the
|
681
|
+
# model considers the results of the tokens with top_p probability mass. So 0.1
|
682
|
+
# means only the tokens comprising the top 10% probability mass are considered.
|
683
|
+
#
|
684
|
+
# We generally recommend altering this or `temperature` but not both.
|
685
|
+
top_p: nil,
|
686
|
+
# A stable identifier for your end-users. Used to boost cache hit rates by better
|
687
|
+
# bucketing similar requests and to help OpenAI detect and prevent abuse.
|
688
|
+
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
689
|
+
user: nil,
|
690
|
+
# This tool searches the web for relevant results to use in a response. Learn more
|
691
|
+
# about the
|
692
|
+
# [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
|
693
|
+
web_search_options: nil,
|
694
|
+
request_options: {}
|
695
|
+
)
|
696
|
+
end
|
697
|
+
|
698
|
+
sig do
|
699
|
+
override.returns(
|
700
|
+
{
|
701
|
+
messages:
|
702
|
+
T::Array[
|
703
|
+
T.any(
|
704
|
+
OpenAI::Chat::ChatCompletionDeveloperMessageParam,
|
705
|
+
OpenAI::Chat::ChatCompletionSystemMessageParam,
|
706
|
+
OpenAI::Chat::ChatCompletionUserMessageParam,
|
707
|
+
OpenAI::Chat::ChatCompletionAssistantMessageParam,
|
708
|
+
OpenAI::Chat::ChatCompletionToolMessageParam,
|
709
|
+
OpenAI::Chat::ChatCompletionFunctionMessageParam
|
710
|
+
)
|
711
|
+
],
|
712
|
+
model: T.any(String, OpenAI::ChatModel::OrSymbol),
|
713
|
+
audio: T.nilable(OpenAI::Chat::ChatCompletionAudioParam),
|
714
|
+
frequency_penalty: T.nilable(Float),
|
715
|
+
function_call:
|
716
|
+
T.any(
|
717
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::OrSymbol,
|
718
|
+
OpenAI::Chat::ChatCompletionFunctionCallOption
|
719
|
+
),
|
720
|
+
functions:
|
721
|
+
T::Array[OpenAI::Chat::CompletionCreateParams::Function],
|
722
|
+
logit_bias: T.nilable(T::Hash[Symbol, Integer]),
|
723
|
+
logprobs: T.nilable(T::Boolean),
|
724
|
+
max_completion_tokens: T.nilable(Integer),
|
725
|
+
max_tokens: T.nilable(Integer),
|
726
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
727
|
+
modalities:
|
728
|
+
T.nilable(
|
729
|
+
T::Array[
|
730
|
+
OpenAI::Chat::CompletionCreateParams::Modality::OrSymbol
|
731
|
+
]
|
732
|
+
),
|
733
|
+
n: T.nilable(Integer),
|
734
|
+
parallel_tool_calls: T::Boolean,
|
735
|
+
prediction:
|
736
|
+
T.nilable(OpenAI::Chat::ChatCompletionPredictionContent),
|
737
|
+
presence_penalty: T.nilable(Float),
|
738
|
+
reasoning_effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
739
|
+
response_format:
|
740
|
+
T.any(
|
741
|
+
OpenAI::ResponseFormatText,
|
742
|
+
OpenAI::ResponseFormatJSONSchema,
|
743
|
+
OpenAI::ResponseFormatJSONObject
|
744
|
+
),
|
745
|
+
seed: T.nilable(Integer),
|
746
|
+
service_tier:
|
747
|
+
T.nilable(
|
748
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::OrSymbol
|
749
|
+
),
|
750
|
+
stop:
|
751
|
+
T.nilable(OpenAI::Chat::CompletionCreateParams::Stop::Variants),
|
752
|
+
store: T.nilable(T::Boolean),
|
753
|
+
stream_options:
|
754
|
+
T.nilable(OpenAI::Chat::ChatCompletionStreamOptions),
|
755
|
+
temperature: T.nilable(Float),
|
756
|
+
tool_choice:
|
757
|
+
T.any(
|
758
|
+
OpenAI::Chat::ChatCompletionToolChoiceOption::Auto::OrSymbol,
|
759
|
+
OpenAI::Chat::ChatCompletionNamedToolChoice
|
760
|
+
),
|
761
|
+
tools:
|
762
|
+
T::Array[
|
763
|
+
T.any(
|
764
|
+
OpenAI::Chat::ChatCompletionTool,
|
765
|
+
OpenAI::StructuredOutput::JsonSchemaConverter
|
766
|
+
)
|
767
|
+
],
|
768
|
+
top_logprobs: T.nilable(Integer),
|
769
|
+
top_p: T.nilable(Float),
|
770
|
+
user: String,
|
771
|
+
web_search_options:
|
772
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions,
|
773
|
+
request_options: OpenAI::RequestOptions
|
774
|
+
}
|
775
|
+
)
|
776
|
+
end
|
777
|
+
def to_hash
|
778
|
+
end
|
779
|
+
|
780
|
+
# Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
|
781
|
+
# wide range of models with different capabilities, performance characteristics,
|
782
|
+
# and price points. Refer to the
|
783
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
784
|
+
# available models.
|
785
|
+
module Model
|
786
|
+
extend OpenAI::Internal::Type::Union
|
787
|
+
|
788
|
+
Variants =
|
789
|
+
T.type_alias { T.any(String, OpenAI::ChatModel::TaggedSymbol) }
|
790
|
+
|
791
|
+
sig do
|
792
|
+
override.returns(
|
793
|
+
T::Array[OpenAI::Chat::CompletionCreateParams::Model::Variants]
|
794
|
+
)
|
795
|
+
end
|
796
|
+
def self.variants
|
797
|
+
end
|
798
|
+
end
|
799
|
+
|
800
|
+
# Deprecated in favor of `tool_choice`.
|
801
|
+
#
|
802
|
+
# Controls which (if any) function is called by the model.
|
803
|
+
#
|
804
|
+
# `none` means the model will not call a function and instead generates a message.
|
805
|
+
#
|
806
|
+
# `auto` means the model can pick between generating a message or calling a
|
807
|
+
# function.
|
808
|
+
#
|
809
|
+
# Specifying a particular function via `{"name": "my_function"}` forces the model
|
810
|
+
# to call that function.
|
811
|
+
#
|
812
|
+
# `none` is the default when no functions are present. `auto` is the default if
|
813
|
+
# functions are present.
|
814
|
+
module FunctionCall
|
815
|
+
extend OpenAI::Internal::Type::Union
|
816
|
+
|
817
|
+
Variants =
|
818
|
+
T.type_alias do
|
819
|
+
T.any(
|
820
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::TaggedSymbol,
|
821
|
+
OpenAI::Chat::ChatCompletionFunctionCallOption
|
822
|
+
)
|
823
|
+
end
|
824
|
+
|
825
|
+
# `none` means the model will not call a function and instead generates a message.
|
826
|
+
# `auto` means the model can pick between generating a message or calling a
|
827
|
+
# function.
|
828
|
+
module FunctionCallMode
|
829
|
+
extend OpenAI::Internal::Type::Enum
|
830
|
+
|
831
|
+
TaggedSymbol =
|
832
|
+
T.type_alias do
|
833
|
+
T.all(
|
834
|
+
Symbol,
|
835
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode
|
836
|
+
)
|
837
|
+
end
|
838
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
839
|
+
|
840
|
+
NONE =
|
841
|
+
T.let(
|
842
|
+
:none,
|
843
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::TaggedSymbol
|
844
|
+
)
|
845
|
+
AUTO =
|
846
|
+
T.let(
|
847
|
+
:auto,
|
848
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::TaggedSymbol
|
849
|
+
)
|
850
|
+
|
851
|
+
sig do
|
852
|
+
override.returns(
|
853
|
+
T::Array[
|
854
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::FunctionCallMode::TaggedSymbol
|
855
|
+
]
|
856
|
+
)
|
857
|
+
end
|
858
|
+
def self.values
|
859
|
+
end
|
860
|
+
end
|
861
|
+
|
862
|
+
sig do
|
863
|
+
override.returns(
|
864
|
+
T::Array[
|
865
|
+
OpenAI::Chat::CompletionCreateParams::FunctionCall::Variants
|
866
|
+
]
|
867
|
+
)
|
868
|
+
end
|
869
|
+
def self.variants
|
870
|
+
end
|
871
|
+
end
|
872
|
+
|
873
|
+
class Function < OpenAI::Internal::Type::BaseModel
|
874
|
+
OrHash =
|
875
|
+
T.type_alias do
|
876
|
+
T.any(
|
877
|
+
OpenAI::Chat::CompletionCreateParams::Function,
|
878
|
+
OpenAI::Internal::AnyHash
|
879
|
+
)
|
880
|
+
end
|
881
|
+
|
882
|
+
# The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
883
|
+
# underscores and dashes, with a maximum length of 64.
|
884
|
+
sig { returns(String) }
|
885
|
+
attr_accessor :name
|
886
|
+
|
887
|
+
# A description of what the function does, used by the model to choose when and
|
888
|
+
# how to call the function.
|
889
|
+
sig { returns(T.nilable(String)) }
|
890
|
+
attr_reader :description
|
891
|
+
|
892
|
+
sig { params(description: String).void }
|
893
|
+
attr_writer :description
|
894
|
+
|
895
|
+
# The parameters the functions accepts, described as a JSON Schema object. See the
|
896
|
+
# [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
|
897
|
+
# and the
|
898
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
899
|
+
# documentation about the format.
|
900
|
+
#
|
901
|
+
# Omitting `parameters` defines a function with an empty parameter list.
|
902
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
903
|
+
attr_reader :parameters
|
904
|
+
|
905
|
+
sig { params(parameters: T::Hash[Symbol, T.anything]).void }
|
906
|
+
attr_writer :parameters
|
907
|
+
|
908
|
+
sig do
|
909
|
+
params(
|
910
|
+
name: String,
|
911
|
+
description: String,
|
912
|
+
parameters: T::Hash[Symbol, T.anything]
|
913
|
+
).returns(T.attached_class)
|
914
|
+
end
|
915
|
+
def self.new(
|
916
|
+
# The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
|
917
|
+
# underscores and dashes, with a maximum length of 64.
|
918
|
+
name:,
|
919
|
+
# A description of what the function does, used by the model to choose when and
|
920
|
+
# how to call the function.
|
921
|
+
description: nil,
|
922
|
+
# The parameters the functions accepts, described as a JSON Schema object. See the
|
923
|
+
# [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
|
924
|
+
# and the
|
925
|
+
# [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
926
|
+
# documentation about the format.
|
927
|
+
#
|
928
|
+
# Omitting `parameters` defines a function with an empty parameter list.
|
929
|
+
parameters: nil
|
930
|
+
)
|
931
|
+
end
|
932
|
+
|
933
|
+
sig do
|
934
|
+
override.returns(
|
935
|
+
{
|
936
|
+
name: String,
|
937
|
+
description: String,
|
938
|
+
parameters: T::Hash[Symbol, T.anything]
|
939
|
+
}
|
940
|
+
)
|
941
|
+
end
|
942
|
+
def to_hash
|
943
|
+
end
|
944
|
+
end
|
945
|
+
|
946
|
+
module Modality
|
947
|
+
extend OpenAI::Internal::Type::Enum
|
948
|
+
|
949
|
+
TaggedSymbol =
|
950
|
+
T.type_alias do
|
951
|
+
T.all(Symbol, OpenAI::Chat::CompletionCreateParams::Modality)
|
952
|
+
end
|
953
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
954
|
+
|
955
|
+
TEXT =
|
956
|
+
T.let(
|
957
|
+
:text,
|
958
|
+
OpenAI::Chat::CompletionCreateParams::Modality::TaggedSymbol
|
959
|
+
)
|
960
|
+
AUDIO =
|
961
|
+
T.let(
|
962
|
+
:audio,
|
963
|
+
OpenAI::Chat::CompletionCreateParams::Modality::TaggedSymbol
|
964
|
+
)
|
965
|
+
|
966
|
+
sig do
|
967
|
+
override.returns(
|
968
|
+
T::Array[
|
969
|
+
OpenAI::Chat::CompletionCreateParams::Modality::TaggedSymbol
|
970
|
+
]
|
971
|
+
)
|
972
|
+
end
|
973
|
+
def self.values
|
974
|
+
end
|
975
|
+
end
|
976
|
+
|
977
|
+
# An object specifying the format that the model must output.
|
978
|
+
#
|
979
|
+
# Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
980
|
+
# Outputs which ensures the model will match your supplied JSON schema. Learn more
|
981
|
+
# in the
|
982
|
+
# [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
983
|
+
#
|
984
|
+
# Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
985
|
+
# ensures the message the model generates is valid JSON. Using `json_schema` is
|
986
|
+
# preferred for models that support it.
|
987
|
+
module ResponseFormat
|
988
|
+
extend OpenAI::Internal::Type::Union
|
989
|
+
|
990
|
+
Variants =
|
991
|
+
T.type_alias do
|
992
|
+
T.any(
|
993
|
+
OpenAI::ResponseFormatText,
|
994
|
+
OpenAI::ResponseFormatJSONSchema,
|
995
|
+
OpenAI::StructuredOutput::JsonSchemaConverter,
|
996
|
+
OpenAI::ResponseFormatJSONObject
|
997
|
+
)
|
998
|
+
end
|
999
|
+
|
1000
|
+
sig do
|
1001
|
+
override.returns(
|
1002
|
+
T::Array[
|
1003
|
+
OpenAI::Chat::CompletionCreateParams::ResponseFormat::Variants
|
1004
|
+
]
|
1005
|
+
)
|
1006
|
+
end
|
1007
|
+
def self.variants
|
1008
|
+
end
|
1009
|
+
end
|
1010
|
+
|
1011
|
+
# Specifies the latency tier to use for processing the request. This parameter is
|
1012
|
+
# relevant for customers subscribed to the scale tier service:
|
1013
|
+
#
|
1014
|
+
# - If set to 'auto', and the Project is Scale tier enabled, the system will
|
1015
|
+
# utilize scale tier credits until they are exhausted.
|
1016
|
+
# - If set to 'auto', and the Project is not Scale tier enabled, the request will
|
1017
|
+
# be processed using the default service tier with a lower uptime SLA and no
|
1018
|
+
# latency guarentee.
|
1019
|
+
# - If set to 'default', the request will be processed using the default service
|
1020
|
+
# tier with a lower uptime SLA and no latency guarentee.
|
1021
|
+
# - If set to 'flex', the request will be processed with the Flex Processing
|
1022
|
+
# service tier.
|
1023
|
+
# [Learn more](https://platform.openai.com/docs/guides/flex-processing).
|
1024
|
+
# - When not set, the default behavior is 'auto'.
|
1025
|
+
#
|
1026
|
+
# When this parameter is set, the response body will include the `service_tier`
|
1027
|
+
# utilized.
|
1028
|
+
module ServiceTier
|
1029
|
+
extend OpenAI::Internal::Type::Enum
|
1030
|
+
|
1031
|
+
TaggedSymbol =
|
1032
|
+
T.type_alias do
|
1033
|
+
T.all(Symbol, OpenAI::Chat::CompletionCreateParams::ServiceTier)
|
1034
|
+
end
|
1035
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1036
|
+
|
1037
|
+
AUTO =
|
1038
|
+
T.let(
|
1039
|
+
:auto,
|
1040
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::TaggedSymbol
|
1041
|
+
)
|
1042
|
+
DEFAULT =
|
1043
|
+
T.let(
|
1044
|
+
:default,
|
1045
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::TaggedSymbol
|
1046
|
+
)
|
1047
|
+
FLEX =
|
1048
|
+
T.let(
|
1049
|
+
:flex,
|
1050
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::TaggedSymbol
|
1051
|
+
)
|
1052
|
+
|
1053
|
+
sig do
|
1054
|
+
override.returns(
|
1055
|
+
T::Array[
|
1056
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::TaggedSymbol
|
1057
|
+
]
|
1058
|
+
)
|
1059
|
+
end
|
1060
|
+
def self.values
|
1061
|
+
end
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
# Not supported with latest reasoning models `o3` and `o4-mini`.
|
1065
|
+
#
|
1066
|
+
# Up to 4 sequences where the API will stop generating further tokens. The
|
1067
|
+
# returned text will not contain the stop sequence.
|
1068
|
+
module Stop
|
1069
|
+
extend OpenAI::Internal::Type::Union
|
1070
|
+
|
1071
|
+
Variants = T.type_alias { T.nilable(T.any(String, T::Array[String])) }
|
1072
|
+
|
1073
|
+
sig do
|
1074
|
+
override.returns(
|
1075
|
+
T::Array[OpenAI::Chat::CompletionCreateParams::Stop::Variants]
|
1076
|
+
)
|
1077
|
+
end
|
1078
|
+
def self.variants
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
StringArray =
|
1082
|
+
T.let(
|
1083
|
+
OpenAI::Internal::Type::ArrayOf[String],
|
1084
|
+
OpenAI::Internal::Type::Converter
|
1085
|
+
)
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
class WebSearchOptions < OpenAI::Internal::Type::BaseModel
|
1089
|
+
OrHash =
|
1090
|
+
T.type_alias do
|
1091
|
+
T.any(
|
1092
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions,
|
1093
|
+
OpenAI::Internal::AnyHash
|
1094
|
+
)
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# High level guidance for the amount of context window space to use for the
|
1098
|
+
# search. One of `low`, `medium`, or `high`. `medium` is the default.
|
1099
|
+
sig do
|
1100
|
+
returns(
|
1101
|
+
T.nilable(
|
1102
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::OrSymbol
|
1103
|
+
)
|
1104
|
+
)
|
1105
|
+
end
|
1106
|
+
attr_reader :search_context_size
|
1107
|
+
|
1108
|
+
sig do
|
1109
|
+
params(
|
1110
|
+
search_context_size:
|
1111
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::OrSymbol
|
1112
|
+
).void
|
1113
|
+
end
|
1114
|
+
attr_writer :search_context_size
|
1115
|
+
|
1116
|
+
# Approximate location parameters for the search.
|
1117
|
+
sig do
|
1118
|
+
returns(
|
1119
|
+
T.nilable(
|
1120
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation
|
1121
|
+
)
|
1122
|
+
)
|
1123
|
+
end
|
1124
|
+
attr_reader :user_location
|
1125
|
+
|
1126
|
+
sig do
|
1127
|
+
params(
|
1128
|
+
user_location:
|
1129
|
+
T.nilable(
|
1130
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::OrHash
|
1131
|
+
)
|
1132
|
+
).void
|
1133
|
+
end
|
1134
|
+
attr_writer :user_location
|
1135
|
+
|
1136
|
+
# This tool searches the web for relevant results to use in a response. Learn more
|
1137
|
+
# about the
|
1138
|
+
# [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
|
1139
|
+
sig do
|
1140
|
+
params(
|
1141
|
+
search_context_size:
|
1142
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::OrSymbol,
|
1143
|
+
user_location:
|
1144
|
+
T.nilable(
|
1145
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::OrHash
|
1146
|
+
)
|
1147
|
+
).returns(T.attached_class)
|
1148
|
+
end
|
1149
|
+
def self.new(
|
1150
|
+
# High level guidance for the amount of context window space to use for the
|
1151
|
+
# search. One of `low`, `medium`, or `high`. `medium` is the default.
|
1152
|
+
search_context_size: nil,
|
1153
|
+
# Approximate location parameters for the search.
|
1154
|
+
user_location: nil
|
1155
|
+
)
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
sig do
|
1159
|
+
override.returns(
|
1160
|
+
{
|
1161
|
+
search_context_size:
|
1162
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::OrSymbol,
|
1163
|
+
user_location:
|
1164
|
+
T.nilable(
|
1165
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation
|
1166
|
+
)
|
1167
|
+
}
|
1168
|
+
)
|
1169
|
+
end
|
1170
|
+
def to_hash
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
# High level guidance for the amount of context window space to use for the
|
1174
|
+
# search. One of `low`, `medium`, or `high`. `medium` is the default.
|
1175
|
+
module SearchContextSize
|
1176
|
+
extend OpenAI::Internal::Type::Enum
|
1177
|
+
|
1178
|
+
TaggedSymbol =
|
1179
|
+
T.type_alias do
|
1180
|
+
T.all(
|
1181
|
+
Symbol,
|
1182
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize
|
1183
|
+
)
|
1184
|
+
end
|
1185
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1186
|
+
|
1187
|
+
LOW =
|
1188
|
+
T.let(
|
1189
|
+
:low,
|
1190
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::TaggedSymbol
|
1191
|
+
)
|
1192
|
+
MEDIUM =
|
1193
|
+
T.let(
|
1194
|
+
:medium,
|
1195
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::TaggedSymbol
|
1196
|
+
)
|
1197
|
+
HIGH =
|
1198
|
+
T.let(
|
1199
|
+
:high,
|
1200
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::TaggedSymbol
|
1201
|
+
)
|
1202
|
+
|
1203
|
+
sig do
|
1204
|
+
override.returns(
|
1205
|
+
T::Array[
|
1206
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::SearchContextSize::TaggedSymbol
|
1207
|
+
]
|
1208
|
+
)
|
1209
|
+
end
|
1210
|
+
def self.values
|
1211
|
+
end
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
class UserLocation < OpenAI::Internal::Type::BaseModel
|
1215
|
+
OrHash =
|
1216
|
+
T.type_alias do
|
1217
|
+
T.any(
|
1218
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation,
|
1219
|
+
OpenAI::Internal::AnyHash
|
1220
|
+
)
|
1221
|
+
end
|
1222
|
+
|
1223
|
+
# Approximate location parameters for the search.
|
1224
|
+
sig do
|
1225
|
+
returns(
|
1226
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate
|
1227
|
+
)
|
1228
|
+
end
|
1229
|
+
attr_reader :approximate
|
1230
|
+
|
1231
|
+
sig do
|
1232
|
+
params(
|
1233
|
+
approximate:
|
1234
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate::OrHash
|
1235
|
+
).void
|
1236
|
+
end
|
1237
|
+
attr_writer :approximate
|
1238
|
+
|
1239
|
+
# The type of location approximation. Always `approximate`.
|
1240
|
+
sig { returns(Symbol) }
|
1241
|
+
attr_accessor :type
|
1242
|
+
|
1243
|
+
# Approximate location parameters for the search.
|
1244
|
+
sig do
|
1245
|
+
params(
|
1246
|
+
approximate:
|
1247
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate::OrHash,
|
1248
|
+
type: Symbol
|
1249
|
+
).returns(T.attached_class)
|
1250
|
+
end
|
1251
|
+
def self.new(
|
1252
|
+
# Approximate location parameters for the search.
|
1253
|
+
approximate:,
|
1254
|
+
# The type of location approximation. Always `approximate`.
|
1255
|
+
type: :approximate
|
1256
|
+
)
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
sig do
|
1260
|
+
override.returns(
|
1261
|
+
{
|
1262
|
+
approximate:
|
1263
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate,
|
1264
|
+
type: Symbol
|
1265
|
+
}
|
1266
|
+
)
|
1267
|
+
end
|
1268
|
+
def to_hash
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
class Approximate < OpenAI::Internal::Type::BaseModel
|
1272
|
+
OrHash =
|
1273
|
+
T.type_alias do
|
1274
|
+
T.any(
|
1275
|
+
OpenAI::Chat::CompletionCreateParams::WebSearchOptions::UserLocation::Approximate,
|
1276
|
+
OpenAI::Internal::AnyHash
|
1277
|
+
)
|
1278
|
+
end
|
1279
|
+
|
1280
|
+
# Free text input for the city of the user, e.g. `San Francisco`.
|
1281
|
+
sig { returns(T.nilable(String)) }
|
1282
|
+
attr_reader :city
|
1283
|
+
|
1284
|
+
sig { params(city: String).void }
|
1285
|
+
attr_writer :city
|
1286
|
+
|
1287
|
+
# The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of
|
1288
|
+
# the user, e.g. `US`.
|
1289
|
+
sig { returns(T.nilable(String)) }
|
1290
|
+
attr_reader :country
|
1291
|
+
|
1292
|
+
sig { params(country: String).void }
|
1293
|
+
attr_writer :country
|
1294
|
+
|
1295
|
+
# Free text input for the region of the user, e.g. `California`.
|
1296
|
+
sig { returns(T.nilable(String)) }
|
1297
|
+
attr_reader :region
|
1298
|
+
|
1299
|
+
sig { params(region: String).void }
|
1300
|
+
attr_writer :region
|
1301
|
+
|
1302
|
+
# The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the
|
1303
|
+
# user, e.g. `America/Los_Angeles`.
|
1304
|
+
sig { returns(T.nilable(String)) }
|
1305
|
+
attr_reader :timezone
|
1306
|
+
|
1307
|
+
sig { params(timezone: String).void }
|
1308
|
+
attr_writer :timezone
|
1309
|
+
|
1310
|
+
# Approximate location parameters for the search.
|
1311
|
+
sig do
|
1312
|
+
params(
|
1313
|
+
city: String,
|
1314
|
+
country: String,
|
1315
|
+
region: String,
|
1316
|
+
timezone: String
|
1317
|
+
).returns(T.attached_class)
|
1318
|
+
end
|
1319
|
+
def self.new(
|
1320
|
+
# Free text input for the city of the user, e.g. `San Francisco`.
|
1321
|
+
city: nil,
|
1322
|
+
# The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of
|
1323
|
+
# the user, e.g. `US`.
|
1324
|
+
country: nil,
|
1325
|
+
# Free text input for the region of the user, e.g. `California`.
|
1326
|
+
region: nil,
|
1327
|
+
# The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the
|
1328
|
+
# user, e.g. `America/Los_Angeles`.
|
1329
|
+
timezone: nil
|
1330
|
+
)
|
1331
|
+
end
|
1332
|
+
|
1333
|
+
sig do
|
1334
|
+
override.returns(
|
1335
|
+
{
|
1336
|
+
city: String,
|
1337
|
+
country: String,
|
1338
|
+
region: String,
|
1339
|
+
timezone: String
|
1340
|
+
}
|
1341
|
+
)
|
1342
|
+
end
|
1343
|
+
def to_hash
|
1344
|
+
end
|
1345
|
+
end
|
1346
|
+
end
|
1347
|
+
end
|
1348
|
+
end
|
1349
|
+
end
|
1350
|
+
end
|
1351
|
+
end
|