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

Fix files content endpoint #474

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

willywg
Copy link

@willywg willywg commented May 8, 2024

This PR addresses issues #421 and #450.

It fixes the client.files.content API endpoint. The current implementation requires parsing the response body to JSON. However, some responses (like files generated by the Assistant API) need to be handled as pure response body content, such as a PNG file.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?

…nt to ensure correct behavior and handling of different scenarios
…se flag to control response parsing behavior
…parsing to JSON

docs(README.md): add instructions on how to save file content to disk after retrieval
… json response middleware based on the value of the parameter
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

Successfully merging this pull request may close these issues.

None yet

1 participant