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
- Function for long running task (other 60...
My function need long running other 60 seconds. But async mode return empty body. How to deal with that please ?
- OAuth2 Provider is disabled automaticall...
Hi everyone, I'm using self-host Appwrite 1.7.4. I can setup OAuth2 with Google successfully, however the provider is disabled automatically after one day witho...
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...