I have a workflow that has a bunch of nodes firing one after the other.
At some point, the a node breaks the series chain and fires 3 nodes in parallel.
These 3 nodes are firing openAI API calls which can take 3-12 seconds to respond.
I fire them in parallel so that I can get them all back as fast as possible, as the result of each one is then used to fire a 4th node that is in series, after the 3 openAI nodes.
What I want to know is, does workflows only fire one API call at a time? I say this because it seems like the openAI calls happen one after the other, instead of all firing at once.
Any ideas on why and if there is a workaround for this?
Hi Thomas! Webhook Workflows allow concurrent execution; I believe we cap resource query parallelism at 50 max behind the scenes. With Scheduled Workflows, each run must complete before another run starts. Though it sounds like you might be asking specifically about queries within a Workflow?
The issue is I have a few functions running in parralell that each lead up to a OpenAI call that takes around 15 seconds to return.
From my tests, Workflows waits for each of those openAI calls to be completed before it starts the next set of functions that proceed the other OpenAi calls.
Does that make sense?
Just wanted to let you know that there's now a request tracking this! Thank you for adding your comments here.
The current workaround is to fire off another workflow for each thing you need to happen in parallel. Those will execute at the exact same time - blocks wont.