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

OpenAI: Update convenience layer for multipart/form-data endpoints per APIView feedback #41

Merged

Conversation

annelo-msft
Copy link
Collaborator

@annelo-msft annelo-msft commented Mar 21, 2024

This PR updates audio, file, and image service methods that use the multipart/form-data content type on requests.

It includes the following:

  • Removes BinaryData overloads of these service methods, in favor of Stream overload -- this is so users don't inadvertently load large binary content into memory by calling the wrong overload with a large file.
  • Adds FileStream overloads for a bit of convenience when a file is opened from disk -- so users don't have to pass the file name in two places.
  • Updates some output APIs that were returning BinaryData that could possibly be large files to return Streams instead.

@annelo-msft annelo-msft marked this pull request as ready for review March 21, 2024 23:18
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.

3 participants