How to Send PDF file to ChatGPT

Dear Forum,

I have a PDF file that I want to analyze with ChatGPT and then ask some questions about it.
However, when I use the “ReadPDFText” activity and send the content to ChatGPT, it exceeds the token limit.
To address this, I tried splitting the text into smaller parts and sending them in a loop.
Unfortunately, I found that ChatGPT does not remember any text from previous loops, likely because it cannot retain the string from the last iteration.

Is there any solution to achieve this goal effectively?

Thank you!

Hi @FINNNNNNNN

Try to convert the PDF file into Base64 string

PDF_Input = Convert.ToBase64String(System.IO.File.ReadAllBytes(PDFFilePath))

Maybe it can help :slight_smile:

1 Like

Thank you for your reply.

We have successfully automated the process of using ChatGPT 4.0 to upload files through the web UI.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.