---
# System prepended metadata

title: 0608 智慧課服 Chatbot

---

# 0608 智慧課服 Chatbot


##  MovieBot

![](https://hackmd.io/_uploads/HkDceelw3.png)
![](https://hackmd.io/_uploads/S1dslgxDn.png)

https://dialogflow.cloud.google.com/#/newAgent
好像自動有登入了
應該是google帳號自動登入


建立agent

跟著訓練回應指令

![](https://hackmd.io/_uploads/Sk3JGelP2.png)
![](https://hackmd.io/_uploads/ryEgGleDh.png)
建立intent

要打Get Movie Intro
記得儲存

![](https://hackmd.io/_uploads/Hkg7Glevn.png)
![](https://hackmd.io/_uploads/HJIXMxlw2.png)
重點是把電影名稱選取來換成 @sys.any
你要圈選實際的電影名稱
然後左邊換成MovieName
![](https://hackmd.io/_uploads/S1xrGlew2.png)
![](https://hackmd.io/_uploads/BkUHzllP3.png)
![](https://hackmd.io/_uploads/HkYIfglP3.png)

![](https://hackmd.io/_uploads/rJSuGggwn.png)
![](https://hackmd.io/_uploads/BJ5uGeeP3.png)

![](https://hackmd.io/_uploads/S1qfXeeD2.png)
![](https://hackmd.io/_uploads/Sy9N7xev3.png)
![](https://hackmd.io/_uploads/rJ0VQxev2.png)




# EC BOT


![](https://hackmd.io/_uploads/B103WBZw3.png)

幕後花絮的網址是啥

要怎抓到那圖片R

![](https://hackmd.io/_uploads/SJ_RZrZDn.png)


https://api.themoviedb.org/3/search/movie?api_key=8c806b688e77b89a8d25f81127e9721c&language=zh-TW&query=%E5%93%A5%E5%90%89%E6%8B%89%E5%A4%A7%E6%88%B0%E9%87%91%E5%89%9B

![](https://hackmd.io/_uploads/H1ikGSZw3.png)


多寫一個if

```
 if(body.results[0].backdrop_path){
                    let movieImageObject = {};
                    movieImageObject.image = { imageUri: "https://image.tmdb.org/t/p/original" + body.results[0].backdrop_path};
                    thisFulfillmentMessages.push(movieImageObject);
                }
```

![](https://hackmd.io/_uploads/HkxbfHZD2.png)

![](https://hackmd.io/_uploads/ry2WMHZwh.png)


![](https://hackmd.io/_uploads/ByBffBWP2.png)

![](https://hackmd.io/_uploads/B1amGBWD2.png)

改好要重整

---

在資料庫建立表格

![](https://hackmd.io/_uploads/H1SBMSZD3.png)

![](https://hackmd.io/_uploads/B15SzS-vn.png)

![](https://hackmd.io/_uploads/BJmIMS-v3.png)

---

![](https://hackmd.io/_uploads/BJdZQrWD2.png)

![](https://hackmd.io/_uploads/By0MQSZwh.png)

![](https://hackmd.io/_uploads/SyArQrZPn.png)
![](https://hackmd.io/_uploads/HyQIXBZwh.png)


# 可以換貼紙
https://developers.line.biz/en/docs/messaging-api/sticker-list/

# 給開發者使用的
https://developers.line.biz/en/reference/messaging-api/#text-message



# 要對應這個網址去找API
https://developers.line.biz/en/docs/messaging-api/message-types/


# Chorme 的擋廣告插件
https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm/related?hl=zh-TW


![](https://hackmd.io/_uploads/Sk13QB-w2.png)
![](https://hackmd.io/_uploads/rk4nmr-D2.png)


---

![](https://hackmd.io/_uploads/Hk06XB-Dn.png)
![](https://hackmd.io/_uploads/B1WJNSZDh.png)
![](https://hackmd.io/_uploads/ByQxVSWDh.png)
![](https://hackmd.io/_uploads/rknl4HZP3.png)


---

# SmartHomeBot


npm install json-server -g  (mac要在前面+sudo)
Set-ExecutionPolicy RemoteSigned

重開以系統管理員執行

成功畫面
![](https://hackmd.io/_uploads/BJTFcCXDn.png)


---

部屬到azure 雲端(學生mail或是pay as you go)
![](https://hackmd.io/_uploads/H1jksCQwn.png)
![](https://hackmd.io/_uploads/HyLgj0Qv3.png)
![](https://hackmd.io/_uploads/HylWo0XPn.png)
就能回去line 測試就完成了

更改後執行以下的指令
![](https://hackmd.io/_uploads/Syi-jAQP3.png)

---

https://hospitable-top-f1b.notion.site/EEIT65-Azure-Chatbot-d5e86bc67fb84307bbde2cc3442349d6

![](https://hackmd.io/_uploads/SkrUi0mw3.png)
日曆點進去,會有錄影

https://www.dropbox.com/scl/fi/symohlutxt5lys5ghtnnp/20230610_090355.mp4?dl=0&rlkey=23pmdddv573x84hncrl70ozqc

像這樣