Hey everyone, how’s it going?
I’ve developed a system that integrates WhatsApp with the OpenAI Assistant, and I encountered a problem during testing. When I send several messages in a short period of time, it shows a 400 error. From what I’ve seen, when a RUN is being executed and a new message is sent to be processed, it gives this error.
I have an idea for a solution, but I’m not sure how to implement it. Would it be possible, for example, to group all messages sent within a 5-second interval into a single batch and then send them all together to OpenAI?
For example, if a user sends: “Hi” (sent), “How are you?” (sent), “I want to know about…” (sent), each would generate a new execution.
If all of this is sent within a 5-second interval, merge all the messages together.