Upload file to platform.openai.com

Hi all,

I am trying to upload a file to openai to fine tune an assistant.

I have set up the following w/f:

  1. user uploads pdf doc.
  2. send pdf to pdf.co to convert to text
  3. send text to chatgpt to analyse and return key information
  4. update database with key information.

My problem is some pdfs exceed the character/token limit so I am trying to upload the file instead.

To upload the file, it needs to be a jsonl file.

Can anyone advise on how to convert a text or json file to jsonl?

Has anyone come across a plugin or apps like pdf.co that can do this job?

Thanks
Robbie

Hi @robbie4 ,

Better, you can split large pdf file to single for send to pdf.co. then merge the resturn text from pdf.co of all the splitted pdf files.

Thanks for the response, I’m not sure this helps.

The issue is not with pdf.co, its the number of characters in the prompt to chatgpt.

I use the text from pdf.co within the prompt to analyse the text.

I am trying to overcome the issue with the prompt, and fine tune an assistant at the same time, by uploading a file to the assistant.

The file needs to be jsonl file.

What is your use-case? What does the user want to do with the PDF?

Thanks all.

I chunked the text returned from pdf.co by sending multiple messages to a thread, then running it once all the text had been sent.

The first message was my prompt, followed by the text. I used a series of custom events that ran on a condition of number of characters in the text returned from pdf.co.

I used truncate and truncate from end to capture the words/characters for each chunk/message .
image

Its a simple workaround, and not quite the solution i was aiming for but it works. I’m sure there are much more efficient ways to achieve the outcome.

What’s the actual outcome from user point of view?

The workflow equips the openai assistant with the information about an insurance policy so when a user asks questions about the policy via a chat feature, the assistant can answer factually with the necessary information.

The workflow does not impact the user.

1 Like

@robbie4 I’m facing the same feature request for a real estate assistant, I need to upload the project or property information, so the assistant can answer factually.
Can you please share how you managed to set up the workflows?
Thanks!