You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let done, value;
let messageBuffer = "";
let decoder = new TextDecoder("utf-8");
addMessageToState(createChatBotMessage("streaming...")) //You need a dummy message to update
while (!done) {
({ done, value } = await reader.read());
messageBuffer += decoder.decode(value);
updateLastMessage(messageBuffer)
}
Bear in mind that you can also manipulate the delay on createChatBotMessage - it's default is 750ms - if you don't want any loading animation at all you can set this to a negative value (delay:-750). As far as I know this is safe to do.
No description provided.
The text was updated successfully, but these errors were encountered: