Create a JSON out of a pdf or jpg with chat gpt

I think it’s best if you process the PDF to plain text first using

Screenshot_2023-12-28_001234

and images (jpg) to plain text using

Screenshot_2023-12-28_001258

2 Likes

@samliew sound interesting but what about if you want to get a JSON from it?

I see that if I create a GPT and upload a file it works better than an assistant but GPTs can’t be called via API, they are more interactive than assistants.

Here I have this file and I would like to get a JSON fron the table, that table it seems is not a table as PDF format uses it and it’s not an image either.

what approach could you use to get a JSON from a file like that?

Another issue is that the results in different GPTs or Assistant runs are different from one run to another even if the file is the same.

2 Likes

Thanks a lot
I managed to make it work

The problem was I was trying to Map the File , but it seems we should keep the Google Drive - Download a File option (in yellow in the picture)

Second problem I had is that for some reason the pptx format doesn’t work but converting the pptx to pdf worked.

1 Like

have you checked the advanced options - knowledge retrieval ?

image

Thanks @Rafael_Sanchez for your help.
For the rest of people in the thread: The issue was solved creating an assistant vía OPENAI API and using the module Message an assistant.
Rafael helped me in fine tuning the prompt and adding the Code Interpreter option.
Best regards

4 Likes

Hello everyone,

The module to support the file is not working properly anymore.
I can’t select the assistant. It keeps sending me back to an empty field every time.
Yet, I followed step by step the instructions of @Rafael_Sanchez

Should I do some troubleshooting or is the problem from OpenAI?

Thanks in advance for your help

Hello @Rachid-Lghachi you can tic the MAP button and put the Assistant ID in the Assistant box, another option is to delete the module, save the scenario and add it again.

2 Likes

Thank you very much for your feedback.

I had already tried the solutions you suggested in the meantime, but it still doesn’t work.

Hello @Rachid_Lghachi I think would be good to jump into a meet section so I could help you, let arrange a date to do it.

1 Like

Hello @Rafael_Sanchez ,
It’s really nice of you to
I don’t think I’ll be able to make it this week because my mother is in hospital.
I’ll get back to you as soon as I can.

Hey @Rachid-Lghachi :wave:

just wanted to offer a friendly piece of advice here. It is generally better and more effective to create a new topic for each question. That way you are more likely to get help and we also keep the community tidy and neat for everybody :pray:.

Thank you!

1 Like