CHANNELS.md update (#1502)
* Update CHANNELS.md * Testing alternative image embed * More changes
This commit is contained in:
Родитель
f0807dafac
Коммит
83b261330d
|
@ -3,7 +3,7 @@
|
|||
[jump to Bot State Inspection](#bot-state-inspection)
|
||||
|
||||
## Prerequisites
|
||||
- A bot deployed to Azure configured to use the Teams channel.
|
||||
- A bot configured in Azure configured to use the additional channels. (Microsoft Teams, etc).
|
||||
- [The latest Emulator](https://github.com/Microsoft/BotFramework-Emulator/releases)
|
||||
|
||||
## TL;DR
|
||||
|
@ -39,9 +39,15 @@ If you haven't already, get the [latest Emulator](https://github.com/Microsoft/B
|
|||
Your bot will need to configure the Bot Inspector middleware in order to connect to and send the conversation exchange to the Emulator. Include the [InspectionMiddleware](https://github.com/Microsoft/botbuilder-js/blob/1c790f4a4f0d761c215eb3841ff370f4b274f5d1/libraries/testbot/index.js#L21) in your Bot's middleware stack:
|
||||
|
||||
```javascript
|
||||
const { InspectionMiddleware } = require('botbuilder')
|
||||
const { MemoryStorage, UserState, ConversationState, InspectionState, InspectionMiddleware } = require('botbuilder')
|
||||
const { MicrosoftAppCredentials } = require('botframework-connector')
|
||||
|
||||
let memoryStorage = new MemoryStorage();
|
||||
let inspectionState = new InspectionState(memoryStorage);
|
||||
|
||||
let userState = new UserState(memoryStorage);
|
||||
let conversationState = new ConversationState(memoryStorage)
|
||||
|
||||
let credentials = undefined;
|
||||
if (process.env.MicrosoftAppId && process.env.MicrosoftAppPassword) {
|
||||
credentials = new MicrosoftAppCredentials(process.env.MicrosoftAppId, process.env.MicrosoftAppPassword);
|
||||
|
@ -51,7 +57,7 @@ adapter.use(new InspectionMiddleware(inspectionState, userState, conversation
|
|||
```
|
||||
|
||||
## 2. Run ngrok
|
||||
Open a terminal and run ngrok with the following command to create a new tunnel:
|
||||
Open a terminal and run ngrok with the following command to create a new tunnel (you may need to navigate to where the ngrok executable lives on your filesystem):
|
||||
|
||||
OSX
|
||||
```bash
|
||||
|
@ -62,8 +68,7 @@ Windows
|
|||
"ngrok.exe" http 3979 --host-header=localhost
|
||||
```
|
||||
|
||||
The output in the terminal should look something like this:
|
||||
<img width="639" alt="image" src="https://user-images.githubusercontent.com/2652885/55196448-a2bb1c00-516c-11e9-87ce-98bdc1ebd7f8.png">
|
||||
Save the https entry generated by ngrok to your clipboard.
|
||||
|
||||
## 3. Update Azure to Point to the Tunnel
|
||||
In the azure portal, [navigate to your bot's settings](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-settings?view=azure-bot-service-4.0) and paste the url provided by the ngrok terminal in the *Messaging endpoint* field and save the changes. Do not forget to use `/api/messages`. It's best to create a Bot in Azure that is used specifically for this purpose. Do not overwrite the messaging endpoint of a deployed production bot.
|
||||
|
@ -86,34 +91,24 @@ dotnet run
|
|||
If you haven't already done so, [connect your bot to a channel](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-channels?view=azure-bot-service-4.0). You may also need to download and install the app associated with the channel if you have't already. Afterwards, open the respective chat link provided in the Azure Portal in the Channels blade.
|
||||
|
||||
## 6. Start up the Emulator
|
||||
Open the Emulator if it isn't open already. In the Emulator choose file > Bot Inspector Mode.
|
||||
|
||||
<img width="444" alt="Screen Shot 2019-04-30 at 2 48 50 PM" src="https://user-images.githubusercontent.com/1156704/56995648-2d6dad00-6b57-11e9-85f0-d0128bf32d7a.png">
|
||||
Open the Emulator if it isn't open already. In the Emulator choose `View` -> `Bot Inspector Mode`.
|
||||
|
||||
## 7. Connect to your locally running Bot Open Bot -> Url
|
||||
|
||||
<img width="889" alt="Screen Shot 2019-04-30 at 2 50 14 PM" src="https://user-images.githubusercontent.com/1156704/56995693-4a09e500-6b57-11e9-917b-0178ea504f90.png">
|
||||
Connect to your bot by selecting `Open Bot` and providing the appropriate fields. Don't forget the MicrosoftAppId & MicrosoftAppPassword if configured to use an external channel.
|
||||
|
||||
## 8. Copy the `/INSPECT attach <UUID>` command rendered in the Conversation window and paste it into the configured channel's chat
|
||||
|
||||
You can do this few ways. The easiest is by right-clicking on the rendered message and selecting "Copy text" from the context menu.
|
||||
|
||||
<img width="895" alt="Screen Shot 2019-04-30 at 8 38 47 PM" src="https://user-images.githubusercontent.com/1156704/57004973-ac2f0e00-6b88-11e9-8d05-e627d50b791b.png">
|
||||
A successful connection to the bot will render the text that you see above. We need to save this text and paste it in to the channel you intend to have the conversation in. You can do this few ways. The easiest is by right-clicking on the rendered message and selecting "Copy text" from the context menu.
|
||||
|
||||
## 9. Have conversation in external channel
|
||||
|
||||
Have a normal conversation with your Bot in your configured channel, and while doing do you will see information populating in your connected conversation in the Emulator.
|
||||
|
||||
<img width="870" alt="Screen Shot 2019-04-30 at 2 55 49 PM" src="https://user-images.githubusercontent.com/1156704/56995966-1085a980-6b58-11e9-8f50-c410e2accafa.png">
|
||||
|
||||
# Bot State Inspection
|
||||
|
||||
The Bot Inspector now renders the Bot State for each Turn Context executed in the Bot's runtime. You can view this by selecting the `Bot State` element rendered in the Conversation control in JSON or Graph form.
|
||||
|
||||
<img width="991" alt="Screen Shot 2019-04-30 at 8 40 18 PM" src="https://user-images.githubusercontent.com/1156704/57004983-c1a43800-6b88-11e9-81ab-0ac412f4f96c.png">
|
||||
|
||||
You can view the difference between Bot State's by right-clicking on one of these Bot State elements and selecting the "view diff with previous" item.
|
||||
|
||||
<img width="509" alt="Screen Shot 2019-04-30 at 8 40 48 PM" src="https://user-images.githubusercontent.com/1156704/57004994-d41e7180-6b88-11e9-9cfe-18ddd4b53965.png">
|
||||
|
||||
<img width="656" alt="Screen Shot 2019-04-30 at 8 40 38 PM" src="https://user-images.githubusercontent.com/1156704/57004998-e13b6080-6b88-11e9-8b6c-d23cb8879ea2.png">
|
||||
Have fun! And please provide any feedback by filing a new issue on [the Bot Framework Emulator Github Project](https://github.com/Microsoft/BotFramework-Emulator/issues)
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 280 KiB |
|
@ -3337,7 +3337,7 @@
|
|||
},
|
||||
"array-ify": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/array-ify/-/array-ify-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
|
||||
"integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4="
|
||||
},
|
||||
"array-includes": {
|
||||
|
@ -5281,7 +5281,7 @@
|
|||
},
|
||||
"byline": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/byline/-/byline-5.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz",
|
||||
"integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE="
|
||||
},
|
||||
"byte-size": {
|
||||
|
@ -5995,7 +5995,7 @@
|
|||
},
|
||||
"cmd-shim": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/cmd-shim/-/cmd-shim-2.0.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz",
|
||||
"integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
|
@ -6088,7 +6088,7 @@
|
|||
},
|
||||
"columnify": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/columnify/-/columnify-1.5.4.tgz",
|
||||
"resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz",
|
||||
"integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=",
|
||||
"requires": {
|
||||
"strip-ansi": "^3.0.0",
|
||||
|
@ -6131,7 +6131,7 @@
|
|||
},
|
||||
"compare-func": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/compare-func/-/compare-func-1.3.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz",
|
||||
"integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=",
|
||||
"requires": {
|
||||
"array-ify": "^1.0.0",
|
||||
|
@ -6140,7 +6140,7 @@
|
|||
"dependencies": {
|
||||
"dot-prop": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/dot-prop/-/dot-prop-3.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz",
|
||||
"integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=",
|
||||
"requires": {
|
||||
"is-obj": "^1.0.0"
|
||||
|
@ -7859,7 +7859,7 @@
|
|||
},
|
||||
"decamelize-keys": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/decamelize-keys/-/decamelize-keys-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz",
|
||||
"integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=",
|
||||
"requires": {
|
||||
"decamelize": "^1.1.0",
|
||||
|
@ -7881,7 +7881,7 @@
|
|||
},
|
||||
"dedent": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/dedent/-/dedent-0.7.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
|
||||
"integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw="
|
||||
},
|
||||
"deep-diff": {
|
||||
|
@ -7998,7 +7998,7 @@
|
|||
},
|
||||
"defaults": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/defaults/-/defaults-1.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
|
||||
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
|
||||
"requires": {
|
||||
"clone": "^1.0.2"
|
||||
|
@ -8040,7 +8040,7 @@
|
|||
"dependencies": {
|
||||
"globby": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "http://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
||||
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
|
||||
"requires": {
|
||||
"array-union": "^1.0.1",
|
||||
|
@ -10898,7 +10898,7 @@
|
|||
},
|
||||
"get-pkg-repo": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz",
|
||||
"integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=",
|
||||
"requires": {
|
||||
"hosted-git-info": "^2.1.4",
|
||||
|
@ -11059,7 +11059,7 @@
|
|||
},
|
||||
"git-remote-origin-url": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz",
|
||||
"integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=",
|
||||
"requires": {
|
||||
"gitconfiglocal": "^1.0.0",
|
||||
|
@ -11210,7 +11210,7 @@
|
|||
},
|
||||
"gitconfiglocal": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz",
|
||||
"integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=",
|
||||
"requires": {
|
||||
"ini": "^1.3.2"
|
||||
|
@ -12610,7 +12610,7 @@
|
|||
},
|
||||
"is-text-path": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/is-text-path/-/is-text-path-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz",
|
||||
"integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=",
|
||||
"requires": {
|
||||
"text-extensions": "^1.0.0"
|
||||
|
@ -14244,7 +14244,7 @@
|
|||
},
|
||||
"jsonparse": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/jsonparse/-/jsonparse-1.3.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
|
||||
"integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA="
|
||||
},
|
||||
"jsonpointer": {
|
||||
|
@ -17336,7 +17336,7 @@
|
|||
},
|
||||
"parse-github-repo-url": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz",
|
||||
"integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A="
|
||||
},
|
||||
"parse-glob": {
|
||||
|
@ -20388,7 +20388,7 @@
|
|||
},
|
||||
"quick-lru": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/quick-lru/-/quick-lru-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
|
||||
"integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g="
|
||||
},
|
||||
"raf": {
|
||||
|
@ -20821,7 +20821,7 @@
|
|||
},
|
||||
"read-cmd-shim": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz",
|
||||
"integrity": "sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2"
|
||||
|
@ -20918,7 +20918,7 @@
|
|||
},
|
||||
"load-json-file": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
|
@ -23164,7 +23164,7 @@
|
|||
},
|
||||
"temp-dir": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/temp-dir/-/temp-dir-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz",
|
||||
"integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0="
|
||||
},
|
||||
"temp-file": {
|
||||
|
@ -23200,7 +23200,7 @@
|
|||
},
|
||||
"temp-write": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/temp-write/-/temp-write-3.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/temp-write/-/temp-write-3.4.0.tgz",
|
||||
"integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
|
@ -23559,7 +23559,7 @@
|
|||
},
|
||||
"trim-off-newlines": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz",
|
||||
"integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM="
|
||||
},
|
||||
"trim-right": {
|
||||
|
@ -24496,7 +24496,7 @@
|
|||
},
|
||||
"wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
"integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
|
||||
"requires": {
|
||||
"defaults": "^1.0.3"
|
||||
|
|
Загрузка…
Ссылка в новой задаче