Chatbot project @CentraleSupélec for the French presidential election of 2022 made with the framework rasa
Binary model used : frWac_non_lem_no_postag_no_phrase_500_skip_cut100.bin
(bin (298Mb) : skip-gram, dim 500, cut 100)
The .bin
file must be downloaded and placed in data/word2vec/
.
cd actions/data
mkdir word2vec
cd word2vec
wget https://embeddings.net/embeddings/frWac_non_lem_no_postag_no_phrase_500_skip_cut100.bin
touch credentials.yml
vim credentials.yml
Update the new credentials.yml
following this example
sudo docker-compose up --build # Build and run containers
sudo docker-compose down # Stops containers and removes containers
💡 Tip: Know which containers are up
sudo docker ps -a
- Change PATH (commented in actions/)
- Comment sys.path.append('/app/actions') in actions.py
- Change endpoint.yml action_endpoint
cd actions
rasa run actions
ngrok http 5005
- Change credentials.yml webhook_url according to ngrok
rasa train
rasa run (or) rasa shell --debug (or) rasa interactive
This project is only an experimentation for a school project and has therefore no political use. We try to make it as neutral as possible, if any issue is observed please raise an issue.
See the implemented architecture:
The user interacts with our chatbot via Telegram, which sends the messages to the Rasa NLU via connectors, where it identifies the intent, and responds to the Rasa Core, according to stories and actions. The models used for the conversation were generated by the trainer module and then transferred to the bot; these models can be versioned and evolved between bots.
├── Dockerfile
├── README.md
├── actions
│ ├── Dockerfile
│ ├── __init__.py
│ ├── actions.py
│ ├── data
│ │ ├── data_candidates
│ │ │ ├── candidates.json
│ │ │ ├── candidates_infos.json
│ │ │ └── propositions.csv
│ │ ├── images
│ │ │ └── candidates
│ │ └── word2vec
│ │ └── frWac_non_lem_no_postag_no_phrase_500_skip_cut100.bin
│ ├── requirements.txt
│ └── utils
│ ├── __init__.py
│ ├── __pycache__
│ ├── candidate_names.py
│ ├── embed_themes.py
│ ├── get_subthemes.py
│ ├── get_themes.py
│ ├── plot_formatting.py
│ ├── scrapping_program.py
│ └── scrapping_sondages.py
├── certs
├── config.yml
├── data
│ ├── nlu
│ │ ├── candidates.yml
│ │ ├── info.yml
│ │ ├── lookups
│ │ │ ├── candidate_names.yml
│ │ │ └── themes.yml
│ │ ├── nlu.yml
│ │ └── poll.yml
│ ├── rules
│ │ └── rules.yml
│ └── stories
│ ├── candidates.yml
│ ├── info.yml
│ ├── poll.yml
│ └── stories.yml
├── docker-compose.yml
├── domain.yml
├── endpoints.yml
├── img
│ ├── exemple.png
│ └── rasa.png
├── models
│ ├── 20220223-101732.tar.gz
│ └── 20220223-105550.tar.gz
├── nginx
│ └── default.conf
├── references
│ └── README.md
├── requirements.txt
└── tests
├── test_candidates_stories.yml
├── test_info_stories.yml
├── test_nlu_stories.yml
└── test_poll_stories.yml
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
GNU General Public License v3.0
In development - project deadline: 📆 13 April 22'
[1] Yejin Bang and Nayeon Lee and Etsuko Ishii and Andrea Madotto and Pascale Fung, Assessing Political Prudence of Open-domain Chatbots, arXiv preprint arXiv:2106.06157,2021
[2] Miller, A.~H. and Feng, W. and Fisch, A. and Lu, J. and Batra, D. and Bordes, ParlAI: A Dialog Research Software Platform, arXiv preprint arXiv:1705.06476, 2017
[3] https://ttt.studio/blog/rasa-chatbot/ (NGINX)
[4] Ifrap