Chatgpt integration

Question:
How can I implement the ChatGPT API to accept a file uploaded by a user along with their provided prompt? The goal is for ChatGPT to review the prompt and respond based on the contents of the uploaded file.

Velo Code

I aim to create a system where the user can upload a file and submit a prompt. Following this, ChatGPT will analyze the uploaded file and use its contents to respond to the given prompt.

Looked through help and the forum and asked Chatgpt

Additional information:
I can use any Api model

  1. Open an OpenAi-Account → get your API-KEY.
  2. Save your API-KEY in the Wix-Secrets-Manager.
  3. Generate a CODE on back-end, which will be able to get the KEY from your secrets-manager.
  4. Read some of my old posts → about CHAT-GPT…
    Integrating ChatGPT - #5 by frank-igunbor
    ***Text to Speech*** ElevenLabs (JARVIS)
  5. Complete your own code using VELO.

Easy!

sadly its not that easy. I dont find any documentation on how to upload a file, using a chatgpt api.

  1. Describe your setup in detail.
  2. Describe each step of your process-flow.
    a) Step-1: Page gets ready…
    b) Step-2: Calling CHAT-GPT (including the call for API-KEY from Wix-Secrets-Backend).
    c) Step-3: Getting response-PACKAGE (OBJECT) from CHAT-GPT.
    d) Step-4: EDITING my UPLOAD-FILE (Generating my own OBJECT) → ready for UPLOAD.
    e) Where to UPLOAD now? →
    1) To → WIX-DATA-MANAGER?
    2) To → External-Database?
    3) To → Somewhere else ?

Your SETUP is different? → DESCRIBE in DETAIL!!!

And maybe the most interesting question → WHAT KIND OF FILE IS IT?
a) text-file ?
b) image ?
c) pdf ?
d) csv ?
e) something else?