TranslationRequest class

Annotations
  • @freezed

Constructors

TranslationRequest({required String file, @Default(Models.whisper_1) String model, String? prompt, String? responseFormat, double? temperature})
const
factory
TranslationRequest.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $TranslationRequestCopyWith<TranslationRequest>
no setterinherited
file String
The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
model String
ID of the model to use. Only Models.whisper_1 is currently available.
no setterinherited
prompt String?
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
no setterinherited
responseFormat String?
The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt. Defaults to json.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature double?
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. Defaults to 0.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited