
My application makes use of OpenAI and I have to write a function that acts as a proxy, it would be great if there was a way to send realtime data over functions similar to how OpenAI uses SSE, I know there is realtime api however that would require writing to collection many, many times and it is really not efficient, it would also be abuse of ratelimit. Is there any other way of doing this? Or is Appwrite not suitable for this?

So you are looking for sort of streaming from a function right?
For this you can have a single document, which you can then update many times and use Real-time to catch those updates.
Considering you are in a function using an API key you don’t have to care about rate limits 👍🏻

Yes, I thought about it but wouldn't it be expensive performance wise?

When you consider openai streams new token every 0.3~ second it would write a lot.

maybe you can create/update document after n seconds
Recommended threads
- how many Teams can be created?
I am creating an app where I will let users create groups. This could mean there will be many groups created by user, to isolate those groups properly I am thin...
- Cannot create a user
Hi, I am using a lowcoder frontend and trying to create a user in Appwrite (python function). Unfortunately, all I got is an error: "Raw body: Error". It means...
- Where is tensorflow support? 3.11 ML doe...
and if i manually tried to add tensorflow i get Cannot access offset of type string on string no matter what
