Closed francoabaroa closed 3 months ago
Thanks for catching this!
Hrrmm, let me figure out why the tests are suddenly breaking before merging this
Continuing in https://github.com/dvcrn/ex_openai/pull/20
Issue was that you're using is_binary
to check the response, in Elixir all strings are binaries so the condition would always match, not only for when raw binary is returned
When creating audio speech (TTS), OpenAI returns binary data. Add a check to see if you leave it as is, or decode JSON if necessary