Azure Bot Service - Part 5 (關於 Form bot)在前面文章中 Azure Bot Services - Part 2(設定 Azure Bot Service), 我們對Azure Bot Service做了基本設定,其中有四個模版(Basic、Form、Language understanding、Proactive)各有其功能,今天就讓我們來認識一下 Form bot
使用者發訊息
驗證使用者
1-1. 未通過
回應未驗證
1-2. 通知
執行
Runmethond ofRun.csx
以 ActivityType 決定回應方式
3-1. ActivityTypes.Message:
Processes the user’s message.
MessageReceivedAsync of MainDialog.csx 建立表單並開始提問BasicForm 中 public property 是要問的問題;{&} 會以 property name 取代{||} 會使用 enum 來產生選項(是選擇題型)3-2. ActivityTypes.ConversationUpdate:
Welcomes the users to the conversation.
3-3. ActivityTypes.ContactRelationUpdate:
3-4. ActivityTypes.Typing:
3-5. ActivityTypes.DeleteUserData:
3-6. ActivityTypes.Ping:
| ActivityType | Description | 
|---|---|
| message | 使用者與 bot 間簡單的文字對話 | 
| conversationUpdate | bot 被加入至新的對談中或是對談的中繼資料有所改變 | 
| contactRelationUpdate | bot 被加入或是移出連絡人清單中 | 
| typing | 使用者或是 bot 在另一方對話結束後正在打字 | 
| ping | 測試 bot 的安全性 | 
| deleteUserData | 使用者要求 bot 刪除使用者相關資料 |