Stream directly into a variable for AI Chat

So I’m building a AI chat interface and it’s currently working well, but a bit clunky due to how I have to handle streaming.

I have a stream_array and a current_conversation variable, currently I have to work around it to update the current_conversation variable AFTER the stream is completed - which sort of defeats the purpose of streaming IMO.

Is there a nice way or workaround (using ww.variables for example) to stream the Xano output to the end of my curren_conversation array for example? Or alternatively, a best practise for handling streams for a AI chat interface.

Anyone?:slight_smile:

Hi Erik :waving_hand:

See if these help:

Hi Augustin,

Watched both (all 3) videoes, unfortunately, they don’t cover this case. They are talking about how to handle a streaming input, in terms of the chunking. Which I don’t have an issue with.

The challenge is updating a new variable “live” while the streaming is in progress.