Audio transcription API fails with non-json response_format
field in request
#133
Labels
bug
Something isn't working
response_format
field in request
#133
Describe the bug
The
OpenAIClient::audio_transcription(&self, req:AudioTranscriptionRequest)
method takes in a request of structure:where
response_format
seems to be directly mapped to theresponse_format
API argument described in OpenAI's documentation. However, when it is given a non-json argument,text
in my case, the method fails to parse the response while attempting to deserialize it from an assumedjson
format, giving an error.To Reproduce
AudioTranscriptionRequest
with itsresponse_format
field set toSome("text".to_string())
.OpenAIClient::audio_transcription(&self, req:AudioTranscriptionRequest)
.Code snippets
OS
Windows 10(Ubuntu 22.04 WSL2), Also tested on MacOS 15.1.1
Rust version
Rust v1.83.0
Library version
openai-api-rs v5.2.3
The text was updated successfully, but these errors were encountered: