FredrikOseberg / react-chatbot-kit

MIT License
324 stars 154 forks source link

how to send data for some api and make input disabled #186

Open nellysbr opened 6 months ago

nellysbr commented 6 months ago

I have two questions regarding the bot configuration in Nextjs. So far, I have successfully configured it (despite some issues with TypeScript and the lack of TypeScript-oriented documentation). However, there are two things I would like to achieve with the bot, and I might be overlooking something:

  1. Data Storage and Sending

The bot asks two questions to the user (e.g., name and phone number). Is there a way to save only the user-entered data (name and phone number) and send it to an API or database? Right now i can use saveMessages to send some data, but it sends all chat history.

  1. Input Text Control

Is there a way to disable text input and only enable it when I want the user to enter information?

Thanks!!

harshdetroja commented 6 months ago

@nellysbr Instead of installing the react-chabot-kit, you should clone it and use it, which will make things easier for customization.

jintzz commented 3 months ago

@nellysbr Instead of installing the react-chabot-kit, you should clone it and use it, which will make things easier for customization.

How to do that?

harshdetroja commented 3 months ago

@jintzz Download the files and use the components directly instead of installing the chatbot.