Giter Site home page Giter Site logo

microsoft / botbuilder-tools Goto Github PK

View Code? Open in Web Editor NEW
443.0 67.0 261.0 52.14 MB

Welcome to the Bot Framework Tools repository, which is the home for a set of tools for developers building bots with the Microsoft Bot Framework

Home Page: https://github.com/Microsoft/botframework

License: MIT License

JavaScript 49.47% TypeScript 46.78% PowerShell 0.36% Shell 0.08% Batchfile 0.18% C# 2.89% ANTLR 0.25%
bot-framework bot-builder bot bots luisai luis qnamaker microsoft-cognitive-services microsoft-bot-framework

botbuilder-tools's Introduction

Bot Framework Tools

The new BF CLI replaces legacy standalone tools

The Bot Framework SDK team is happy to announce the General Availability of the consolidated bot framework CLI tool bf-cli. The new BF CLI tool will replace legacy standalone tools to manage Bot Framework bots and related services. The old tools will be ported over in phases and all new features, bug fixes, and further investments will focus on the new BF CLI. Old tools will still work for the time being, but they are going to be deprecated in future releases.

Upon the release of Bot Framework SDK version 4.6 the following legacy tools have been ported: Chatdown, QnAMaker, LuisGen, and LuDown. Dispatch CLI is on the path to be deprecated and replaced with Orchestrator.

To learn more about the BF CLI please visit the BF CLI github repository.

The following page is about the legacy tools.

Bot Framework Tools

Build Status Coverage Status lerna

The Bot Framework tools are a collection of cross-platform command line tools designed to cover end-to-end bot development workflow. This repo is part of the Microsoft Bot Framework - a comprehensive framework for building enterprise-grade conversational AI experiences.

Stable release Tool Description
npm version Chatdown Prototype mock conversations in markdown and convert the markdown to transcripts you can load and view in the new V4 Bot Framework Emulator
npm version MSBot Create and manage connected services in your bot configuration file
npm version LUDown Build LUIS language understanding models using markdown files
npm version LUIS Create and manage your LUIS.ai applications
npm version QnAMaker Create and manage QnAMaker.ai Knowledge Bases.
npm version Dispatch Build language models allowing you to dispatch between disparate components (such as QnA, LUIS and custom code)
npm version LUISGen Auto generate backing C#/Typescript classes for your LUIS intents and entities.

Install CLI tools:

Pre-requisite:

npm install -g chatdown msbot ludown luis-apis qnamaker botdispatch luisgen

Overview

  • Please see here for an overview of the end-to-end bot development workflow.
  • Please see here for an overview of using Bot Builder tools throughout various phases of bot development.

Bot Builder tools are designed to work with

Before writing code, review the bot design guidelines for best practices and identify the needs for your bot: will a basic bot be enough or whether it should have more sophisticated capabilities, such as speech, language understanding, QnA, or the ability to extract knowledge from different sources and provide intelligent answers. This is also the phase where you might want to create mockup of conversations between the user and the bot for the specific scenarios your bot will support. Chatdown is the tool built for this purpose. You can author .chat files that mockup the conversations and then use chatdown CLI to convert them into rich transcripts.

As you build your bot, you may also need to integrate AI services like LUIS.ai for language understanding, QnAMaker.ai for your bot to respond to simple questions in a Q&A format, and more. You can bootstrap language understanding for your bot using LUDown.

The tools are designed to work together. You can then use LUIS CLI and/or the QnAMaker CLI tools to create your LUIS.ai models and QnAMaker knowledge base.

As your bot grows in sophistication, Dispatch CLI can help create and evaluate LUIS models used to dispatch intent across multiple bot modules such as LUIS models, QnA knowledge bases and others (added to dispatch as a file type).

Throughout the Build phase, you can use MSBot CLI to create and keep your bot configuration file updated with all relevant service references.

To test and refine your bot, you can use the new V4 Bot Framework Emulator. The Bot Framework Emulator is a cross-platform Electron application that enables you to test and debug your bots on local machine or in the cloud. The new emulator includes features like faster load times, an improved dynamic layout model, support for multiple bot configurations, simple bot components management, and the ability to inspect responses from connected services such as LUIS and QnA. The Bot Framework Emulator also deepens links to different parts used by the bot. The Bot Framework Emulator new functionality enables you to debug bots based on transcript logs and to view previous chat in presentation mode. The Bot Framework Emulator is available as open source on Github.

With the Azure CLI Bot extension, you can create, download, publish, configure channels with the Azure Bot Service. Azure CLI Bot extension requires Azure CLI (version 2.0.45 or higher]

Building the tools

In order to build the SDK, ensure that you have Git and Node.js installed.

Run the following commands to build all tools.

npm install
npm run build

Run the following command to verify your installation.

npm run test

This repository uses lerna to manage the packages included. This allows you to execute scripts for all packages or only for some packages. For instance, lerna run test will run all tests in each package, but lerna run test --scope chatdown will run the tests of chatdown.

To use lerna, install it as a global package with npm install lerna --global.

Nightly builds

Nightly builds are generated using the latest code. Therefore, they may not be stable, and most likely lack up to date documentation. These builds are better suited for more experienced users, although everyone is welcome to use them and provide feedback.

You can get the latest nightly build of MSBot from the BotBuilder MyGet feed. To install the nightly -

npm config set registry https://botbuilder.myget.org/F/botbuilder-tools-daily/npm/

Install using npm:

npm i -g chatdown msbot ludown luis-apis qnamaker botdispatch luisgen

To reset registry:

npm config set registry https://registry.npmjs.org/

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Copyright (c) Microsoft Corporation. All rights reserved.

botbuilder-tools's People

Contributors

ahmedaashour avatar amirgeorge avatar carlosscastro avatar cezarymarcjan avatar chrimc62 avatar cleemullins avatar daveta avatar enzocano avatar feich-ms avatar garypretty avatar hcyang avatar isc30 avatar johnataylor avatar juanar avatar justinwilaby avatar kaiqb avatar mdrichardson avatar munozemilio avatar omarsourour avatar scheyal avatar seaen avatar sgellock avatar stevengum avatar szul avatar tomlm avatar tracyboehrer avatar tsuwandy avatar victorgrycuk avatar vishwacsena avatar zerryth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botbuilder-tools's Issues

JsonReaderException from dispatch create

Information:

  • Tools Libraries: dispatcher
  • Libraries' Versions:
  • OS: Windows

Issue Description:

dispatcher throws an exception when I enter the same LUIS app twice

Commands Example:

C:\test\botness>dispatch add -type luis -name TravelBooker -id d833c549-33f7-4c6c-9be0-1ebd41cc191d -key 97274b8102ac4c29830480182bd3f475
LUIS app id:d833c549-33f7-4c6c-9be0-1ebd41cc191d, name:TravelBooker, authoring key:97274b8102ac4c29830480182bd3f475, version:0.1 added to TravelD.dispatch

C:\test\botness>dispatch add -type luis -name TravelBooker -id c1e8e209-ea3c-44ba-a2e1-3ed7f4f60256 -key 97274b8102ac4c29830480182bd3f475
LUIS app id:c1e8e209-ea3c-44ba-a2e1-3ed7f4f60256, name:TravelBooker, authoring key:97274b8102ac4c29830480182bd3f475, version:0.1 added to TravelD.dispatch

C:\test\botness>dispatch create

Expected Behavior:

Either success or error (note the name of the app TravelBooker in the second command is wrong)

Actual Results:

Exporting services for dispatch...
Exporting TravelBooker LUIS application...
Exporting TravelBooker LUIS application...
Creating dispatch LUIS model json...
[2018-05-01T14:08:27][MergeAggregateLuisApplicationsOnPhraseLists,211,D:\a\1\s\AugmentLuisModel\UtilityLuisModelJsonAppManager.cs]The input LUIS App "C:\test\botness\data\_L_TravelBooker.json" cannot be validated, EXCEPTION=Newtonsoft.Json.JsonReaderException: Additional text encountered after finished reading JSON content: ". Path '', line 70, position 6.
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at AugmentLuisModel.UtilityLuisModelJsonAppManager.MergeAggregateLuisApplicationsOnPhraseLists(JsonAppObject mergedLuisModelInJson, String luisModelInJsonTextAndOtherSourceSetting, ISet`1 nonInterchangeableFeatures, IList`1 interchangeableFeatureSets), luisModelInJsonString="{
  "luis_schema_version": "3.0.0",
  "versionId": "0.1",
  "name": "Spain",
  "desc": "Facts about Spain",
  "culture": "en-us",
  "intents": [
    {
      "name": "None"
    },
    {
      "name": "ShowCapital"
    },
    {
      "name": "ShowLocation"
    }
  ],
  "entities": [],
  "composites": [],
  "closedLists": [],
  "patternAnyEntities": [],
  "regex_entities": [],
  "prebuiltEntities": [],
  "model_features": [],
  "regex_features": [],
  "patterns": [],
  "utterances": [
    {
      "text": "the main city",
      "intent": "ShowCapital",
      "entities": []
    },
    {
      "text": "what is the capital",
      "intent": "ShowCapital",
      "entities": []
    },
    {
      "text": "where does the government sit",
      "intent": "ShowCapital",
      "entities": []
    },
    {
      "text": "where is andalusia",
      "intent": "ShowLocation",
      "entities": []
    },
    {
      "text": "where is barcelona",
      "intent": "ShowLocation",
      "entities": []
    },
    {
      "text": "where is basque country",
      "intent": "ShowLocation",
      "entities": []
    },
    {
      "text": "where is galicia",
      "intent": "ShowLocation",
      "entities": []
    },
    {
      "text": "where is prime minister",
      "intent": "ShowCapital",
      "entities": []
    }
  ]
}
      "intent": "OrderHotel",
      "entities": []
    }
  ]
}"

ERROR
Additional text encountered after finished reading JSON content: ". Path '', line 70, position 6.

------
CREATE
Usage: dispatch create [options]
Usage: dispatch create [.bot file]

Create/retrain and publish a LUIS application for dispatch

Options:

   -bot                    [Optional] Path to .bot file or bot services json file
   -dispatch               [Optional] Path to .dispatch file
   -hierarchical           [Optional] Default to true.  If false, existing intents from source LUIS model(s) will be available as the dispatch intents.    -dataFolder             [Optional] Working directory for the tool

luis export version followed by ludown refresh results in bad token error

Describe the bug
I created a .luisrc file that connects to my LUIS model. I ran luis export > export.json to get the LUIS json down on to my computer. I did this in PowerShell. Next, I tried running ludown refresh -i export.json, but that resulted in the error:

PS C:\dev\LUIS> ludown refresh -i .\export.json
Oops! Something went wrong.
SyntaxError: Unexpected token � in JSON at position 0 

To Reproduce
Steps to reproduce the behavior:

  1. Create .luisrc file as per docs.
  2. Run luis export version > export.json
  3. Run ludown refresh -i export.json
  4. See error

Thanks!

Emulator is silent when encountering malformed/incorrect transcript files

When opening a transcript file, if the file is either totally the wrong type or just perhaps slightly malformed it opens a new empty window and doesn't report it experienced issues parsing the transcript file or give any hints on how to resolve.

The nature of the chatdown CLI tool (piping) can quite easily lead to error information being piped to a file without the user realising then generating head-scratching downstream with an empty window in the Emulator.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Emulator (40.013-alpha)
  2. Click on File. Open Transcript File - choose any old file
  3. No error

Expected behavior
At the very least an error saying the file failed to read, ideally some help if it's actually a transcript file but something is missing but not critical.

malformedTranscriptFile.txt
invalidTranscriptFile.txt

Ludown hierarchical entity support

Is your feature request related to a problem? Please describe.
The ludown documentation states that hierarchical entities are not supported. That's too bad. :( Why?

Describe the solution you'd like
Maybe something like:

$ParentEntity:hierarchical
- child1
- child2
- child3

Describe alternatives you've considered
I treated each child entity as a simple entity so I can mark up my utterances with {ParentEntity::child1=value}. The entities were declared as follows:

$ParentEntity:simple
$ParentEntity::child1:simple
$ParentEntity::child2:simple
$ParentEntity::child3:simple

and then, after running ludown parse, I manually modify the entities array in the generated schema. Painful.

Thanks!
-s

can't install botdispatch

i've installed dotnet core and when i run command to install botdispatch it show error. It's look like botdispatch try to install dotnet-2.0.0 without sudo permission.

/usr/bin/dispatch -> /usr/lib/node_modules/botdispatch/bin/dispatch.js

[email protected] postinstall /usr/lib/node_modules/botdispatch
npm install -g dotnet-2.0.0

Unhandled rejection Error: EACCES: permission denied, open '/home/vjcspy/.npm/_cacache/tmp/3a1bd628'

┌──────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/vjcspy/.config │
└──────────────────────────────────────────────────────────┘
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: npm install -g dotnet-2.0.0
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/vjcspy/.npm/_logs/2018-05-10T08_38_24_043Z-debug.log

Please help. Thanks.

Dispatch QnA Maker issue

Describe the bug
I was confused by the documentation and how to use dispatch given QnA Maker's GA announcements. When I look at the documentation it looks that the subscription key looks like the old QnA Maker key. BUT, the dispatch tool seems to hit the v4.0 QnA Maker web services so I migrated my QnA KB and still no dice. When I run dispatch, I see this:

