Open AI Streaming

Correct me if I’m wrong, PLEASE!

After looking into the streaming functionality from Open AI I have realized that @bubble is not the place for it. They cannot accommodate streaming events. In order to get a stream going you’d need to pass your api key via the client side, EXPOSED.

You set the api call to stream=true via the api connector but bubble will NOT initialize until all of the data has been sent.

In order to execute streaming you’ll need to rely on a third party server. The plugins that claim to offer streaming are doing just that, with the exception of one which is client side EXPOSED API KEY, but you are at the mercy of their server, their payment to a cloud server and their dedication to the plugin maintenance.

IMO this is unacceptable for the streaming use case and is a hard limit for bubble functionality given the state of the world. I’ve been working in bubble for 4 years now and have found a workaround to almost everything except this. It makes me sad.

3 Likes

you are correct

I’m in the same boat… I can’t just find a work-around except using one of these plugins… Were you able to setup the third party server? I heard Cloud flare offer free plan

Currently using an assistant in the playground with the API docs uploaded as a text file and setting one up in AWS. Not easy but I think I’m making progress.

hours later (lol)… Yeah this isn’t going so well so far. I’ll try another route and check back in

1 Like

Flagged this to the team to get their thoughts :+1:

(it’s a known issue, but maybe there’s more info I can gather to share here)

7 Likes

Thanks… looking forward to hearing their input …

Yep, but locked to your domain name keeping your own key secret - if you are referring to my plugin.

1 Like

No not yours. I think you state “This plugin uses an external service to provide streaming capabilities” If I’m looking at the right one. The one that exposes the api key, they also state that it’s client side and acknowledge it’s exposed. And I appreciate both of these statement, it allows us to make the decision based on truths. Yours actually looks pretty good. The 3rd party is just a concern for the folks i’m working with. I just reread my post, I kinda mashed both of them together, sorry about that.

1 Like

follow up here:

  • Team is aware of this shortcoming. It would be a good idea to see if any community plugins solve this issue
  • The idea was submitted to Bubble’s Ideaboard (link here). Upvote it!
  • Unlikely that this will be prioritized soon. As you can imagine, the team is focused on improving reliability and stability (plus a few other cool releases :wink: )
4 Likes

Thanks very much

Any progress so far?

I appreciate you getting back to us.

A community plugin requires a third party server or works from the client side exposing the api key, which is why I started the thread, this is not an option. Miss a bill payment, server downtown due to any unforeseen factors; illness, vacation or worse. Bubble is simply not prepared for what is coming.

Chat GPT-4o released a few days ago. In a world that is being driven by the AI revolution there is no waiting on this, at least not for us. I advised my boss last week that creating a new app and upgrading it for the sake of our users would be a good idea. In light of this shortcoming I am being forced to seek out another solution.

I’ll upvote for sure. And I understand prioritizing development, what I’m not sure I fully understand is how anyone could find this less of a priority given the pace at which the world is changing.

1 Like

Can’t you just host your own web server that stores the API key and use that to host the websocket that streams the text with the client? Like, if you don’t want to depend on third parties, then don’t - I’m sure one of the plugin authors of the plugins that use third party servers would let you buy the code off of them.

One more thought. If building it isn’t a priority what about releasing a tutorial on how to set up a server, maybe AWS and getting us connected. Get us plugged in so we can stay ahead?

1 Like

That’s not Bubble’s job… Bubble should focus on Bubble… not setting up AWS servers that a tiny minority of users will use, and the minority that really does want it and can’t do it themselves will pay someone to do it for them…

Not a bad thought. Sadly I spent the better part of yesterday trying to get a server set up. It’s beyond my capabilities. I’m open to the discussion.

You’re right it’s not their job but they are not capable of providing a nocode solution to streaming, which means they are falling behind. The other solution is finding another platform that does. which is sad.

1 Like

What if there was a plugin that could simulate the exact streaming animation? Would you consider using that?

I don’t know about a simulation… We’re looking for real-time data from the events emitted from OpenAi.

1 Like

Something like this, currently working on the plugin. Should be published this weekend

3 Likes