ruby-openai
ruby-openai copied to clipboard
JSON::ParserError with different response_format - Whisper
Describe the bug Whisper supports a few different response types like json, text, art, verbose json or vtt, when you set vtt for example it can't parse to json.
To Reproduce Steps to reproduce the behavior:
- Go to the terminal and to execute:
OpenAI::Client.new.transcribe(
parameters: {
model: 'whisper-1',
file: 'your_file_path',
response_format: 'vtt'
})
- See error
Expected behavior response in all formats available for openAI
Same issue,
JSON::ParserError: unexpected token at 'WEBVTT
When I request response_format: "vtt"
This 100% used to work in previous versions of this gem.