ERROR
One or more errors occurred. (The remote server returned an error: (401) Access Denied.)

Request url: https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/knowledgebases/{kb_id}/Test/qna
Response:
{"error":{"code":"Unspecified","message":"Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key."}}

I can confirm that the auth key is being populated from: https://www.qnamaker.ai/UserSettings as per docs. Not sure how to properly debug this one.

qnaMakerLegacy imports node-only libs making it unusable in web clients

Describe the bug
importing anything from lib/api/index.js results in numerous build errors when used with a web app because qnaLegacy.js contains the node-only library request-promise-native

To Reproduce
Steps to reproduce the behavior:

  1. Create a new web-based project with a basic webpack config
  2. import something from qnamaker. e.g. import {qna} from 'qnamaker'
  3. run webpack

Expected behavior
The build should succeed

Observed behavior
ERROR in C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\juwilaby\Documents\dev\BotFramework-Emulator\node_modules\request\lib'
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/lib/har.js 3:9-22
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/request.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/index.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request-promise-native/lib/rp.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/qnaLegacy.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/index.js
@ ./src/QnAMaker/Client.ts
@ ./src/App.tsx
@ ./src/index.tsx

ERROR in C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/forever-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\juwilaby\Documents\dev\BotFramework-Emulator\node_modules\forever-agent'
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/forever-agent/index.js 6:10-24
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/request.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/index.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request-promise-native/lib/rp.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/qnaLegacy.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/index.js
@ ./src/QnAMaker/Client.ts
@ ./src/App.tsx
@ ./src/index.tsx

ERROR in C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/tough-cookie/lib/cookie.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\juwilaby\Documents\dev\BotFramework-Emulator\node_modules\tough-cookie\lib'
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/tough-cookie/lib/cookie.js 32:10-24
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request-promise-native/lib/rp.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/qnaLegacy.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/index.js
@ ./src/QnAMaker/Client.ts
@ ./src/App.tsx
@ ./src/index.tsx

ERROR in C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/tunnel-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\juwilaby\Documents\dev\BotFramework-Emulator\node_modules\tunnel-agent'
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/tunnel-agent/index.js 3:10-24
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/lib/tunnel.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/request.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/index.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request-promise-native/lib/rp.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/qnaLegacy.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/index.js
@ ./src/QnAMaker/Client.ts
@ ./src/App.tsx
@ ./src/index.tsx

ERROR in C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/forever-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\juwilaby\Documents\dev\BotFramework-Emulator\node_modules\forever-agent'
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/forever-agent/index.js 7:10-24
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/request.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/index.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request-promise-native/lib/rp.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/qnaLegacy.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/index.js
@ ./src/QnAMaker/Client.ts
@ ./src/App.tsx
@ ./src/index.tsx

ERROR in C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/tunnel-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\juwilaby\Documents\dev\BotFramework-Emulator\node_modules\tunnel-agent'
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/tunnel-agent/index.js 4:10-24
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/lib/tunnel.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/request.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request/index.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/request-promise-native/lib/rp.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/qnaLegacy.js
@ C:/Users/juwilaby/Documents/dev/BotFramework-Emulator/node_modules/qnamaker/lib/api/index.js
@ ./src/QnAMaker/Client.ts
@ ./src/App.tsx
@ ./src/index.tsx

az bot webchat show throws ResourceNotFound

Describe the bug
Running az bot webchat show throws ResourceNotFound. However this behavior is inconsistent. It works some times and throws error other times. However once it starts throwing error, it will continue to do it until I recreate bot service.

To Reproduce
Steps to reproduce the behavior:
az bot webchat show

Expected behavior
Should show webchat resource

Screenshots
image

Hero card syntax for chatdown

Documentation suggests that non-adaptive cards can be used as attachments in chatdown transcripts. There is no syntax examples though. If we follow the Adaptive Card syntax example of:

[Attachment=folder/sample.json "adaptivecard"]

or:

[Attachment=folder/sample.json adaptivecard]

Since the chatdown docs show it both with and without quotation marks.

Should we assume that creating a hero card is as simple as:

[Attachment=PATH_TO_IMAGE_FOR_HERO_CARD hero]

... or is chatdown and the Bot Emulator expecting some sort of JSON representation of the hero card? The first does not work. If it is the second, where can I find example syntax?

"Dispatch add" command containing a typo gets no error message.

The command:
dispatch add type luis -name v-brhale-luisapp -id 046b01bd-1de4-4a14-a0a4-0d828c749755

The error in the above command: "type" parameter is missing the hyphen ("-").

