Closed madhumeher0037 closed 2 months ago
Hi @madhumeher0037.
Currently you can't replace the input text programmatically (without traversing the DOM tree which we do not recommend), but you can alternatively send a message to the server via the use of the submitUserMessage
method. Let me know if this helps.
Thanks!
Since there has been no further communication, I will be closing this issue.
Hello,
I'm using the deep-chat library in our application. I have a scenario where I want to provide user prompts within the code instead of taking text from an input text box.
To explain further, I am saving all messages in the Redux store. I have also created a history page where I display all the messages from the entire session. Now, when a user clicks on any user prompt message in the history page, I want that message to appear in the input box of the deep-chat component. Alternatively, I'd like to send a request to the server.
Is there any way I can send text to the deep-chat component programmatically?