Line bot之今晚我想來點
The Tool use google API(feature 4) to help you find place, user can specify the place type, star, price, distance to get a list.And more detailed is in the feature 8. And also the tool can write, save and clear the text, and do sentimental analysis.
FSM
Usage
help
Give the instruction
fsm
Show the current fsm state
sen
Show the sentiment calculate result
1-8
Use feature
Feature
-
save text
input text and save
input:
1
reply:
"Trigger save text"
input:
"saved text"
-
load text
show the saved text
-
show fsm picture
show initial state picture
-
find place nearby
input:
address/name
result:
target is 10 place nearby sorted by prominence
input:
target number 0-10
result:
target name
show the place nearby
specify the tyes, including food , restaurant, political, finance, health and so on
specify the radius distance
specify the star
specify the price range
the target range is -1 - 9
-
show sticker
Input two arguments, package id and sticker id
Play with the sticker
-
clear text
Clear the saved text
-
sentiment calculate
Anaylyze the save text sentiment
-
find place input:
target name
result:
search basic information
Find place to get address, price, star, website and so on
How to setup
-
pipenv install
-
heroku login
-
heroku buildpack(Aptfile)
$ heroku buildpacks:set heroku/python $ heroku buildpacks:add --index 1 heroku-community/apt
-
set environment variable
heroku config:set LINE_CHANNEL_SECRET=your_line_channel_secret heroku config:set LINE_CHANNEL_ACCESS_TOKEN=your_line_channel_access_token heroku config:set PORT=your_port heroku config:set FSM_GRAPH_URL=your_initial_state_fsm_picture_url heroku config:set GOOGLE_KEY=your_google_map_api_key heroku config:set DOMAIN_URL=your_domain_url
-
git heroku git:remote -a {HEROKU_APP_NAME} git add . git commit -m "Add code" git push heroku master
Example
今晚我想來點附近
檢查&複製名子
今晚我想來點