Add post_form_raw

This commit is contained in:
Dongri Jin
2024-12-15 18:17:10 +09:00
parent fe38e1320a
commit 85d204faf9
2 changed files with 39 additions and 1 deletions

View File

@ -12,7 +12,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
WHISPER_1.to_string(),
);
let result = client.audio_transcription(req).await?;
let req_json = req.clone().response_format("json".to_string());
let result = client.audio_transcription(req_json).await?;
println!("{:?}", result);
let req_raw = req.clone().response_format("text".to_string());
let result = client.audio_transcription_raw(req_raw).await?;
println!("{:?}", result);
Ok(())