Mike - Hi everyone. I'm looking for a BuildShi...
Hi everyone. I'm looking for a BuildShip node to upload a file from BuildShips GCP storage to OpenAIs Vector Store if anyone is willing to share? (Or is there one already posted here someone - or in BuildShip! - that I have missed?)
6 Replies
Hi @Mike The node to get the file from BuildShip's GCP storage already exists, but you can create node to upload the file to OpenAIs Vector Store using AI, let us know if you get into any issues, we can help to add one cc @Luis
Hi again @Gaurav Chadha - got the file upload working but because I need to handle multiple files I'm uploading in a BuildShip loop node - which works great, except I'd like to return an array of fileIds and filenames OUT of the loop to pass to other workflows. Do loop nodes support this or will I need to write some custom code?
Hi Mike yes the loop node should work for this, you’ll also require to add a custom node after loop which will get all the items from the loop and output as an array in the required format, cc @Luis can help sharing a remix if required.
Thanks @Gaurav Chadha, at the moment I am unsuccessfully trying to achieve this with environment variables: https://docs.buildship.com/env-var
@Luis if you can share a remix I'd be very grateful!
Hey @Mike, indeed you can achieve this by using a custom node at the end of the loop to return an object that contains the file ID and file names, and any other fields you want to return. The idea is that because this is the final node in the loop, the object returned will be appended to the final array the Loop node will output.
I'm sharing with you a remix link that showcases this idea, granted its using a couple of fake nodes to return fake data but the important part is the "Append To Array" node.
https://app.buildship.com/remix/83129154-985a-4c81-a7b3-efbc7badfa0c
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.