deep-chat
deep-chat copied to clipboard
clearMessages() cannot delete messages added by signals.onResponse
chatElementRef.addMessage({ html: htmlContent, role: 'assistant'})
chatElementRef.addMessage({ html: htmlContent, role: 'assistant'})
chatElementRef.addMessage({ html: htmlContent, role: 'assistant'})
signals.onResponse({ text: finalAnswer, role:'assistant' });
To achieve returning multiple messages, I used the above method, but when executing clearMessages(), it cannot clear the message added by signals.onResponse.
Is there a better method?
Hey @fanxing-6. I have attempted to reproduce this error, but clearMessages seems to work correctly for me.
I recommend you to try our latest deep-chat-dev and deep-chat-react-dev packages version 9.0.192 to see if they can resolve your issue.
If you are still experiencing your problem, can you please give me more example code so I can try to reproduce it. Or even a live CodeSandbox example.
Thankyou!
Closing since there has been no response.