Closed lzell closed 2 months ago
If a customer specifies that the whisper response format is text, then we don't want to json deserialize the http response body from OpenAI.
Before this change, a request format like the following would raise on the let response = try line:
let response = try
let requestBody = OpenAICreateTranscriptionRequestBody( file: try Data(contentsOf: url), model: "whisper-1", responseFormat: "text" ) let response = try await openAIService.createTranscriptionRequest(body: requestBody)
This patch skips the use of Decodable and instead instantiates the OpenAICreateTranscriptionResponseBody directly using the http response body.
OpenAICreateTranscriptionResponseBody
Thanks to Pierre for reporting!
If a customer specifies that the whisper response format is text, then we don't want to json deserialize the http response body from OpenAI.
Before this change, a request format like the following would raise on the
let response = try
line:This patch skips the use of Decodable and instead instantiates the
OpenAICreateTranscriptionResponseBody
directly using the http response body.Thanks to Pierre for reporting!