Back to Parent

Outcome


Intention

The intention of this project is to explore Ruby with gems to build a chat bot that can communicate with its users. Relevant tools include Ruby, Command Lines, Sinatra, Heroku and Twilio. Ideally, a no-interface, as in this case, a communicational SMS chat bot should be built and serve a purpose. My chat bot, as intended, should answer some information about the movie "Fight Club 🥊."  

Context

Fight Club has been one of my favorite movies. I recently watched it for the third time. Although it is a movie about violence, but I like the acting in the movie, also the music sounded awesome. However, as an old movie, the Fight Club has not received a lot of attention recently. During the third time of watching it, I wonder what was the budget and rating for this movie as I always check out information like these now days if I want to see a movie in a theater. Thus I want to build a chatbot that's about Fight Club so it "remembers" the contents for me. 

Process

After weeks of Skill Dev where I learned basic techniques with Ruby and Gem files, I followed instructions provided by Professor Daragh (https://github.com/daraghbyrne/onlineprototypes2018) to learn what I can leverage to build the bot I want. I first learned how to build an interactive SMS bot using "if" statements. Then I learned a very important tool "HTTParty" that allows me to use the JSON texts when building the responses for my chatbot. From this part, the chatbot is able to answer questions that about itself by recognizing the key words I embedded in the algorithms. 

After practicing and debugging my basic codes for questions like "who" and "when," I then started to look for an available API that can help me retrieve information about the Fight Club. The movie data base is one of the most popular movie information APIs that developers use (https://developers.themoviedb.org/3/getting-started/introduction), following the instruction to obtain an API key allowed me to choose and use the information about a movie, in my case, it's the Fight Club (referred to movie id: 550). 

By leveraging HTTParty (https://github.com/jnunemaker/httparty), I was able to use the API in my Ruby application. I defined four functions that I then use within the body of my bot's responses to retrieve information like rating, overview, budget and the homepage of the movie via the API provided by move data base. 

Screen shot 2018 09 23 at 10.56.38 pm
Show Advanced Options
Show Advanced Options
Screen shot 2018 09 23 at 11.28.37 pm
Show Advanced Options

Reflection

Although the chatbot is able to answer some basic questions, I would like the bot to have the information about other movies as well. If given more time and effort, using the movie data base API, there is a lot more possibilities for the chat bot.  For example, the user can first identify a movie he/she is interested, then the chatbot can provide similar informations provided for the Fight Club

Also, the way I construct the responses do not allow users to input sentences instead of solely words, thus I hope to develop more natural conversation flow in the future.   

Giphy
Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.