flutter_chatgpt icon indicating copy to clipboard operation
flutter_chatgpt copied to clipboard

Create Stream on each message?

Open desmeit opened this issue 1 year ago • 1 comments

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?

desmeit avatar Nov 21 '23 11:11 desmeit

I agree with you. Creating stream every time the user send a message is not the best practice.

iqfareez avatar May 22 '24 03:05 iqfareez