[New feature] Native support for API streaming

Hey Fede,

Any news on my issue? TY

1 Like

That also seems to be working just fine


Yeah, rly need this fix

1 Like

Any one else experiencing no streaming and just getting the full result at once?

Is there any plan or ETA for Bubble to support streamed responses from Xano in the API connector?

Morning @fede.bubble, could you please provide an update on the custom event bug?

I have several workflow tasks between the OPEN AI call and the Display event. Because of that I believe that the full stram is already recevied at the time I call the display event, and the message appears all at once ! Can you simulate this with a waiting time between the 2 steps ?

I see that there now is an option to “Manually enter API response”
Thanks Bubble! And @fede.bubble

This is getting a bit ridiculous… @fede.bubble Can we please get an ETA on the custom event fix?

3 Likes

hi
when i initialize api call use openai response , text.delta event show and stream is ok. but when reinitialize it for function calling (new events in response) the text.delta not shown and bubble lose its previuse state. its mean the api connector stream only one state
please help me if i had mistake

You need to build your own stream response with both an openai response and a function call response, then use “Manually enter API response”. It will let you map both in if you do it that way.

1 Like

So with the manually entered response are you able to now use function calling?

Yes, below is a code snippet you can use as the manual response and it will function for both the chat stream and function call

data: {"id":"chatcmpl-test123","object":"chat.completion.chunk","created":1740000000,"model":"gpt-4o-mini-2024-07-18","choices":[{"index":0,"delta":{"role":"assistant","content":"Sure! Here's the info:"},"finish_reason":null}]}

data: {"id":"chatcmpl-test123","object":"chat.completion.chunk","created":1740000001,"model":"gpt-4o-mini-2024-07-18","choices":[{"index":0,"delta":{"function_call":{"name":"get_weather","arguments":"{\"location\":\"San Francisco, CA\"}"}},"finish_reason":"function_call"}]}

data: [DONE]
2 Likes

Just in bubble go? do you suport on native in the app stores?

Some of my app’s streaming functionality has gone quietly erratic over the last 12-24 hours. Is it just me, or have there been some bubble-wide changes made which could be causing interference? Curious to know if others are experiencing unexpected issues with their streaming and related functionality.

What issues are you facing specifically? There are multiple unresolved problems from launch outstanding

I have been using group data sources for streaming in a few ways.

  1. to ‘display data in a group, of a streaming type’ → works.
  2. to check if streams are done or not → works
  3. to save the contents of group streams to the database → no longer works
  4. to set custom states off the back of a group stream → flakey

I’ve ditched 3 and 4 today and now set states off the original stream call, which seems to work (it streams it to the custom state, which is neat) and I’ve stopped using other groups as ‘stream’ data sources to read other group datasteams for conditions or actions - this was the worst affected area.

Broadly, I noticed that Bubble workflows using 3 or 4 were showing the progress bar, logging nothing in the activity logs and performing zero steps in their respective workflows. Debugging also failed.

From my view - streaming has been put into bubble in a very non-bubble way, it’s making things behave in new, sometimes unexpected, ways.

1 Like

Hi everyone,

Rutvij here. Thanks for all the engagement with this feature and all the excitement about the native functionality. We also appreciate how many of you have been pushing the boundaries of this feature and outlining what we should add or fix.

Some updates:

  • I’m happy to share that the custom event bug is fixed. If you trigger the stream action inside a custom event, the API response will now be streamed back.
  • Streamed calls work in back-end workflows.
  • As noted by @data6 above, we’ve also enabled manual response type entry. This feature should be most helpful to our power users, particularly when an API may return different sets of events, which makes initialization difficult (for example, with OpenAI’s tool-calling feature). Check the documentation of the API you’re trying to call to see what the response types should be.

As always, our community has been busy creating helpful resources, including tutorials on streaming into a repeating group. Check out Petter’s tutorial here, Matt Neary’s tutorial here, and Matt Blake’s tutorial here. .

Here is some best practice guidance:

  • For OpenAI, Anthropic, and Gemini, make sure you’re initializing the call correctly according to their documentation — here’s a demo video as an example.
  • For Xano (or any other broadly open-ended API that needs manual response type entry), you can make sure the streamed event is mapped correctly by setting an “object” entry on the message’s data field.

Thanks again for the engagement!

Best,

Rutvij

2 Likes

Thanks -

Any update on the streaming event bugs (when text stream is waiting, streaming, done)? Currently you are unable to run actions of these events triggering

Could you increase the API timeout limit to 4 minutes to handle reasoning models? It should be very simple to do and is a huge enabler.