Actual behavior:
Displayed no message, returned to the command prompt.

Expected behavior:
An error message would be displayed, like "Argument 'type' not recognized."

Luis delete Unexpected end of JSON input

This is a false negative. When I populated my .luisrc file completely and run luis delete version, I receive the error:
FetchError: invalid json response body at https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/{appid}/versions/0.1/ reason: Unexpected end of JSON input
In fact, the version has been deleted so the command executed correctly.

Utterances with multiple entities confusing ludown

I have a few utterances that have multiple entities. When the ludown is generated from the exported JSON file, I get entries like:
- get item for {ValueI{IdItem=te}m=value} with id idvalue
instead of
- get item for {ValueItem=value} with id {IdItem=idvalue}

Seems like ludown might be using the entity startPos/endPos values and not changing them to reflect added text. Or something else. But it renders ludown unusable in those scenarios.

Thanks!
-s

Authoring key not working uploading models to LUIS

Describe the bug
Something is not right about the API calls to LUIS/authoring keys. I am trying to use the LUIS command to upload my LUIS model but keep getting errors with the authoring keys; either via .luisrc or --authoringKey parameter

To Reproduce
Steps to reproduce the behavior:

jameslew@DESKTOP-KLEMGA8:~/repos/diabot$ cat .luisrc
{
"authoringKey": "{myAuthoringKey}",
"endpointBasePath": "https://westus2.api.cognitive.microsoft.com/luis/api/v2.0"
}
jameslew@DESKTOP-KLEMGA8:~/repos/diabot$ luis add application --in ./inquiry.json
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}jameslew@DESKTOP-KLEMGA8:~/repos/diabot$ luis add application --in ./inquiry.json --authoringKey {myAuthoringKey}{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."

Expected behavior
Model to be created

Desktop (please complete the following information):

  • OS: Ubuntu 18.04

[Azure CLI] Missing --calling-web-hook argument for Skype registration is unhelpful

Information:

  • Tools Libraries: Azure CLI
  • Libraries' Versions:
  • OS: Windows 10

Issue Description:

When not providing a --calling-web-hook argument while setting --enable-calling to true causes an unhelpful Python trace message to be provided.

Commands Example:

az bot skype create -n "<bot-name>" --enable-calling true

Expected Behavior:

More helpful error to be provided, and the Azure CLI tool to capture a missing argument when --enable-calling is true before trying to create the new channel registration.

Actual Results:

skype create enable calling

Dispatch handling of the None intent in component LUIS apps

This is more of a question I was hoping the dispatch team could address. I am breaking down a LUIS app into various constituent parts. During Build, the LUIS team emphasized then importance of populating the None intent in LUIS to tell the model what it can't handle. I used the same utterances in the different apps, and dispatch came back with a report indicting the utterances are duplicated among the applications.

Now I am curious how dispatch handles the None intent. Say I have LUIS apps A and B and an Utterance X. Say X is in the None intent in A and in another intent in B. How does dispatch handle such scenarios? Shouldn't the None intent be treated differently than other as it pertains to routing across LUIS models?

LUIS as node app doesn't find LUIS config settings

Information:

  • Tools Libraries: LUIS (luis apis as npm installed package called from typescript compiled file
  • Libraries' Versions: 1.0.26
  • OS: Win 10
  • Node: v8.9.1
  • Library installed from NPM

Issue Description:

Created typescript file that compiles and runs:
several issues:

  1. global fetch isn't found when run from node index.js. Worked when I added fetch to \lib\api\serviceBase.js
  2. LUIS config settings are not found if using just from node (not command line). I tried a .luisrc as well as environment variables.
  3. is npm test supposed to work with the .luisrc file? I added one but the tests are failing.

Commands Example:

Reproduction Steps:

  1. started with readme for ./LUIS
  2. created .luisrc as well as environment variables
  3. LUIS config settings are empty by the time fetch is called but I stepped through and it isn't calling the code that looks for env variables

As a side: I was going to submit a PR as a sample to get the npm project running.

Expected Behavior:

Actual Results:

[MSBot] Connect to luis. Error: bad or missing --subscriptionKey

Not sure why it requires subscription key in addition to authoring key and app id.
Subscription key is not mentioned in readme and in the example.
Using authoring key as subscription key didn’t work as well, the error “Error: bad or missing –subscriptionKey”

[Dispatch/All Tools] Passing in Arguments should be the same across tools

Per the README.md in Dispatch/ users are expected to pass in arguments using one "-", e.g.:

dispatch init -name SomeName

However in LUIS/ the README specifies that users use "--" when passing in configuration arguments and overrides:

luis list applications --authoringKey luisAuthoringKey

This formatting extends to QnAMaker, and other tools, except some tools like MSBot/ also include shortcuts ("-") like so:

msbot connect localhost -a appId -p appPassword -e endpointUrl

is the same as

msbot connect localhost --appId appId -appPassword appPassword --endpoint endpointUrl

This formatting should be the same so users don't need to remember multiple ways to pass in cli arguments.

az bot directline does not have doc for "show"

az bot directline -h

Group
az bot directline: Manage Directline Channel on a Bot.

Commands:
create: Create DirectLine Channel on a Bot.
delete: Delete Directline Channel on a Bot.
show

msbot: can’t add luis connection

Adding luis connection:
msbot connect luis --secret EncryptItPlease --name "My Luis Model" --appId “id" --version v0.1 --authoringKey “key"

No errors, but 'msbot list’ doesn’t list this connection (see screenshot)

screen shot 2018-04-04 at 1 41 46 pm

[Dispatch] Needs more informative error messages

@vishwacsena, @justinwilaby

When attempting to use the dispatch tools to create a new application I received either one or two 404s. The output doesn't make it clear if two requests or only one request failed. Additionally, it's not clear which specific requests failed, so I don't know if something failed when trying to use LUIS or when trying to use QnAMaker.

dispatch_errors

[AzureCLI]No result after running the 'az bot create ..' command

Information:

  • Tools Libraries:
  • Libraries' Versions:
  • OS:

Issue Description:

No result after running the 'az bot create ..' command

Commands Example:

az bot create

Reproduction Steps:

  1. Run 'az bot create ...' command
  2. After following the step (paste the magic code to browser), the command line doesn't have a result of whether the operation succeeded or not

Expected Behavior:

There should be a result of the command.

Actual Results:

There isn't any result indicating the command succeeded or not.

[Azure CLI] az bot delete - failed to delete Bot

Information:

  • Tools Libraries: az bot CLI
  • Libraries' Versions: AZ tools download link per Bugbash email.
  • OS: Windows 10, Powershell

Issue Description:

When attempting to delete the bot through the CLI, I received a very long error message and the bot failed to be deleted.

Creating and deleting channels such as email appeared to work fine.

Commands Example:

This assumes the subscription/resource group was set as a default
PS C:\Users(username)> az bot delete --name BOTNAME

Reproduction Steps:

  1. Enter the command to delete the bot via Azure tools CLI.

Expected Behavior:

az tools CLI would complete the bot deletion, and then return to the Powershell prompt, likely without any status message (other successful completions returned to the prompt with no message).

Actual Results:

Was handed this error in Powershell. Copied/Pasted here as the error ran longer than my Powershell window, and also the error's red text on blue background is indiscernible.

PS C:\Users\v-jonru> az bot delete
az bot delete: error: the following arguments are required: --name/-n
usage: az bot delete [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv}] [--query JMESPATH]
[--resource-group RESOURCE_GROUP_NAME] --name NAME
PS C:\Users\v-jonru> az bot delete --name v-jonru-nodebot-bugbash
Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/0389857f-2464-451b-ac83-5f54d565b1a7/resourceGroups/v-jonru/providers/Microsoft.BotService/botServices/v-jonru-nodebot-bugbash/channels/DirectLineChannel?api-version=2017-12-01 (Caused by ResponseError('too many 500 error responses',))
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\urllib3\connectionpool.py", line 732, in urlopen
body_pos=body_pos, **response_kw)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\urllib3\connectionpool.py", line 732, in urlopen
body_pos=body_pos, **response_kw)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\urllib3\connectionpool.py", line 732, in urlopen
body_pos=body_pos, **response_kw)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\urllib3\connectionpool.py", line 712, in urlopen
retries = retries.increment(method, url, response=response, _pool=self)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/0389857f-2464-451b-ac83-5f54d565b1a7/resourceGroups/v-jonru/providers/Microsoft.BotService/botServices/v-jonru-nodebot-bugbash/channels/DirectLineChannel?api-version=2017-12-01 (Caused by ResponseError('too many 500 error responses',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\msrest\service_client.py", line 205, in send
**kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\adapters.py", line 499, in send
raise RetryError(e, request=request)
requests.exceptions.RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/0389857f-2464-451b-ac83-5f54d565b1a7/resourceGroups/v-jonru/providers/Microsoft.BotService/botServices/v-jonru-nodebot-bugbash/channels/DirectLineChannel?api-version=2017-12-01 (Caused by ResponseError('too many 500 error responses',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\knack\cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands_init_.py", line 347, in execute
six.reraise(*sys.exc_info())
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\six.py", line 693, in reraise
raise value
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands_init_.py", line 319, in execute
result = cmd(params)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands_init_.py", line 180, in call
return super(AzCliCommand, self).call(*args, **kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\knack\commands.py", line 109, in call
return self.handler(*args, **kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core_init_.py", line 420, in default_command_handler
result = op(**command_args)
File "C:\Users\v-jonru.azure\cliextensions\botservice\azext_bot\custom.py", line 119, in delete_bot
channel_name=channelName
File "C:\Users\v-jonru.azure\cliextensions\botservice\azext_bot\botservice\operations\channels_operations.py", line 250, in delete
response = self._client.send(request, header_parameters, **operation_config)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\msrest\service_client.py", line 231, in send
raise_with_traceback(ClientRequestError, msg, err)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\msrest\exceptions.py", line 45, in raise_with_traceback
raise error.with_traceback(exc_traceback)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\msrest\service_client.py", line 205, in send
**kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\requests\adapters.py", line 499, in send
raise RetryError(e, request=request)
msrest.exceptions.ClientRequestError: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/0389857f-2464-451b-ac83-5f54d565b1a7/resourceGroups/v-jonru/providers/Microsoft.BotService/botServices/v-jonru-nodebot-bugbash/channels/DirectLineChannel?api-version=2017-12-01 (Caused by ResponseError('too many 500 error responses',))
PS C:\Users\v-jonru> az bot delete --name v-jonru-nodebot-bugbash

rename luis update version command to luis rename version

I have created a new LUIS json by using ludown parse over a .lu file. The json looks fine. I tried updating a version by using luis update version, but I get the error:
FetchError: invalid json response body at https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/a6159065-068f-465a-b69e-bc781891237f/versions/0.1/ reason: Unexpected end of JSON input

It is unclear what may be happening. Any thoughts on debugging?

ChatDown [Typing] not recognized when compiling .transcript

When attempting to compile .transcript file from BookTable-happyPath.chat in the Chatdown/Examples folder, CLI outputs this error:

skipping unknown tag [Typing]

Similarly produces the same error when manually trying to use the [Typing] tag elsewhere.

AZ CLI publish: publish fails if solution is open in VS

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Have a bot you want to publish open in VS
  2. Try az bot publish

Expected behavior
Publish should succeed

Screenshots

untitled

az bot download doesn't seem to work for functions

Information:

  • Tools Libraries: az
  • Libraries' Versions:
  • OS: ubuntu 16.04 on Windows

Issue Description:

Attempting to download my newly created functions bot and running into an error that the bot-src.zip doesn't exist.

Commands Example:

jameslew@JAMESLEW1:/mnt/c/repos$ az bot download --save-path /mnt/c/repos/azbottest --resource-group azbottest --name csharpfunctionbot
Zip Download failed with status code 404 and reason {"Message":"'D:\home\site\bot-src.zip' not found."}

Reproduction Steps:

Expected Behavior:

My bot to download

Actual Results:

it didn't download.

Multiple instances of entity still breaks ludown

Describe the bug
Bug #187 has been marked as fixed but when I run 1.0.25 I now see a different, arguably worse, issue.

Thanks!
-s

Input

{
  "luis_schema_version": "3.0.0",
  "versionId": "0.1",
  "name": "Repro",
  "desc": "",
  "culture": "en-us",
  "intents": [
    {
      "name": "None"
    },
    {
      "name": "TestIntent"
    }
  ],
  "entities": [
    {
      "name": "EntityOne",
      "roles": []
    },
    {
      "name": "EntityTwo",
      "roles": []
    }
  ],
  "composites": [],
  "closedLists": [],
  "patternAnyEntities": [],
  "regex_entities": [],
  "prebuiltEntities": [],
  "model_features": [],
  "regex_features": [],
  "patterns": [],
  "utterances": [
    {
      "text": "this is a one and a two and a one again",
      "intent": "TestIntent",
      "entities": [
        {
          "entity": "EntityOne",
          "startPos": 30,
          "endPos": 32
        },
        {
          "entity": "EntityTwo",
          "startPos": 20,
          "endPos": 22
        },
        {
          "entity": "EntityOne",
          "startPos": 10,
          "endPos": 12
        }
      ]
    }
  ]
}

Output

> ! Automatically generated by [LUDown CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/Ludown), Wed May 16 2018 06:26:28 GMT-0400 (Eastern Daylight Time)

> ! Source LUIS JSON file: .\repro3.json

> ! Source QnA TSV file: Not Specified


> # Intent definitions

## None


## TestIntent
- this is a one and a two and a {E{E{EntityOne=one}tyTwo=two}tyOne=one} again


> # Entity definitions

$EntityOne:simple

$EntityTwo:simple


> # PREBUILT Entity definitions


> # Phrase list definitions


> # List entities


Multiple instances of one type breaks ludown

Describe the bug
If I have an utterance with multiple instances of an entity type, ludown produces funny looking output.

Input JSON

{
  "luis_schema_version": "3.0.0",
  "versionId": "0.1",
  "name": "Repro",
  "desc": "",
  "culture": "en-us",
  "intents": [
    {
      "name": "None"
    },
    {
      "name": "TestIntent"
    }
  ],
  "entities": [
    {
      "name": "EntityOne",
      "roles": []
    },
    {
      "name": "EntityTwo",
      "roles": []
    }
  ],
  "composites": [],
  "closedLists": [],
  "patternAnyEntities": [],
  "regex_entities": [],
  "prebuiltEntities": [],
  "model_features": [],
  "regex_features": [],
  "patterns": [],
  "utterances": [
    {
      "text": "this is a one and a two and a one again",
      "intent": "TestIntent",
      "entities": [
        {
          "entity": "EntityOne",
          "startPos": 10,
          "endPos": 12
        },
        {
          "entity": "EntityTwo",
          "startPos": 20,
          "endPos": 22
        },
        {
          "entity": "EntityOne",
          "startPos": 30,
          "endPos": 32
        }
      ]
    }
  ]
}


ludown output

> ! Automatically generated by [LUDown CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/Ludown), Tue May 15 2018 15:22:40 GMT-0400 (Eastern Daylight Time)

> ! Source LUIS JSON file: .\export.json

> ! Source QnA TSV file: Not Specified


> # Intent definitions

## None


## TestIntent
- this is a {EntityOne={EntityOne=one}} and a {EntityTwo=two} and a one again


> # Entity definitions

$EntityOne:simple

$EntityTwo:simple


> # PREBUILT Entity definitions


> # Phrase list definitions


> # List entities

More Information
If I fix the ludown manually and run ludown to parse into LUIS json, it has the same problem.

Input

> ! Automatically generated by [LUDown CLI](https://github.com/Microsoft/botbuilder-tools/tree/master/Ludown), Tue May 15 2018 15:22:40 GMT-0400 (Eastern Daylight Time)

> ! Source LUIS JSON file: .\export.json

> ! Source QnA TSV file: Not Specified


> # Intent definitions

## None


## TestIntent
- this is a {EntityOne=one} and a {EntityTwo=two} and a {EntityOne=one} again


> # Entity definitions

$EntityOne:simple

$EntityTwo:simple


> # PREBUILT Entity definitions


> # Phrase list definitions


> # List entities


Output

{
  "intents": [
    {
      "name": "None"
    },
    {
      "name": "TestIntent"
    }
  ],
  "entities": [
    {
      "name": "EntityOne",
      "roles": []
    },
    {
      "name": "EntityTwo",
      "roles": []
    }
  ],
  "composites": [],
  "closedLists": [],
  "regex_entities": [],
  "model_features": [],
  "regex_features": [],
  "utterances": [
    {
      "text": "this is a one and a two and a one again",
      "intent": "TestIntent",
      "entities": [
        {
          "entity": "EntityOne",
          "startPos": 10,
          "endPos": 12
        },
        {
          "entity": "EntityTwo",
          "startPos": 20,
          "endPos": 22
        },
        {
          "entity": "EntityOne",
          "startPos": 10,
          "endPos": 12
        }
      ]
    }
  ],
  "patterns": [],
  "patternAnyEntities": [],
  "prebuiltEntities": [],
  "luis_schema_version": "3.0.0",
  "versionId": "0.1",
  "name": "export2",
  "desc": "",
  "culture": "en-us"
}

Thanks!
-s

Can't create bot registration

Describe the bug
I got an error when I try to create a bot registration:
Unable to provision appid and password for supplied credentials
To Reproduce
Steps to reproduce the behavior:

  1. az bot create --resource-group "justtest" --kind "registration" --description "description-of-my-bot" --name "botjustfotest2" -e http://localhost

Expected behavior
Create the bot

Additional context
I added some prints to the code to see the returned error and I got a 500 error with the following reason:
{"Error":{"Code":"ServiceError","Message":"Cannot create a v2 converged app."}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.