Matthew
Matthew2mo ago

Matthew - Hey Guys, I have an AI API streamin...

Hey Guys, I have an AI API streaming back data, but earlier in the worlkflow im pullin some api data that i also need returned back. So how do i make it so my api data is returned back along with the ai stream
3 Replies
Stu
Stu2mo ago
The method I've found works best is to send it back through in the header using the 'Set Response Header' node, like in this screenshot. Give the data you're sending back a key starting with 'x-' and put the data you want returned in 'Header Value'. That way it will be returned with the first chunk of streamed response back from BuildShip.
No description
Matthew
MatthewOP2mo ago
@Stu the issue that im having is the they are objects that im trying to pass through and when looking at flutter it just shwos up as [object object] do you think there is another way to do it? I couldnt find a way @Stu
Stu
Stu2mo ago
@Matthew If you're getting [object object] then it means you'll need to use the Stringify JSON node to turn the JSON into text.