Class: OpenAI::Models::Audio::TranslationCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/audio/translation_create_params.rb

Overview

Defined Under Namespace

Modules: Model, ResponseFormat

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, 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.

Parameters:

  • file (Pathname, StringIO, IO, String, OpenAI::FilePart) (defaults to: )

    The audio file object (not file name) translate, in one of these formats: flac,

  • model (String, Symbol, OpenAI::Models::AudioModel) (defaults to: )

    ID of the model to use. Only ‘whisper-1` (which is powered by our open source Wh

  • prompt (String) (defaults to: nil)

    An optional text to guide the model’s style or continue a previous audio segment

  • response_format (Symbol, OpenAI::Models::Audio::TranslationCreateParams::ResponseFormat) (defaults to: nil)

    The format of the output, in one of these options: ‘json`, `text`, `srt`, `verbo

  • temperature (Float) (defaults to: nil)

    The sampling temperature, between 0 and 1. Higher values like 0.8 will make the

  • request_options (OpenAI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/openai/models/audio/translation_create_params.rb', line 51

Instance Attribute Details

#filePathname, ...

The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

Returns:



16
# File 'lib/openai/models/audio/translation_create_params.rb', line 16

required :file, OpenAI::Internal::Type::FileInput

#modelString, ...

ID of the model to use. Only ‘whisper-1` (which is powered by our open source Whisper V2 model) is currently available.

Returns:



23
# File 'lib/openai/models/audio/translation_create_params.rb', line 23

required :model, union: -> { OpenAI::Audio::TranslationCreateParams::Model }

#promptString?

An optional text to guide the model’s style or continue a previous audio segment. The [prompt](platform.openai.com/docs/guides/speech-to-text#prompting) should be in English.

Returns:

  • (String, nil)


32
# File 'lib/openai/models/audio/translation_create_params.rb', line 32

optional :prompt, String

#response_formatSymbol, ...

The format of the output, in one of these options: ‘json`, `text`, `srt`, `verbose_json`, or `vtt`.



39
# File 'lib/openai/models/audio/translation_create_params.rb', line 39

optional :response_format, enum: -> { OpenAI::Audio::TranslationCreateParams::ResponseFormat }

#temperatureFloat?

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](en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.

Returns:

  • (Float, nil)


49
# File 'lib/openai/models/audio/translation_create_params.rb', line 49

optional :temperature, Float

Class Method Details

.variantsArray(String, Symbol, OpenAI::Models::AudioModel)

Returns:



# File 'lib/openai/models/audio/translation_create_params.rb', line 77