This package is intended for Microsoft use only and should be consumed through @microsoft/botframework-cli. It is not designed to be consumed as an independent package.
bf qnamakerbf qnamaker:alterationsbf qnamaker:alterations:listbf qnamaker:alterations:replacebf qnamaker:convertbf qnamaker:endpointkeysbf qnamaker:endpointkeys:listbf qnamaker:endpointkeys:refreshbf qnamaker:endpointsettingsbf qnamaker:endpointsettings:getbf qnamaker:endpointsettings:updatebf qnamaker:initbf qnamaker:kbbf qnamaker:kb:createbf qnamaker:kb:deletebf qnamaker:kb:exportbf qnamaker:kb:getbf qnamaker:kb:listbf qnamaker:kb:publishbf qnamaker:kb:replacebf qnamaker:kb:updatebf qnamaker:operationdetailsbf qnamaker:operationdetails:getbf qnamaker:querybf qnamaker:trainbf qnamaker:translate
QnA Maker
USAGE
$ bf qnamaker
OPTIONS
-h, --help Display QnA Maker CLI available commands
See code: src/commands/qnamaker/index.ts
Commands for replacing and listing your alterations
USAGE
$ bf qnamaker:alterations
OPTIONS
-h, --help display qnamaker:alterations available commands
See code: src/commands/qnamaker/alterations/index.ts
Downloads all word alterations (synonyms) that have been added by the user.
USAGE
$ bf qnamaker:alterations:list
OPTIONS
-h, --help qnamaker:alterations:list command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/alterations/list.ts
Replaces word alterations (synonyms) for the KB with the give records.
USAGE
$ bf qnamaker:alterations:replace
OPTIONS
-h, --help qnamaker:alterations:replace command help
-i, --in=in File path to the WordAlterationsDTO object to send in the body of the request
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/alterations/replace.ts
Converts .qna file(s) to QnA application JSON models or vice versa.
USAGE
$ bf qnamaker:convert
OPTIONS
-f, --force If --out flag is provided with the path to an existing file, overwrites that file
-h, --help qnamaker:convert help
-i, --in=in Source .qna file(s) or QnA KB JSON file
-o, --out=out Output file or folder name. If not specified stdout will be used as output
-r, --recurse Indicates if sub-folders need to be considered to file .qna file(s)
--alterations Indicates if files is QnA Alterations
--log Enables log messages
--name=name Name of the QnA KB
--sort When set, questions collections are alphabetically sorted are alphabetically sorted in .qna files
See code: src/commands/qnamaker/convert.ts
Commands to refresh and list keys
USAGE
$ bf qnamaker:endpointkeys
OPTIONS
-h, --help display qnamaker:endpointkeys available commands
See code: src/commands/qnamaker/endpointkeys/index.ts
List all the currently valid endpointKeys for querying your private endpoint
USAGE
$ bf qnamaker:endpointkeys:list
OPTIONS
-h, --help qnamaker:endpointkeys:list command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/endpointkeys/list.ts
Re-generates an endpoint key, in case you suspect your keys have been compromised
USAGE
$ bf qnamaker:endpointkeys:refresh
OPTIONS
-h, --help qnamaker:endpoints:refresh command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--keyType=keyType (required) Type of Key. (PrimaryKey/SecondaryKey)
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/endpointkeys/refresh.ts
Commands to get and update endpoint settings
USAGE
$ bf qnamaker:endpointsettings
OPTIONS
-h, --help display qnamaker:update available commands
See code: src/commands/qnamaker/endpointsettings/index.ts
Gets endpoint settings for an endpoint.
USAGE
$ bf qnamaker:endpointsettings:get
OPTIONS
-h, --help qnamaker:endpointsettings:get command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--kbId=kbId Knowledgebase id to get metadata.
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/endpointsettings/get.ts
Updates endpoint settings for an endpoint.
USAGE
$ bf qnamaker:endpointsettings:update
OPTIONS
-h, --help qnamaker:endpointsettings:update command help
--activelearning Enable active learning. Disables if flag not set
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/endpointsettings/update.ts
Initializes the config file with settings.
USAGE
$ bf qnamaker:init
OPTIONS
-h, --help qnamaker:init command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
See code: src/commands/qnamaker/init.ts
Commands for manipulating your knowledge base
USAGE
$ bf qnamaker:kb
OPTIONS
-h, --help display qnamaker:kb available commands
See code: src/commands/qnamaker/kb/index.ts
Creates a new knowledgebase
USAGE
$ bf qnamaker:kb:create
OPTIONS
-h, --help qnamaker:kb:create command help
-i, --in=in File path to the CreateKbDTO object to send in the body of the request.
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--name=name Name of the kb you want to create. This will override the name of KB that might be
present in the CreateKb DTO
--save Save the kbId in config.
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/create.ts
Delete a knowledgebase by id
USAGE
$ bf qnamaker:kb:delete
OPTIONS
-h, --help qnamaker:kb:delete command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--force Do not prompt for confirmation, force the operation
--kbId=kbId Knowledgebase id to be deleted. Overrides the knowledge base id present in the
config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/delete.ts
Echos a knowledgebase json to stdout
USAGE
$ bf qnamaker:kb:export
OPTIONS
-h, --help qnamaker:kb:export command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--environment=environment [default: Prod] Specifies whether environment is Test or Prod.
--kbId=kbId Knowledgebase id to be exported. Overrides the knowledge base id present in the
config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/export.ts
Get metadata about a knowledgebase
USAGE
$ bf qnamaker:kb:get
OPTIONS
-h, --help qnamaker:kb:get command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--kbId=kbId Knowledgebase id to get metadata. Overrides the knowledge base id present in the
config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/get.ts
List all of your knowledgebases
USAGE
$ bf qnamaker:kb:list
OPTIONS
-h, --help qnamaker:kb:list command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/list.ts
Publish all unpublished in the knowledgebase to the prod endpoint.
USAGE
$ bf qnamaker:kb:publish
OPTIONS
-h, --help qnamaker:kb:publish command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--kbId=kbId Knowledgebase id to pubish. Overrides the knowledge base id present in the config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/publish.ts
Replace a knowledgebase contents with new contents
USAGE
$ bf qnamaker:kb:replace
OPTIONS
-h, --help qnamaker:kb:replace command help
-i, --in=in File path to the ReplaceKbDTO object to send in the body of the request
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--kbId=kbId Knowledgebase id. Overrides the knowledge base id present in the config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/kb/replace.ts
Add or delete QnA Pairs and / or URLs to an existing knowledge base
USAGE
$ bf qnamaker:kb:update
OPTIONS
-h, --help qnamaker:kb:update command help
-i, --in=in The file path to the UpdateKbOperationDTO object to send in the body of the
request.
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--kbId=kbId Knowledgebase id. Overrides the knowledge base id present in the config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
--wait Wait for the operation to complete.
See code: src/commands/qnamaker/kb/update.ts
Command to get operation details
USAGE
$ bf qnamaker:operationdetails
OPTIONS
-h, --help display qnamaker:operationdetails available commands
See code: src/commands/qnamaker/operationdetails/index.ts
Gets details of a specific long running operation.
USAGE
$ bf qnamaker:operationdetails:get
OPTIONS
-h, --help qnamaker:operationdetails:get command help
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
--operationId=operationId (required) Operation id.
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in the config
See code: src/commands/qnamaker/operationdetails/get.ts
Generate Answer for fetching the answer from Kb for a query
USAGE
$ bf qnamaker:query
OPTIONS
-h, --help qnamaker:query command help
--context=context Path to Context object json file with previous QnA
--endpointKey=endpointKey Specifies the endpoint key for your private QnA service (From qnamaker.ai portal user
settings page). Overrides the value present in config
--hostname=hostname Specifies the url for your private QnA service. Overrides the value present in config
--kbId=kbId Specifies the active qnamaker knowledgebase id. Overrides the value present in the
config
--qnaId=qnaId Exact qnaId to fetch from the knowledgebase, this field takes priority over question
--question=question (required) Query to get a prediction for
--scorethreshold=scorethreshold Specifies the confidence score threshold for the returned answer.
--strictfilters=strictfilters Path to json file with MetadataDTO[] e.g {"strictfilters": MetadataDTO[]}
--test Query against the test index
--top=top Specifies the number of matching results
See code: src/commands/qnamaker/query.ts
Train call to add suggestions to the knowledgebase.
USAGE
$ bf qnamaker:train
OPTIONS
-h, --help qnamaker:get:kb command help
--endpointKey=endpointKey Specifies the endpoint key for your private QnA service.(from qnamaker.ai portal
user settings page). Overrides the value present in config.
--hostname=hostname Specifies the url for your private QnA service. Overrides the value present in
config.
--in=in File path to the FeedbackRecordDTO object to send in the body of the request.
--kbId=kbId Specifies the active qnamaker knowledgebase id. Overrides the value present in the
config
--subscriptionKey=subscriptionKey Specifies the qnamaker Ocp-Apim-Subscription Key (found in Keys under Resource
Management section for your Qna Maker cognitive service). Overrides the
subscriptionkey value present in config
See code: src/commands/qnamaker/train.ts
Translate given QnA maker application JSON model or qna file(s)
USAGE
$ bf qnamaker:translate
OPTIONS
-f, --force If --out flag is provided with the path to an existing file, overwrites that file
-h, --help qnamaker:translate help
-i, --in=in Source .qna file(s) or QnA maker application JSON model
-o, --out=out Output folder name. If not specified stdout will be used as output
-r, --recurse Indicates if sub-folders need to be considered to find .qna file(s)
--srclang=srclang Source lang code. Auto detect if missing.
--tgtlang=tgtlang (required) Comma separated list of target languages.
--translate_comments When set, machine translate comments found in .qna file
--translate_link_text When set, machine translate link description in .qna file
--translatekey=translatekey (required) Machine translation endpoint key.
See code: src/commands/qnamaker/translate.ts