Issue appending .ogg file on query step (OpenAI)

I need to append a file (ogg) on my request body (OPEN AI TRANSCRIPTION).

my main problem is:
I can't append the file on query (request body), because the retool don't allow.

In my postman, I can append the ogg audio, and I received response.

How can I make the same thing on retool?

I tried to create a function (request query) and use query (OpenAI)
This is my screen on retool (see! I cant append my file)

I see two possible areas you may need to update:

  1. The code to get your source file isn't working. The return for that block is an error, so trying to use it downstream will not work.
  2. Assuming you can get the JS to download the file working, I see that your Postman shows the file key referencing a value of type File. I'm not an expert on Postman, but I would hazard to guess that when you upload a file, it is being transformed in the background into some sort of object (much as Retool does), where the file name, file data and other attributes of the file are turned into key value pairs within the object. In your Retool OpenAI REST query body, you have file as a string, which may need to be adjusted to handle the object that you (probably) need to pass.

I found out the solution. It's very simple, but i broken my head...


I just change de body type to "file data". hahaha and it works fine!

Even so, i'm grateful for your response.

:person_shrugging: :smile: