微软 Botframework Bot Emulator快速开始

微软 Bot Framework (https://dev.botframework.com/) 提供的工具可用于在一个位置构建、测试、部署和管理聊天机器人。 通过使用 SDK、工具、模板和 AI 服务提供的模块化可扩展框架,开发人员可以创建可使用语音、自然语言理解、问题和答案处理等功能的机器人。

Bot Emulator 是 Botframework 的机器人集成开发工具 IDE。利用 Bot Emulator 快速开发聊天机器人。

Bot Emulator 快速开始

setup project

npm install -g yo
npm install -g generator-botbuilder
yo botbuilder

create luis.ai service

source ~/venv-py3/bin/activate
pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge
  • Login Azure Cli
az login
  • Install cli tools
npm i -g msbot luis-apis ludown
  • Get Luis Authoring Key
Login : https://www.luis.ai/home
Navigate to : https://www.luis.ai/user/settings

  • Get AZURE SUBSCRIPTION ID

在这里插入图片描述

  • Parse LUIS.ai Model
cd $baseDir/../myJsBots
ludown parse toluis \
    --in dialogs/greeting/resources/main.lu \
    -o cognitiveModels/ \
    --out basicBot.luis \
    -n 'myJsBots_myChatBot-LUIS' \
    -d 'Bot Builder V4 Basic Bot.' --verbose
  • Deploy LUIS.ai Service
luis import application \
    --in cognitiveModels/basicBot.luis \
    --authoringKey $LUIS_KEY \
    --msbot --endpointRegion | msbot --secret $MSBOT_SECRET connect luis --stdin
  • Train LUIS.ai Service
msbot get myJsBots_myChatBot-LUIS --secret $MSBOT_SECRET | luis train version --wait --stdin
  • Publish LUIS.ai Service
msbot get myJsBots_myChatBot-LUIS --secret $MSBOT_SECRET | luis publish version --wait --stdin

Start project

cd myJsBots
npm start

Connect with Botframework Emulator

在这里插入图片描述

references

mstechsummit-workshop

Create a bot with the Bot Builder SDK for JavaScript

troubles

  1. [msbot] can not clone service #632
~/.nvm/versions/node/v8.10.0/lib/node_modules/msbot/bin/msbot-clone-services.js
  1. [azure-cli] does not work with bot service
Install edge build from https://github.com/Azure/azure-cli
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值