iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 12
1
Microsoft Azure

利用Python開發一個以Azure服務為基底的Chat Bot系列 第 12

【Day12】在 emulator 測試第一個 chatbot

大家好,今天要來跟大家一起在 Bot Framework Emulator 測試第一個 chatbot。

前置步驟

0.1 成功下載 Bot Framework Emulator

0.2 建立好 Python 環境

0.3 打開 terminal (Powershell or CMD),輸入以下指令

pip install requests

下載官方 source code

1.1 前往官方 github 下載程式碼壓縮檔
https://ithelp.ithome.com.tw/upload/images/20200927/20129689ivT4R5G2y5.jpg

1.2 解壓縮程式檔,複製 sample 資料夾裡的 python 資料夾至桌面

BotBuilder-Samples-main --> samples --> python

執行程式碼

2.1 新增一個 Visual Studio Code (VS Code) 視窗

2.2 利用左上角 open folder 開啟以下資料夾
https://ithelp.ithome.com.tw/upload/images/20200927/20129689nXLRA3mmtZ.jpg

2.3 打開 VS Code 內建 terminal (Powershell or CMD),輸入以下指令

pip install -r requirements.txt

2.4 待完成後,輸入以下指令

python app.py

在 emulator 測試 chatbot

3.1 打開 Bot Framework Emulator

3.2 輸入這行 URL

http://localhost:3978/api/messages

https://ithelp.ithome.com.tw/upload/images/20200927/20129689tnCQcmonEE.jpg

3.3 玩玩看 回音機器人吧~


以上是我今天想要分享的內容,明天將會介紹 Microsoft Bot Framework 的小知識,我們明天見。


上一篇
【Day11】初探 Chatbot
下一篇
【Day13】淺談 Microsoft Bot Framework
系列文
利用Python開發一個以Azure服務為基底的Chat Bot30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言