GuaGua is a text-based bot. It acts as your friend and can send you traveling photos from all over the world. GuaGua will not always be online since it needs personal time. You can ask it about touring tips, and it can recommend you traveling cities. As your friend, it also looks for your help and advice sometimes.

0

Intention

I found that there were so many functional and practical bots. However, they are just like tools, not human-like and boring. So I decided to make an "unuseful" bot. I created GuaGua which is unlike an assistant, but a friend. It is a funny duck that likes traveling all over the world and will send people photos from different cities. Also, it needs its own time, like eating time, sleeping time, touring time and so on. It is also like a real friend will look for your help and advice!

1

Process

  1.Bot Personality  

I think one of the most challenging parts is to generate the bot personality.

Since I want to create a human-like chatbot, GuaGua is quite friendly and not aggressive. GuaGua is not an assistant tool, so it is not submissive. But it is hilarious since you will never know what time it will send photos and talk to you. Besides, it is your friend, so it may not be informal.

0
2.Functionality Matrix

From the Bot Personality, I thought about different functions that GuaGua should have. And I made this functions to a matrix for reminding me of crucial features and better time distribution.

0
3.Work Flow & Tone

According to the Bot Personality and Functionality Matrix, I designed the Dialogue flow and Tone.  It is not as simple as I imagined. Because I needed to create the way and tone of dialogue corresponding to the personality, I refined the dialogue content many times. Also, the dialogue should be structural. How to initiate a conversation? How to end a conversation? How to handle the unknown text?

0

Product

Techniques & Tools

1. APIs & Gems Used

Use  Twilio API,  Giphy API, and Unsplash API

0
gem 'sinatra'
gem 'sinatra-contrib'
gem 'dotenv', :groups => [:development, :test]
gem 'twilio-ruby', ">5.0.0"
gem 'giphy'
gem 'rake'
gem 'httparty', "0.14.0"
gem "unsplash"
gem 'google-cloud-dialogflow', '~> 0.2.2'
gem 'activerecord'
gem 'pg'
gem 'sinatra-activerecord'
Click to Expand
0

2. Files -  Act as a kind of database to store Topics and Traveling Recommendation

0
# Examples:
Which one do you think it is better? Apple or Banana?;apple;banana;I think I'll eat that.
Which one do you like chocolate or gummy candy?;chocolate;gummy candy; I like that so much!!!
Do you like GooglePhone or Iphone?; google; iphone; I like google very much!
Guagua is traveling!
Guagua is taking bath!
Greenville=Greenville, South Carolina. Once a sleepy second fiddle to Southern culinary powerhouses like Charleston and Nashville, Greenville is stepping into the limelight with hot new restaurants. The town will soon be home to an outpost of Sean Brock's heirloom-crop-focused Husk and a food-centric market hall called the Commons.
Los Cabos=Los Cabos, Mexico. Located at the tip of the Baja Peninsula, the two small colonial towns of Cabo San Lucas and San José del Cabo have become the hottest vacation destinations in Mexico in recent years. With wide, pristine beaches, lively nightclubs, glam resorts, and a farm-to-table food scene, the oasis of Los Cabos is drawing tourists in record numbers.
Grenada=Grenada, known as Spice Island, remains one of the Caribbean’s under-the-radar gems, even though it’s got what every traveler wants: uncrowded beaches, preserved rain forests, and a lively local culture and cuisine. The island, which was spared from last fall’s brutal hurricane season, is poised to attract new luxury travelers when the Silversands Hotel opens in March 2018.
Šolta=Šolta, Croatia. The jewel of the Adriatic Sea, Croatia is home to more than 1,200 islands, but travel between them has long been dictated by expensive yacht charters and sluggish public ferries. In 2018, that’s set to change, now that UberBOAT, from the popular ride-sharing app, has launched on-demand transfers and private tours along the Dalmatian Coast. Hit the high seas in the direction of Šolta, a hilly isle a mere nine nautical miles from Split (the second-largest city in Croatia).
Buenos Aires= Buenos Aires.This year, Buenos Aires becomes a hub for art, sports, and politics: the inaugural Art Basel Cities program, the Youth Olympic Games, and the G20 will all take place in the city, beginning with the multi-year Art Basel initiative.
Click to Expand
0

3. Session - Store the last question

0
if session[:lastquestion] != 0

        array_of_lines = IO.readlines("responses.txt")
        array_of_lines.each do |line|
        
           items = []
           items = line.split( ";")
           question = items[0] # question
           response1 = items[1]
           response2 = items[2]
           reply = items[3]

          if (session[:lastquestion] == question) && (items[2] != nil)
            # response here...
            if (body.include? response1) or (body.include? response2)
                message = reply
                media  = search_giphy_for ("happy")
                #session[:lastquestion] = 0
            else
               message = "I think I will choose " + items[1]
               media = search_giphy_for ("confused")
               #session[:lastquestion] = 0
            end

          end

      end

      session[:lastquestion] = 0
      
      else

        sigh_words=["... ", "Em.... ", "Hm... "]
        array_of_lines = IO.readlines("responses.txt")
        sampled = array_of_lines.sample.to_s
        items = []
        items = sampled.split( ";")
        question = items[0] # question
        response1 = items[1]
        response2 = items[2]
        reply = items[3]
        session[:lastquestion] = items[0]
        media = search_giphy_for ("confused")
        message = sigh_words.sample.to_s + session[:lastquestion].to_s

      end
Click to Expand
0

4. Rakefile - Proactively send MMS to users

0
desc 'sends a test MMS to your twilio number'
task :send_photo do

  client = Twilio::REST::Client.new ENV["TWILIO_ACCOUNT_SID"], ENV["TWILIO_AUTH_TOKEN"]
  message, media = city_message


   client.api.account.messages.create(
   from: ENV["TWILIO_FROM"],
   to: ENV["MY_NUMBER"],
   body: message,
   media_url: media
   )

end
Click to Expand
0
  GuaGua's Features   

1. Sending traveling photos to users at random

Users will never know what time GuaGua will send them photos and cannot ask GuaGua to send photos.

2. Having personal time.

GuaGua needs its own time, like eating time, sleeping time, touring time and so on. In these periods, Guagua will not talk to users!

3. Changing topics when it cannot understand the texts

GuaGua cannot understand everything people talking about.  So when GuaGua has the problem with understanding, it will ask users some questions or give excuses, like " GuaGua is traveling..."

4. Recommending traveling cities

Users can ask GuaGua to recommend traveling cities for them.

Screenshots:

0
Demo Video
0
0

Reflection

From this class, I followed and practiced how to make a chatbot. And I had some knowledge about Ruby. But I think the biggest gain is to understand conversational UI and Zero-UI. I think seven weeks are kind of short to learn the conversational UI. I hope to have more time to learn more about Zero-UI and natural interactions.

Github: https://github.com/daraghbyrne/onlineprototypes2018/tree/master/students/sijiaw2/finalproject

Heroku Application: https://nameless-tor-66304.herokuapp.com/sms/incoming

x
Share this Project

Courses

49714 Programming for Online Prototypes

· 9 members

A hands on introduction to building online products and services through code


Focused on
About

GuaGua is a text-based bot. It acts as your friend and can send you traveling photos from all over the world. GuaGua will not always be online since it needs personal time. You can ask it about touring tips, and it can recommend you traveling cities. As your friend, it also looks for your help and advice sometimes.

Created

October 19th, 2018