Class: OpenAI::Models::Audio::TranslationCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Audio::TranslationCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/audio/translation_create_params.rb,
sig/openai/models/audio/translation_create_params.rbs
Overview
Defined Under Namespace
Modules: Model, ResponseFormat
Instance Attribute Summary collapse
-
#file ⇒ OpenAI::Internal::file_input
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
#model ⇒ OpenAI::Models::Audio::TranslationCreateParams::model
ID of the model to use.
-
#prompt ⇒ String?
An optional text to guide the model's style or continue a previous audio segment.
-
#response_format ⇒ OpenAI::Models::Audio::TranslationCreateParams::response_format?
The format of the output, in one of these options:
json,text,srt,verbose_json, orvtt. -
#temperature ⇒ Float?
The sampling temperature, between 0 and 1.
Attributes included from Internal::Type::RequestParameters
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(file:, model:, prompt: nil, response_format: nil, temperature: nil, request_options: {}) ⇒ Object constructor
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(file:, model:, prompt: nil, response_format: nil, temperature: nil, request_options: {}) ⇒ Object
|
|
# File 'lib/openai/models/audio/translation_create_params.rb', line 57
|
Instance Attribute Details
#file ⇒ OpenAI::Internal::file_input
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include enough format metadata for the file to be identified. We recommend an extension-bearing filename and an appropriate content type.
String, StringIO, and pathless IO inputs are sent with generic upload
metadata. Use OpenAI::FilePart when you need to override the filename or
content type.
22 |
# File 'lib/openai/models/audio/translation_create_params.rb', line 22 required :file, OpenAI::Internal::Type::FileInput |
#model ⇒ OpenAI::Models::Audio::TranslationCreateParams::model
ID of the model to use. Only whisper-1 (which is powered by our open source
Whisper V2 model) is currently available.
29 |
# File 'lib/openai/models/audio/translation_create_params.rb', line 29 required :model, union: -> { OpenAI::Audio::TranslationCreateParams::Model } |
#prompt ⇒ String?
An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English.
38 |
# File 'lib/openai/models/audio/translation_create_params.rb', line 38 optional :prompt, String |
#response_format ⇒ OpenAI::Models::Audio::TranslationCreateParams::response_format?
The format of the output, in one of these options: json, text, srt,
verbose_json, or vtt.
45 |
# File 'lib/openai/models/audio/translation_create_params.rb', line 45 optional :response_format, enum: -> { OpenAI::Audio::TranslationCreateParams::ResponseFormat } |
#temperature ⇒ Float?
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
55 |
# File 'lib/openai/models/audio/translation_create_params.rb', line 55 optional :temperature, Float |
Class Method Details
.variants ⇒ Array(String, Symbol, OpenAI::Models::AudioModel)
|
|
# File 'lib/openai/models/audio/translation_create_params.rb', line 101
|
Instance Method Details
#to_hash ⇒ {
103 |
# File 'sig/openai/models/audio/translation_create_params.rbs', line 103
def to_hash: -> {
|