4.13 Bot Framework CLI Tools
April 2021 (version 4.13.0)
Welcome to the April 2021 release of the Bot Framework SDK.
SDK [release notes]
This release addresses several bug fixes and adds a new command group with the following commands:
Commands
bf orchestrator
bf orchestrator:add
bf orchestrator:basemodel:get
bf orchestrator:basemodel:list
bf orchestrator:build
bf orchestrator:create
bf orchestrator:interactive
bf orchestrator:query
bf orchestrator:test
bf orchestrator
Display Orchestrator CLI available commands
USAGE
$ bf orchestrator
OPTIONS
-h, --help Orchestrator commands help
See code: src/commands/orchestrator/index.ts
bf orchestrator:add
Add examples from .lu/.qna/.json/.blu files, LUIS app(s) and QnaMaker kb(s) to Orchestrator snapshot file.
USAGE
$ bf orchestrator:add
OPTIONS
-d, --debug
-e, --entityModel=entityModel Path to Orchestrator entity base model directory.
-f, --force If --out flag is provided with the path to an existing file, overwrites that file.
-h, --help Orchestrator add command help
-i, --in=in Path to example file (.lu/.qna/.json/.blu).
-k, --key=key LUIS authoring key or QnAMaker service key if type = luis/qna.
-m, --model=model Path to Orchestrator model directory.
-o, --out=out Path where generated Orchestrator example file will be placed. Default to current
working directory.
-t, --type=type Type of input (luis/qna/file).
-v, --version=version Applies only for type=luis, LUIS app version
--dialog Generate multi language or cross train Orchestrator recognizers.
--endpoint=endpoint LUIS/QnAMaker endpoint.
--id=id LUIS app id or QnAMaker kb id if type = luis/qna.
--routingName=routingName Routing name, default to file name.
EXAMPLE
$ bf orchestrator:add
$ bf orchestrator:add --in ./path/to/file/ --snapshot ./path/to/snapshot/
$ bf orchestrator:add --in ./path/to/file/ --snapshot ./path/to/snapshot/ --out ./path/to/output/
$ bf orchestrator:add --in ./path/to/file/ --out ./path/to/output/ --model ./path/to/model/directory
$ bf orchestrator:add -t luis --id LUIS_APP_ID --version LUIS_APP_VERSION --key LUIS_KEY --routingname l_Weather
--endpoint
$ bf orchestrator:add -t qna --id QNA_KB --key QNA_KB_SERVICE_KEY --routingname q_kb
See code: src/commands/orchestrator/add.ts
bf orchestrator:basemodel:get
Gets Orchestrator base model
USAGE
$ bf orchestrator:basemodel:get
OPTIONS
-d, --debug
-h, --help Orchestrator basemodel:get command help
-o, --out=out Optional. Path to where Orchestrator base model will be saved to. Default to current working
directory.
-v, --verbose Enable verbose logging
--getEntity Optional. Download default entity model at the same time, which will be placed in the entity
subfolder of the output path.
--versionId=versionId Optional. Base model version to download -- reference basemodel:list output for options. If
not specified, default model will be downloaded.
See code: src/commands/orchestrator/basemodel/get.ts
bf orchestrator:basemodel:list
Lists all Orchestrator base model versions
USAGE
$ bf orchestrator:basemodel:list
OPTIONS
-h, --help Orchestrator basemodel:list command help
-r, --raw Optional. Raw output
--all Optional. Display all models
See code: src/commands/orchestrator/basemodel/list.ts
bf orchestrator:build
Creates Orchestrator snapshot file and Orchestrator dialog definition file (optional) for each lu file in input folder.
USAGE
$ bf orchestrator:build
OPTIONS
-d, --debug
-e, --entityModel=entityModel Path to Orchestrator entity base model directory.
-h, --help Orchestrator build command help
-i, --in=in Path to lu file or folder with lu files.
-m, --model=model Path to Orchestrator model.
-o, --out=out Path where Orchestrator snapshot/dialog file(s) will be placed. Default to current
working directory.
--dialog Generate multi language or cross train Orchestrator recognizers.
--luconfig=luconfig Path to luconfig.json.
See code: src/commands/orchestrator/build.ts
bf orchestrator:create
Create orchestrator snapshot (.blu) file from .lu/.qna/.json/.tsv/.dispatch files, which represent bot modules
USAGE
$ bf orchestrator:create
OPTIONS
-d, --debug
-e, --entityModel=entityModel Path to Orchestrator entity base model directory.
-h, --help Orchestrator create command help
-i, --in=in The path to source label files from where orchestrator example file will be created
from. Default to current working directory.
-m, --model=model Path to Orchestrator base model directory.
-o, --out=out Path where generated Orchestrator snapshot file will be placed. Default to current
working directory.
--hierarchical Add hierarchical labels based on .lu/.qna file name. Resulting snapshot file will
contain.lu/.qna file name as labels instead of the intents defined in the .lu file(s).
--refresh Refetch LUIS app(s)/QnAMaker kb(s) previously added and recreate Orchestrator snapshot.
See code: src/commands/orchestrator/create.ts
bf orchestrator:interactive
Real-time interaction with Orchestrator model and analysis. Can return score of given utterance using previously created orchestrator examples
USAGE
$ bf orchestrator:interactive
OPTIONS
-d, --debug
-e, --entityModel=entityModel Path to Orchestrator entity base model directory.
-h, --help show CLI help
-l, --in=in Optional path to a previously created Orchestrator .blu file.
-m, --model=model (required) Directory or hosting Orchestrator config and base model files.
-o, --out=out Optional Directory where analysis and output files will be placed.
EXAMPLE
$ bf orchestrator:interactive --in=./path/to/snapshot/file --out=./path/to/output/folder/
--model=./path/to/model/directory
See code: src/commands/orchestrator/interactive.ts
bf orchestrator:query
Query Orchestrator base model and a snapshot/train file
USAGE
$ bf orchestrator:query
OPTIONS
-d, --debug
-e, --entityModel=entityModel Path to Orchestrator entity base model directory.
-h, --help show CLI help
-i, --in=in (required) Path to a previously created Orchestrator snapshot (.blu file).
-l, --limit=limit (optional) Limit of number of predictions. Default to 3. Less or equal to 0 for listing
all predictions.
-m, --model=model (required) Path to Orchestrator base model directory.
-q, --query=query (required) Query string to predict.
EXAMPLE
$ bf orchestrator:query --in=./path/to/snapshot/file --query=hi --model=./path/to/base/model/directory
See code: src/commands/orchestrator/query.ts
bf orchestrator:test
The "test" command can operate in three modes: test, evaluation, assessment.
USAGE
$ bf orchestrator:test
OPTIONS
-d, --debug
-e, --entityModel=entityModel Path to Orchestrator entity base model directory.
-h, --help show CLI help
-i, --in=in (required) Path to a previously created Orchestrator .blu file.
-m, --model=model Optional directory for hosting Orchestrator config and base model files, not needed for
the "assessment" mode.
-o, --out=out (required) Directory where analysis and output files will be placed.
-p, --prediction=prediction Optional path to a prediction label file, or comma-separated paths to a collection of
(e.g., crosss-valiaton) files.
-t, --test=test Optional path to a test file. This option enable the "test" mode.
DESCRIPTION
1) Test mode: test a collection of utterance/label samples loaded from a test file against
a previously generated Orchestrator .blu snapshot/train file,
and create a detailed train/test evaluation report.
2) Evaluation mode: create an leave-one-out cross validation (LOOCV) evaluation report
on a previously generated Orchestrator .blu snapshot/train file.
3) Assessment mode: assess a collection of utterance/label predictions against their ground-truth labels and
create an evaluation report. This mode can evaluate predictions produced by
other NLP or machine learning systems. There is no need for an Orchestrator base model.
Notice that, this mode is generic and can apply to evaluate any ML systems, learners, models,
and scenarios if a user can carefully construct the prediction and grounf-truth files by
the specification detailed below.
Essentially the key to a NLP data instance is a text (utterance, sentence, query, document, etc.), which
is the basis of all the features feeding to a ML model. For other ML systems, the key to
a data instance can be built directly from the features and put in place of text
in a prediction and ground-truth file.
The 'test' mode is activated if there is a '--test' argument set for a test file.
The 'assessment' mode is activated if there is a '--prediction' argument set for a prediction file.
If there is no '--test' or '--prediction' arguments, then "test" command runs on the 'evaluation' mode.
EXAMPLE
$ bf orchestrator:test --in=./path/to/snapshot/file --test=./path/to/test/file/ --out=./path/to/output/
--model=./path/to/model/directory
$ bf orchestrator:test --in=./path/to/ground-truth/file --prediction=./path/to/prediction/file
--out=./path/to/output/folder/
$ bf orchestrator:test --in=./path/to/snapshot/file --out=./path/to/output/folder/
[--model=./path/to/model/directory]
See code: src/commands/orchestrator/test.ts
Commands added under existing command groups are:
bf lg:analyze
Analyze templates in .lg files to show all the places where a template is used
USAGE
$ bf lg:analyze
OPTIONS
-f, --force If --out flag is provided with the path to an existing file, overwrites that file
-h, --help lg:analyze help
-i, --in=in (required) LG File or folder that contains .lg file(s)
-o, --out=out Output file or folder name. If not specified stdout will be used as output
-r, --recurse Consider sub-folders to find .lg file(s)
See code: src/commands/lg/analyze.ts
bf plugins:link PLUGIN
Links a plugin into the BF CLI for development
USAGE
$ bf plugins:link PLUGIN
ARGUMENTS
PATH [default: .] path to plugin
OPTIONS
-h, --help show CLI help
-v, --verbose
DESCRIPTION
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
See code: src/commands/plugins/link.ts
bf config:remove
Removes the specified key from the config file
USAGE
$ bf config:remove
OPTIONS
-h, --help config:remove help
-k, --key=key (required) Name of the key to remove
See code: src/commands/config/remove.ts
Change log for CLI 4.13.0
- Set node engine dependency [PR 1173]
- Updating docs [PR 1172]
- beta->main merge [PR 1165]
- Fix bug with npm scoped packages [PR 1170]
- Add new cli for bf lg:analyze [PR 1151]
- Fixes #1149 [PR 1162]
- Adding plugins:link command to improve the contribution experience [PR 1169]
- Adding arm token to config file and reading from it if present [PR 1168]
- Add options to support doing luis and qna cross-train seperately [PR 1161]
- Fix prebuilt entity name comparison to be case-insensitive [PR 1163]
- Adding command config:remove [PR 1160]
- Adding fix for translation commands [PR 1150]
- Adding validation to only show upgrade message when checking for version [PR 1159]
- bf luis:build support to republish luis app if users specify a new publishing mode [PR 1145]
- Enable escaping square brackets and parenthesis to avoid being recognized as pattern [PR 1142]
- fix some corner case of prebuild entities in luis:test cli [PR 1148]
- Setting exit code to 1 on error [PR 1156]
- Fix lu converter to handle required feature at top level and whitespaces at child entity name correctly [PR 1139]
- Fix max features numbers validation issue [PR 1131]
- fix phraselist merging bug [PR 1133]
- Fix bug where luis:convert would incorrectly generate an error message [PR 1129]
- Add support for verifying $policies. [PR 1126]
- fix import bug [PR 1124]