flutter_chatgpt
flutter_chatgpt copied to clipboard
Create Stream on each message?
You are creating a new stream with a new event id with each message. So you have a new stream for every speech bubble? Is that the right way?
What if the user enters a new message while Chat GPT is responding. Then several listeners run simultaneously.
Wouldn't it be better to initialize the stream only once and then update it in some way?
I agree with you. Creating stream every time the user send a message is not the best practice.