SlideShare a Scribd company logo
1 of 14
Azure Bot Service を
用いた Bot 開発
- Cosmos DB と Logic Appsを添えて-
1
• プロフィール
• 所属:日本マイクロソフト(4月入社の新人です)
• 職種:サポートエンジニア(Web, Bot などのチーム)
• 趣味
• ゲーム、アニメ、アコギの弾き語り
• 基本インドアな趣味の方が多め
• 自粛に耐えうるヲタク:要するにただのヲタク
• エンジニアリング
• 情報系の大学院卒業
• 広く浅く技術を追っていた
• Azure Tech Lab にも何度かお邪魔させていただいてます←ここ重要
(私の SNS のリンク、参考 URL は後ろにはっときます)
Azure Bot Service とは
Chat Bot を簡単に開発/運用できる service
• Bot App と channel をつなぐサービス
• GitHub で公開されている Sample
• C#, Node.js, ES6, Python, Typescript
channel Connector Bot App
Bot Service
3
作ってみた Bot :Tech Info Bot for Teams
• 基本機能
• Reply :好きな時に好きな分野の記事やセミナーを探す
• Push :特定の分野に関する情報を定期的に流す
4
Reply の場合 Push の場合
HoloLens の
情報が欲しい
HoloLens の
情報を送信
事前情報から k8s の
情報を定刻に送信
好きな時に好きな内容について 自動的に決まった内容について
指定した IT 用語に関係する情報
(Qiita の記事や connpass のイベント)を教えてくれる Bot
Reply 機能の動画
1. 何でもいいから話しかける(挨拶は大事)
2. 何をするか選ぶ
(情報の取得, Push 通知の登録, Push 通知の一覧表示 )
3. どの種類の情報を得るか選ぶ(今は Qiita のみ対応)
4. 何について調べるか入力する
5. Card からみたい情報のリンクを開く
Qiita の記事をとってくる手順
5
とりあえず話しかけたらどうにかしてくれます ^^)
*ブラウザで見るとアニメーションは崩れてるかもです。
動画単体をご確認ください。
Push 通知 (ProActive Message) の実装
• Data Base : Cosmos DB
• Conversation reference という値からユーザを特定する
• これをどこかに保存し、push 通知の際に参照する必要あり
• 定期実行 : Logic Apps
• 指定した時間に Message を送信
• App Service の外から HTTP リクエストを送る必要あり
• Reply の場合とは別の Endpoint を App Service に用意
ProActive な動作をするには他のサービスと組み合わせるべし!
6
ノー(ロー)コード開発サービス
• 定期的なデータ取得
• Javascript で書くこともできる
Logic Apps
Cosmos DB から
データを取得
取得した各要素で
Http リクエストを
送信(push 通知)
7
システム構成
User
定期実行する
Logic Apps
Bot Service Cosmos DB
種々の外部 API
(現在は Qiita のみ)
(他の候補募集中)
8
1 h ごとに
DB 見るやで!
Bot の Local test
Bot Framework Emulator : local test を行うためのツール
• Channel によって動作や表示形式が異なるのは注意
Emulator のカルーセル
Teams (Dark Mode)のカルーセル
9
Emulator の動作画面(sample を実行中)
Azure への Deploy
• VS Code の拡張機能(個人的にはこれが楽だった)
• 2 クリックくらいで deploy できる
インスタンスを選んで
Deploy !
10
俺もいるやで... (ボソッ
各サービスを使った所感
• Azure Bot Service
• 簡単に Reply Bot ができた
• 状態を保持した会話のフローは function にはない利点
• Q&A Bot などの豊富な sample がある
• 逆に sample が多いので選択が難しい
• Logic Apps
• ローコードに他のサービスや API との連携ができる
• 用意されている関数で実装できないとこが出てくる
(今回は javascript でフォローした)
色んなサービスを駆使して、快適な Bot Life を
11
まとめ
Bot はいいぞ!
12
Bot はいいぞ!
おまけ:私の SNS
すべての発言は個人の感想に基づくアレです
Ctr + click or QR code or URL からご参照ください。よろこびます。 m(_ _)m
https://www.facebook.com/profile.php?id=100010376135272
https://www.linkedin.com/in/minoru-ito-171a4a194/
https://twitter.com/MINORUITO9
おまけ:開発における参考資料
• 今回使用した Azure のサービスのクイックスタート
• Azure Bot Service
• Cosmos DB
• Logic Apps
• Azure Bot Service に関する追加情報
• GitHub の sample code
• Node.js で Azure Bot Service の Sample を local test するまでの記事
(私の Qiita の記事です)
• Q&A Bot (サービス名は QnA Maker) のラーニング
• Support チームのブログ(MS の公式見解ではないです)
• 障害発生時の対応の話などもあります
• Bot 以外のことも触れてます

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Azure Bot Service を用いた Bot 開発 - CosmosDB と Logic Apps を添えて -

  • 1. Azure Bot Service を 用いた Bot 開発 - Cosmos DB と Logic Appsを添えて- 1
  • 2. • プロフィール • 所属:日本マイクロソフト(4月入社の新人です) • 職種:サポートエンジニア(Web, Bot などのチーム) • 趣味 • ゲーム、アニメ、アコギの弾き語り • 基本インドアな趣味の方が多め • 自粛に耐えうるヲタク:要するにただのヲタク • エンジニアリング • 情報系の大学院卒業 • 広く浅く技術を追っていた • Azure Tech Lab にも何度かお邪魔させていただいてます←ここ重要 (私の SNS のリンク、参考 URL は後ろにはっときます)
  • 3. Azure Bot Service とは Chat Bot を簡単に開発/運用できる service • Bot App と channel をつなぐサービス • GitHub で公開されている Sample • C#, Node.js, ES6, Python, Typescript channel Connector Bot App Bot Service 3
  • 4. 作ってみた Bot :Tech Info Bot for Teams • 基本機能 • Reply :好きな時に好きな分野の記事やセミナーを探す • Push :特定の分野に関する情報を定期的に流す 4 Reply の場合 Push の場合 HoloLens の 情報が欲しい HoloLens の 情報を送信 事前情報から k8s の 情報を定刻に送信 好きな時に好きな内容について 自動的に決まった内容について 指定した IT 用語に関係する情報 (Qiita の記事や connpass のイベント)を教えてくれる Bot
  • 5. Reply 機能の動画 1. 何でもいいから話しかける(挨拶は大事) 2. 何をするか選ぶ (情報の取得, Push 通知の登録, Push 通知の一覧表示 ) 3. どの種類の情報を得るか選ぶ(今は Qiita のみ対応) 4. 何について調べるか入力する 5. Card からみたい情報のリンクを開く Qiita の記事をとってくる手順 5 とりあえず話しかけたらどうにかしてくれます ^^) *ブラウザで見るとアニメーションは崩れてるかもです。 動画単体をご確認ください。
  • 6. Push 通知 (ProActive Message) の実装 • Data Base : Cosmos DB • Conversation reference という値からユーザを特定する • これをどこかに保存し、push 通知の際に参照する必要あり • 定期実行 : Logic Apps • 指定した時間に Message を送信 • App Service の外から HTTP リクエストを送る必要あり • Reply の場合とは別の Endpoint を App Service に用意 ProActive な動作をするには他のサービスと組み合わせるべし! 6
  • 7. ノー(ロー)コード開発サービス • 定期的なデータ取得 • Javascript で書くこともできる Logic Apps Cosmos DB から データを取得 取得した各要素で Http リクエストを 送信(push 通知) 7
  • 8. システム構成 User 定期実行する Logic Apps Bot Service Cosmos DB 種々の外部 API (現在は Qiita のみ) (他の候補募集中) 8 1 h ごとに DB 見るやで!
  • 9. Bot の Local test Bot Framework Emulator : local test を行うためのツール • Channel によって動作や表示形式が異なるのは注意 Emulator のカルーセル Teams (Dark Mode)のカルーセル 9 Emulator の動作画面(sample を実行中)
  • 10. Azure への Deploy • VS Code の拡張機能(個人的にはこれが楽だった) • 2 クリックくらいで deploy できる インスタンスを選んで Deploy ! 10 俺もいるやで... (ボソッ
  • 11. 各サービスを使った所感 • Azure Bot Service • 簡単に Reply Bot ができた • 状態を保持した会話のフローは function にはない利点 • Q&A Bot などの豊富な sample がある • 逆に sample が多いので選択が難しい • Logic Apps • ローコードに他のサービスや API との連携ができる • 用意されている関数で実装できないとこが出てくる (今回は javascript でフォローした) 色んなサービスを駆使して、快適な Bot Life を 11
  • 13. おまけ:私の SNS すべての発言は個人の感想に基づくアレです Ctr + click or QR code or URL からご参照ください。よろこびます。 m(_ _)m https://www.facebook.com/profile.php?id=100010376135272 https://www.linkedin.com/in/minoru-ito-171a4a194/ https://twitter.com/MINORUITO9
  • 14. おまけ:開発における参考資料 • 今回使用した Azure のサービスのクイックスタート • Azure Bot Service • Cosmos DB • Logic Apps • Azure Bot Service に関する追加情報 • GitHub の sample code • Node.js で Azure Bot Service の Sample を local test するまでの記事 (私の Qiita の記事です) • Q&A Bot (サービス名は QnA Maker) のラーニング • Support チームのブログ(MS の公式見解ではないです) • 障害発生時の対応の話などもあります • Bot 以外のことも触れてます