toJson method
Implementation
Future<FormData> toJson() async {
return FormData.fromMap({
'file': File(file.name).existsSync()
? await MultipartFile.fromFile(file.path, filename: file.path)
: null,
'prompt': prompt,
"model": "whisper-1",
'response_format': responseFormat == null
? AudioFormat.json.getName()
: responseFormat?.getName(),
'temperature': temperature,
'language': language,
});
}