Skip to content
New issue

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

Retrieving contents of CSV file errors on JSON parsing #562

Open
nuclearghost opened this issue Jan 29, 2025 · 0 comments
Open

Retrieving contents of CSV file errors on JSON parsing #562

nuclearghost opened this issue Jan 29, 2025 · 0 comments

Comments

@nuclearghost
Copy link

nuclearghost commented Jan 29, 2025

Describe the bug
The OpenAI Assistant has generated a CSV file. When I attempt to retrieve its contents with openai_client.files.content(id: 'file_id') it generates the error unexpected character (after [0]) at line 1, column 2 [parse.c:744] which appears to be the JSON parser trying to parse CSV content.

To Reproduce

openai_client.files.retrieve id: "file-NexuEUjWpoehzmkQ5zer7W"
{"object"=>"file",
 "id"=>"file-NexuEUjWpoehzmkQ5zer7W",
 "purpose"=>"assistants_output",
 "filename"=>"/mnt/data/normalized_file.csv",
 "bytes"=>1630,
 "created_at"=>1738176534,
 "status"=>"processed",
 "status_details"=>nil}
openai_client.files.content id: "file-NexuEUjWpoehzmkQ5zer7W"
: unexpected character (after [0]) at line 1, column 2 [parse.c:744]

Expected behavior
The CSV file contents are able to be read without error.

Desktop (please complete the following information):

  • OS: macOS 15.2
  • Ruby version: 3.2.2
  • Gem version: 7.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant