Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 46 additions & 38 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,28 +736,27 @@ USAGE
$ bf luis:build

OPTIONS
-f, --force If --dialog flag is provided, overwrites relevant dialog file
-h, --help show CLI help
-f, --force If --out flag is provided with the path to an existing file, overwrites that file
-h, --help luis:build command help
-i, --in=in Lu file or folder

-o, --out=out Output file or folder name. If not specified, current directory will be used as
output

-o, --out=out Output folder name to write out .dialog and settings files. If not specified, application
setting will be output to console
--authoringKey=authoringKey LUIS authoring key

--botName=botName Bot name

--defaultCulture=defaultCulture Culture code for the content. Infer from .lu if available. Defaults to en-us

--deleteOldVersion Delete old version of LUIS application after building new one.
--deleteOldVersion Deletes old version of LUIS application after building new one.

--dialog=dialog [default: multiLanguage] Write out .dialog files whose recognizer type
[multiLanguage|crosstrained] is specified by --dialog
--dialog=dialog [default: multiLanguage] Dialog recognizer type [multiLanguage|crosstrained]

--fallbackLocale=fallbackLocale Locale to be used at the fallback if no locale specific recognizer is found. Only
valid if --dialog is set
valid if --out is set

--log write out log messages to console
--log Writes out log messages to console

--luConfig=luConfig Path to config for lu build which can contain switches for arguments

Expand All @@ -766,10 +765,15 @@ OPTIONS
--suffix=suffix Environment name as a suffix identifier to include in LUIS app name. Defaults to
current logged in user alias

--endpoint Luis authoring endpoint for publishing

--schema=schema Defines $schema for generated .dialog files

--isStaging Publishes luis application to staging slot if set. Default to production slot

EXAMPLE

$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME} --dialog
multiLanguage
$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME}
```

_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/build.ts)_
Expand Down Expand Up @@ -808,20 +812,20 @@ USAGE
$ bf luis:cross-train

OPTIONS
-h, --help luis:cross-train help
-i, --in=in source lu and qna files folder
-f, --force [default: false] If --out flag is provided with the path to an existing file, overwrites that file
-h, --help luis:cross-train command help
-i, --in=in Source lu and qna files folder

-o, --out=out output folder name. If not specified, the cross trained files will be wrote to cross-trained
-o, --out=out Output folder name. If not specified, the cross trained files will be wrote to cross-trained
folder under folder of current command

--config=config path to config file of mapping rules which is relative to folder specified by --in. If not
specified, it will read default config.json from the folder specified by --in
--config=config Path to config file of mapping rules

--intentName=intentName [default: _Interruption] Interruption intent name

--rootDialog=rootDialog rootDialog file path which is relative to folder specified by --in. If --config not
specified, cross-trian will automatically construct the config from file system based on root
dialog file
--rootDialog=rootDialog Root dialog file path

--log [default: false] Writes out log messages to console
```

_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/cross-train.ts)_
Expand Down Expand Up @@ -1337,36 +1341,40 @@ USAGE

OPTIONS
-b, --botName=botName (required) Bot name
-f, --force If --dialog flag is provided, overwirtes relevant dialog file
-h, --help show CLI help
-f, --force [default: false] If --out flag is provided with the path to an existing file, overwrites that file
-h, --help qnamaker:build command help
-i, --in=in Source .qna file or folder

-o, --out=out Output file or folder name. If not specified, current directory will be used as
output
-o, --out=out Output folder name to write out .dialog and settings files. If not specified, knowledge base
setting will be output to console

-s, --subscriptionKey=subscriptionKey (required) QnA maker subscription key

--defaultCulture=defaultCulture Culture code for the content. Infer from .qna if available. Defaults to en-us
if not set

--dialog=dialog [default: multiLanguage] Write out .dialog files whose recognizer type
[multiLanguage|crosstrained] is specified by --dialog
--dialog=dialog [default: multiLanguage] Dialog recognizer type [multiLanguage|crosstrained]

--fallbackLocale=fallbackLocale Locale to be used at the fallback if no locale specific recognizer is found.
Only valid if --dialog is set
Only valid if --out is set

--log [default: false] Writes out log messages to console

--log write out log messages to console
--qnaConfig=qnaConfig Path to config for qnamaker build which can contain switches for arguments

--region=region [default: westus] Overrides public endpoint
https://<region>.api.cognitive.microsoft.com/qnamaker/v4.0/

--suffix=suffix Environment name as a suffix identifier to include in qnamaker kb name.
Defaults to current logged in user alias

--endpoint=endpoint Qnamaker authoring endpoint for publishing

--schema=schema Defines $schema for generated .dialog files

EXAMPLE

$ bf qnamaker:build --in {INPUT_FILE_OR_FOLDER} --subscriptionKey {SUBSCRIPTION_KEY} --botName {BOT_NAME}
--dialog
$ bf qnamaker:build --in {INPUT_FILE_OR_FOLDER} --subscriptionKey {SUBSCRIPTION_KEY} --botName {BOT_NAME}
```

_See code: [@microsoft/bf-qnamaker](https://github.com/microsoft/botframework-cli/tree/master/packages/qnamaker/src/commands/qnamaker/build.ts)_
Expand Down Expand Up @@ -1402,20 +1410,20 @@ USAGE
$ bf qnamaker:cross-train

OPTIONS
-h, --help luis:cross-train help
-i, --in=in source lu and qna files folder
-f, --force [default: false] If --out flag is provided with the path to an existing file, overwrites that file
-h, --help qnamaker:cross-train command help
-i, --in=in Source lu and qna files folder

-o, --out=out output folder name. If not specified, the cross trained files will be wrote to cross-trained
-o, --out=out Output folder name. If not specified, the cross trained files will be wrote to cross-trained
folder under folder of current command

--config=config path to config file of mapping rules which is relative to folder specified by --in. If not
specified, it will read default config.json from the folder specified by --in
--config=config Path to config file of mapping rules

--intentName=intentName [default: _Interruption] Interruption intent name

--rootDialog=rootDialog rootDialog file path which is relative to folder specified by --in. If --config not
specified, cross-trian will automatically construct the config from file system based on root
dialog file
--rootDialog=rootDialog Root dialog file path.

--log [default: false] Writes out log messages to console
```

_See code: [@microsoft/bf-qnamaker](https://github.com/microsoft/botframework-cli/tree/master/packages/qnamaker/src/commands/qnamaker/cross-train.ts)_
Expand Down
27 changes: 12 additions & 15 deletions packages/luis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,27 +339,27 @@ USAGE
$ bf luis:build

OPTIONS
-f, --force If --out flag is provided, overwrites relevant dialog file
-h, --help show CLI help
-f, --force If --out flag is provided with the path to an existing file, overwrites that file
-h, --help luis:build command help
-i, --in=in Lu file or folder

-o, --out=out Output folder name to write out .dialog files. If not specified, application
ids will be output to console
-o, --out=out Output folder name to write out .dialog and settings files. If not specified, application
setting will be output to console

--authoringKey=authoringKey LUIS authoring key

--botName=botName Bot name

--defaultCulture=defaultCulture Culture code for the content. Infer from .lu if available. Defaults to en-us

--deleteOldVersion Delete old version of LUIS application after building new one.
--deleteOldVersion Deletes old version of LUIS application after building new one.

--dialog=dialog [default: multiLanguage] Dialog recognizer type [multiLanguage|crosstrained]

--fallbackLocale=fallbackLocale Locale to be used at the fallback if no locale specific recognizer is found. Only
valid if --out is set

--log write out log messages to console
--log Writes out log messages to console

--luConfig=luConfig Path to config for lu build which can contain switches for arguments

Expand All @@ -372,12 +372,11 @@ OPTIONS

--schema=schema Defines $schema for generated .dialog files

--isStaging Publish luis application to staging slot if set. Default to production slot
--isStaging Publishes luis application to staging slot if set. Default to production slot

EXAMPLE

$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME} --dialog
multiLanguage
$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME}
```

_See code: [src/commands/luis/build.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/build.ts)_
Expand Down Expand Up @@ -416,7 +415,8 @@ USAGE
$ bf luis:cross-train

OPTIONS
-h, --help Luis:cross-train help
-f, --force [default: false] If --out flag is provided with the path to an existing file, overwrites that file
-h, --help Luis:cross-train command help
-i, --in=in Source lu and qna files folder

-o, --out=out Output folder name. If not specified, the cross trained files will be written to cross-trained
Expand All @@ -426,12 +426,9 @@ OPTIONS

--intentName=intentName [default: _Interruption] Interruption intent name

--rootDialog=rootDialog RootDialog file path. If --config not specified,
cross-trian will automatically construct the config from file system based on root dialog file

-f, --force [default: false] If --out flag is provided with the path to an existing file, overwrites that file
--rootDialog=rootDialog Root dialog file path

--log [default: false] Write out log messages to console
--log [default: false] Writes out log messages to console
```

_See code: [src/commands/luis/cross-train.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/cross-train.ts)_
Expand Down
18 changes: 9 additions & 9 deletions packages/luis/src/commands/luis/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ export default class LuisBuild extends Command {
static description = 'Build lu files to train and publish luis applications'

static examples = [`
$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME} --dialog multiLanguage
$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME}
`]

static flags: flags.Input<any> = {
help: flags.help({char: 'h'}),
help: flags.help({char: 'h', description: 'luis:build command help'}),
in: flags.string({char: 'i', description: 'Lu file or folder'}),
authoringKey: flags.string({description: 'LUIS authoring key'}),
botName: flags.string({description: 'Bot name'}),
region: flags.string({description: 'LUIS authoring region [westus|westeurope|australiaeast]', default: 'westus'}),
out: flags.string({char: 'o', description: 'Output folder name to write out .dialog files. If not specified, application ids will be output to console'}),
out: flags.string({char: 'o', description: 'Output folder name to write out .dialog and settings files. If not specified, application setting will be output to console'}),
defaultCulture: flags.string({description: 'Culture code for the content. Infer from .lu if available. Defaults to en-us'}),
fallbackLocale: flags.string({description: 'Locale to be used at the fallback if no locale specific recognizer is found. Only valid if --out is set'}),
suffix: flags.string({description: 'Environment name as a suffix identifier to include in LUIS app name. Defaults to current logged in user alias'}),
dialog: flags.string({description: 'Dialog recognizer type [multiLanguage|crosstrained]', default: 'multiLanguage'}),
force: flags.boolean({char: 'f', description: 'If --out flag is provided, overwrites relevant dialog file', default: false}),
force: flags.boolean({char: 'f', description: 'If --out flag is provided with the path to an existing file, overwrites that file', default: false}),
luConfig: flags.string({description: 'Path to config for lu build which can contain switches for arguments'}),
deleteOldVersion: flags.boolean({description: 'Delete old version of LUIS application after building new one.'}),
log: flags.boolean({description: 'Write out log messages to console', default: false}),
deleteOldVersion: flags.boolean({description: 'Deletes old version of LUIS application after building new one.'}),
log: flags.boolean({description: 'Writes out log messages to console', default: false}),
endpoint: flags.string({description: 'Luis authoring endpoint for publishing'}),
schema: flags.string({description: 'Defines $schema for generated .dialog files'}),
isStaging: flags.boolean({description: 'Publish luis application to staging slot if set. Default to production slot', default: false})
isStaging: flags.boolean({description: 'Publishes luis application to staging slot if set. Default to production slot', default: false})
}

async run() {
Expand Down Expand Up @@ -162,8 +162,8 @@ export default class LuisBuild extends Command {
this.log(`No changes to the .dialog files in ${outputFolder}\n`)
}
} else {
this.log('The published application ids:')
this.log(JSON.parse(dialogContents[dialogContents.length - 1].content).luis)
this.log('The published application setting:')
this.log(JSON.stringify(JSON.parse(dialogContents[dialogContents.length - 1].content).luis, null, 4))
}
} catch (error) {
if (error instanceof exception) {
Expand Down
6 changes: 3 additions & 3 deletions packages/luis/src/commands/luis/cross-train.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export default class LuisCrossTrain extends Command {
static description = 'Lu and Qna cross train tool'

static flags: flags.Input<any> = {
help: flags.help({char: 'h', description: 'Luis:cross-train help'}),
help: flags.help({char: 'h', description: 'Luis:cross-train command help'}),
in: flags.string({char: 'i', description: 'Source lu and qna files folder'}),
out: flags.string({char: 'o', description: 'Output folder name. If not specified, the cross trained files will be written to cross-trained folder under folder of current command'}),
config: flags.string({description: 'Path to config file of mapping rules'}),
intentName: flags.string({description: 'Interruption intent name', default: '_Interruption'}),
rootDialog: flags.string({description: 'RootDialog file path. If --config not specified, cross-trian will automatically construct the config from file system based on root dialog file'}),
rootDialog: flags.string({description: 'Root dialog file path'}),
force: flags.boolean({char: 'f', description: 'If --out flag is provided with the path to an existing file, overwrites that file', default: false}),
log: flags.boolean({description: 'Write out log messages to console', default: false})
log: flags.boolean({description: 'Writes out log messages to console', default: false})
}

async run() {
Expand Down
Loading