-
Notifications
You must be signed in to change notification settings - Fork 100
ResponseInputFileExample.java #446
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
ResponseInputFileExample.java #446
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: run ./scripts/format
to fix the CI lint error
OpenAIClient client = OpenAIOkHttpClient.fromEnv(); | ||
|
||
// Read file content and construct data URI String | ||
File file = new File("/absolute/path/to/your/file.pdf"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if there's an actual PDF we can add to the resources directory, like we have for other examples, so that this example is runnable
Maybe this one? https://github.com/py-pdf/sample-files/blob/main/003-pdflatex-image/pdflatex-image.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I've added it to the PR. Class now runnable and lint was fixed.
* chore(ci): run on more branches and use depot runners * chore(ci): only use depot for staging repos * docs: add responses input file example (#446) * ResponseInputFileExample.java * add example PDF file and fix lint * refactor: rename example file * refactor: slight example chnages --------- Co-authored-by: Tomer Aberbach <[email protected]> * fix(client): add missing convenience methods chore(internal): use `byteInputStream()` in tests * chore: run formatter * chore(internal): java 17 -> 21 on ci * release: 1.5.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: nuclear bean <[email protected]> Co-authored-by: Tomer Aberbach <[email protected]>
An example for uploading PDF content with
ResponseInputFile
#440