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 ⇒ Pathname, ...
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
-
#model ⇒ String, ...
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 ⇒ Symbol, ...
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
Some parameter documentations has been truncated, see TranslationCreateParams for more details.
- #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, #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
Some parameter documentations has been truncated, see OpenAI::Models::Audio::TranslationCreateParams for more details.
|
|
# File 'lib/openai/models/audio/translation_create_params.rb', line 57
|
Instance Attribute Details
#file ⇒ Pathname, ...
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 ⇒ String, ...
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 ⇒ Symbol, ...
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 83
|
Instance Method Details
#to_hash ⇒ {
45 |
# File 'sig/openai/models/audio/translation_create_params.rbs', line 45
def to_hash: -> {
|