LoginSignup
4
5

More than 3 years have passed since last update.

ローカルで動作するチャットボットの構築(その①:ローカル接続テスト)

Last updated at Posted at 2020-02-19

シリーズ概要

Microsoft Bot Framework を使用することでTeams、Slack、Lineなどのチャットアプリに簡単に接続することができます。今回はローカルPCで起動しているチャットボットアプリケーションをTeams上で使用する方法をご紹介します。
(注)この記事ではBot Frameworkを使用したチャットボット開発そのものは対象外です。


本記事の概要

まずはローカル環境でBot Frameworkで問題なくボットが応答できることを確認します。


準備と環境

  • Azureの有効なサブスクリプション
  • Bot Framework対応チャットボット
  • Bot Framework Emurator

1. AzureでアプリケーションIDとパスワードを発行する

BotFrameworkの利用には、Azure上でアプリ用のID、パスワードを発行する必要があります。

① Azure portal 「アプリの登録」より新規アプリを登録します。

image.png

image.png

② ブレード「証明書とシークレット」よりクライアントシークレットを作成します。

image.png

③ 上記で取得したID、パスワードを作成済みのチャットボットの認証設定してください


2. Bot Framework Emurator

① 起動と接続

Bot Framework Emuratorを起動し、File > Open Bot を起動し、接続情報を入力後[Connect]を押下します
※ここでは、localhost:1080で起動しているチャットボットに、BotFrameworkが要求するAPI(api/messages)に接続してます。

image.png

正常に接続できれば起動しているチャットボットのメッセージが表示されます。

image.png


まとめ

ローカル(オンプレミス)環境でチャットボットを起動・運用するための1つ目の手順としてBot Framework Emurator を使用した接続確認を行いました。

次の記事 -> その②:Azure上で接続テスト

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5