API - How is an uploaded file on my web app communicated to mindstudio

Hello,

Since I cannot see the debugger when calling the api from my web app, I don’t know how an uploaded file is communicated to mindstudio. Is it an url that needs to be passed, or is it the file itself? My agent is setup where Main has the vars setup, and then move on to a generate text where a var is used in the prompt. one of these vars is the uploaded questionnaire that is parsed and which content is read by the prompt. Should I add the block extract text from file, which uses a url to read the contetn? But since I cannot see the debugger for an api call, I am unsure as to how to transfer the information from the document to my agent. Please advise. Thank you

Hi @AIFusionCoven,

Thanks for the post!

If you’re trying to pass a file to a MindStudio Agent via API, you’ll need to host the file and pass a link to it as a Launch Variable. Then, you can use the Extract Text from File block to pull in the contents.

You can find the Run Data for API-triggered runs under the API Logs section in the Debugger:

Hope this helps!

thank you

@Alex_MindStudio

Edit: I think I found the issue. I am using a .docx file, but it appear that you only support pdf/txt/csv/html. Any ways you can add .docx? I generate .docx questionnaire for my users that they can use to generate another report.

I found the info. here is an error, I am getting. can you review, and let me know what I am doing wrong. I am adding a loom of the agent blocks. thank you

I am sending a url from my web app via api for uploaded files. As recommended, I added an extract text from file block. I updated the variables naming convention in my app, and in the agent. the request logs show a 200. when mindstudio is initializing, i see that for the variable questionnaire, it says
Initializing {{questionnaire_url}} from MindStudio Large File Storage

is that normal?

please advise. thank you