Skip to content

How can I send a PDF document like a invoice get its metadata? #199

Closed Answered by sashirestela
monkiki asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @monkiki, thanks for using simple-openai!

You are talking about the Vision functionality, which is part of the Chat Completion API. According to OpenAI documentation, Vision supports the following type of files only: png, jpg, jpeg, webp, gif. So, you cannot use PDF files directly, however you could convert them (using external tools) to image files.

The other option could be to use the Assistant API with File Search Tool, which accepts PDF files and you can ask questions about the content of those PDF files. I invite you to read the documentation about it and use simple-openai for that purpose.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@monkiki
Comment options

Answer selected by monkiki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants