botfront / rasa-webchat

A feature-rich chat widget for Rasa and Botfront
https://botfront.io/rasa
Apache License 2.0
948 stars 496 forks source link

Adding new features help #421

Closed shavone328 closed 2 years ago

shavone328 commented 2 years ago

Hi is it possible to add new features and customize the chatbot for my personal use? I want to be able to have a user avatar, auto complete recommendations, and maybe even speech recognition. How can I go about doing this?

rajalala commented 2 years ago

If you are able to implement those features yourself, I'd recommend you to fork the repository and start using your own fork. That's what I did for my team's needs 😌

There has not been recent activity on opened PRs so I don't know how likely it is to get new features in that way. So while for example I would be willing to implement at least that user avatar, there's no guarantee it will make it into the widget (of course, might code might also just not be up to par to be merged 😅 ).

shavone328 commented 2 years ago

@rajalala Would you mind telling me the steps to do that? I tried following the steps in the contributing.md file but I keep running into errors while trying to do npm run build. Did you update your version of react as well? I'm currently using 17.0.2 for my project. I'm very sorry if this sounds like s dumb questions, I'm very new to this.

rajalala commented 2 years ago

@shavone328 No worries, I struggled at first as well! This is just a quick reply to get you started but I can provide more details if needed.

You are running to a libsass error right? That's because libsass (or node-sass or some internal dependency, I don't remember anymore) does not support Node 15 or newer. So you can get the project installed and running by downgrading Node to version 14. I'd recommend you to install nvm cause then you can just run nvm use 14 each time you work with the widget.

And regarding React 17: yes, I updated React and actually made PR here (#405).

shavone328 commented 2 years ago

@rajalala thank you! I'll try doing that and hopefully it will work. Every time I make a change to the widget and need to test it, I will have to do npm run build correct?

rajalala commented 2 years ago

@shavone328 no problem, hope it all works out! You can either manually run the build (npm run build as you said) or use npm run dev to have webpack automatically rebuild the project every time you do a chance. That will run the widget configured in file dev/index.html. I've found that to be helpful - especially when doing style changes where I want to see results right away.

However, when with that the widget did not show up if not connected to a chatbot. To fix that you can:

shavone328 commented 2 years ago

@rajalala good to know thank you!! Did you have to import it into a dummy react app to test it, or would running npm run dev show all the changes?

rajalala commented 2 years ago

@shavone328 When doing widget specific changes I found easier and faster to just use that dev script and dev/index.html 😌

Later I'd do some final testing in the context of the app that uses it by installing it from local folder or from Github repo. But that is not a requirement - just something I found helpful as in my case widget and rest of the app have some interaction.

shavone328 commented 2 years ago

@rajalala ahh again thank you so much! I was so worried before that my question would just be left out into the void but you've been so helpful!

rajalala commented 2 years ago

@shavone328 Glad I could help 😊 If you end up having questions or issues, don't hesitate to ask! And good luck!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.