livekit-examples / realtime-playground

Play with OpenAI's new Realtime API in your browser
https://playground.livekit.io
Apache License 2.0
215 stars 67 forks source link

Getting "Rate limit exceeded" too often for a low-consumption use case #7

Open carloslfu opened 1 month ago

carloslfu commented 1 month ago

I'm getting rate-limited very often while testing a low-consumption use case. Doing this with https://github.com/openai/openai-realtime-console doesn't fire the rate limit. It's the same use case and volume (just one user). What could be happening under the hood? Maybe the LiveKit libraries do many extra calls?

Screenshot 2024-10-05 at 1 34 31 PM

davidzhao commented 1 month ago

what is your rate limit set to? we would keep a persistent websocket connection to OpenAI. it's not clear why it would consume more of your rate limit.

carloslfu commented 1 month ago

Hi @davidzhao! What do you mean by my rate limits? LiveKit's or OpenAI's rate limits?

After testing it more, I got a bit more information. I get those errors after interrupting the model several times. Maybe it's a LiveKit rate limit? I'm using the free plan for testing purposes.

Doing the same on the OpenAI playground doesn't hit any of OpenAI's rate limits.

Screenshot 2024-10-07 at 12 46 42 PM

mukulrajpoot262610 commented 2 weeks ago

@carloslfu is it solved?

carloslfu commented 2 weeks ago

I haven't tried again, but maybe it was. I see the @livekit/agents dependency was updated. I'll try again as soon as I have some free time.