I have some data stored in Firebase (currently I am simply creating a dumb array for simplicity). Therefore, I first create a JSON object which I intend to send to my openAI assistant as an attached file of my message.
Sending file to OpenAi Assistant
Strangely, I have never been able to use the JSON body to set up the API call and had to use the "multipart" (found within the openAI yaml config file). Which forced me to declare my file variable as a "Uploaded File". Thus I have found and followed this post: https://community.flutterflow.io/ask-the-community/post/uploaded-file-bytes-to-api-call-build-failed-XgtSarDAtvpM8nw, which enable me to send a byte files from the JSON object through the API call. This works as I can upload the return object and I can see my file into the openAI console.
However, openAI's assistant answer my prompt with: "I'm sorry, but it seems like there was an issue with the file upload." when I ask basic question about it.
I am thus not so sure if the pipeline to transform my JSON to a byte object is correct. If anyone has experience sending JSON files to the openAI API, I would be happy to get some insights on how to manage it. Any help welcome.