We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Reading files such as pngs that are generated by code interpreter seem to fail as the response is expected to be JSON
Doc reference this to read file content: client.files.content(id: "file-123")
client.files.content(id: "file-123")
example
Code interpreter returns...
"content"=> [{"type"=>"image_file", "image_file"=>{"file_id"=>"file-stub"}}, {"type"=>"text", "text"=> {"value"=>
using the cmd
client.files.content(id: "file-stub")
returns
(JSON::ParserError)s/ruby-3.2.2/lib/ruby/3.2.0/json/common.rb:216:in `parse': unexpected token at '\x89PNG
I've tried to use File.write, TempFile, StringIO but the JSON parse error continues.
To Reproduce Steps to reproduce the behavior:
Expected behavior Need a way to parse image_files files from OpenAI
Screenshots
Desktop (please complete the following information):
Additional context ruby 3.2.2 Rails 7.0.4.3
The text was updated successfully, but these errors were encountered:
Duplicate of this issue
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Reading files such as pngs that are generated by code interpreter seem to fail as the response is expected to be JSON
Doc reference this to read file content:
client.files.content(id: "file-123")
example
Code interpreter returns...
using the cmd
returns
I've tried to use File.write, TempFile, StringIO but the JSON parse error continues.
To Reproduce
Steps to reproduce the behavior:
client.files.content(id: "file-123")
Expected behavior
Need a way to parse image_files files from OpenAI
Screenshots
Desktop (please complete the following information):
Additional context
ruby 3.2.2
Rails 7.0.4.3
The text was updated successfully, but these errors were encountered: