CMPE-252 SocialMedia-ChatBot

One stop solution to all social media.

Motivation

We spend lot of time using social media and potentially waste our time. Even though we might have to search something important we tend to get deviated. So this chatbot will send results of only the things you wanted to search and not waste much time.

How to run

  • First install rasa on your system using pip install rasa
  • Then run rasa init to create an initial model
  • You can start changing all the files present in the folder
  • Run rasa train after ever change made before running
  • After training run rasa shell or rasa interactive if you want to run in terminal
  • Use rasa run if you have connected it to slack and you can start the conversation in slack
  • In a new terminal run rasa run actions so you can connect to APIs

Conversation Flows

  • Single Conversations
    • User Input : Virat Kohli
    • Bot Reply : He is the G.O.A.T
    • Bot Reply : Also adds an image of him
    • User Input : What time is it?
    • Bot Reply : current time
    • User Input : Can I get some details on football?
    • Bot Reply : Here are the recent tweets and videos on football
    • Bot Reply : 3 tweets and 3 video links on football
  • Multi-turn Conversations
    • User Input : Can I have details on Elon musk?
    • Bot Reply : Recent Tweets and videos on Elon Musk: Attaches 3 tweets and 3 videos on Elon Musk
    • Bot Reply : Here are the things related to Elon Musk (1) SpaceX (2) Tesla
    • User Input : SpaceX
    • Bot Reply : Recent Tweets and videos on SpaceX: Attaches 3 tweets and 3 videos on SpaceX
    • User Input : Details on Sports?
    • Bot Reply : Recent Tweets and videos on Sports: Attaches 3 tweets and 3 videos on sports
    • Bot Reply : Here are the things related to Sports (1) Football (2) Tennis
    • User Input : Tennis
    • Bot Reply : Recent Tweets and videos on Tennis: Attaches 3 tweets and 3 videos on Tennis
    • User Input : About Tim Cook?
    • Bot Reply : Recent Tweets and videos on Tim Cook: Attaches 3 tweets and 3 videos on Tim Cook
    • Bot Reply : Here are the things related to Tim Cook (1) Iphone (2) MacBook
    • User Input : Details on Iphone
    • Bot Reply : Recent Tweets and videos on Iphone: Attaches 3 tweets and 3 videos on Iphone
    • User Input : Can I have details on Artificial Intelligence?
    • Bot Reply : Recent Tweets and videos on Artificial Intelligence: Attaches 3 tweets and 3 videos on Artificial Intelligence
    • Bot Reply : Here are the things related to Artificial Intelligence (1) NLP (2) CV
    • User Input : CV
    • Bot Reply : Recent Tweets and videos on CV: Attaches 3 tweets and 3 videos on CV
  • Slots Filling Conversation
    • User Input : I want 3 videos on Nature
    • Bot Reply : I will now send posts for you!
    • Bot Reply : I will send 3 videos post on nature.
    • Bot Reply : Adds 3 video links on nature
    • User Input : I want 5 tweets on England
    • Bot Reply : I will now send posts for you!
    • Bot Reply : I will send 5 videos post on England.
    • Bot Reply : Adds 5 tweet links on England
    • User Input : I want tweets
    • Bot Reply : OK! You want to have posts from tweets.
    • Bot Reply : How many posts do you want?
    • User Input : I want 7
    • Bot Reply : OK! You want to have a 7 posts.
    • Bot Reply : On what topic would you like to see?
    • User Input : I want posts on Beaches
    • Bot Reply : I will send 7 tweets on Beaches
    • Bot Reply : Adds 7 tweet links on Beaches
  • Database usage Conversations
    • User Input : Show me my search history
    • Bot Reply : Sending your search history (It will display the search history by pulling data from database)
    • User Input : Delete my search history
    • Bot Reply : Deleting your search history (It will delete the search history from the table in the database)

Future Improvements

  • Make it more generic to detect Proper Noun better.
  • Add more social media platforms.
  • Add Translations to other languages.
  • Add Feedback Form.

Challenges faced

  • Named Entity detection was difficult.
  • Trying to run actions for the first time was very difficult as I made made mistakes in port number.
  • Adding the bot to slack for a little tedious process.

Conclusion

This project pulls a number of posts of the topics you specify from the social media platforms you choose or all available.
This saves time by avoiding switching from one social media platform to another and becoming distracted in the process.
I learned a lot of things, such as how to build a conservational AI chatbot and how to manage my time.
During class and office hours, I was able to learn a lot from the ISAs.
Overall, it was an enjoyable project to work on.

References