Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 6ffc424

Browse files
authored
Merge branch 'master' into chrande/qnamaker-reshuffle
2 parents a3a6163 + 1c08bee commit 6ffc424

File tree

4 files changed

+41
-131
lines changed

4 files changed

+41
-131
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
2. Inside the project folder run 'npm run build'
77
3. Inside the packages folder(https://github.com/microsoft/botframework-cli/tree/master/packages) run 'npx oclif plugin <plugin-name>'
88
4. Follow the wizard and set the prompts:
9-
9+
1010
? npm package: @microsoft/bf-<plugin-name>
1111
? description: <Plugin brief description>
1212
? author: Microsoft
@@ -19,32 +19,32 @@
1919
? Use tslint (linter for TypeScript): Y
2020
? Use mocha (testing framework): Y
2121
? Add CI service config (Press <space> to select, <a> to toggle all, <i> to invert selection): select any
22-
22+
2323
4. Go to the folder created by the previous command and add @microsoft/bf-cli-command as a dependency in your package.json file
24-
24+
2525
"dependencies": {
2626
...,
2727
"@microsoft/bf-cli-command": "1.0.0",
2828
...
2929
}
30-
30+
3131
5. At the root level(https://github.com/microsoft/botframework-cli) run 'npm run build' to bootstrap the packages
3232

3333
## Steps to create a new command
3434
1. Inside the plugin folder run 'npx oclif command <command-name>'.
3535
a. To add a subcommand use a colon separated format as follows:
3636
<command-name:subcommand-name>
3737
2. Replace the import 'import {Command, flags} from '@oclif/command' line inside the newly created command with '@microsoft/bf-cli-command'
38-
38+
3939
- import {Command, flags} from '@oclif/command'
4040
+ import {Command, flags} from '@microsoft/bf-cli-command'
41-
41+
4242
3. Add the typing to the flags property like this if needed:
43-
43+
4444
static flags: flags.Input<any> = {
4545
help: flags.help({description: 'Display help'}),
4646
}
47-
47+
4848
4. Implement the run method
4949

5050
## General Guidelines
@@ -89,7 +89,7 @@ Use the following verbs for standard commands
8989
* Commands and options are case SenSiTive, specified in lower case. *bf cmd:subcmd*.
9090
* Multi word options are lowcase, nohyphen, multiwords. Multi word commands are forbidden.
9191
* Prefer flags to args
92-
* Commands shall follow the *bf \[noun\]\[verb\]\[noun\]* form for example *bf qnamaker:create:kb*.
92+
* Commands shall follow the *bf \[noun\]\[noun\]\[verb\]* form for example *bf qnamaker:create:kb*.
9393
* FLags with specific units:
9494
* In general, DO NOT put units in Flag names. ALWAYS put the expected units in the help text. Example: --durationinminutes should simply be --duration. This prevents the need to add more arguments later if more units are supported.
9595
* Consider allowing a syntax that will let the user specify units. For example, even if the service requires a value in minutes, consider accepting 1h or 60m. It is fine to assume a default (i.e. 60 = 60 minutes).

Internal-Hackathon-Oct-18-2019.md

Lines changed: 0 additions & 119 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ npm i -g @microsoft/botframework-cli
4040
To view detailed usage information see the [CLI ReadMe page](https://github.com/microsoft/botframework-cli/tree/master/packages/cli)
4141

4242
## Issues and Feature Requests
43-
Please file issues and feature requests [here](https://github.com/microsoft/botframework-cli/issues).
43+
Please file issues and feature requests [here](https://github.com/microsoft/botframework-cli/issues).
44+
45+
Also, see current [known issues](https://github.com/microsoft/botframework-cli/labels/known-issues).
4446

4547
Thank you for your support.
4648

packages/lu/docs/lu-file-format.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ The following LUIS prebuilt entity types are supported -
159159
- \<synonym1>, \<synonym2>, ...
160160

161161
> Alternate definition
162+
162163
@ list color favColor, screenColor =
163164
- \<normalized-value>
164165
- \<synonym1>; \<synonym2>; ...
@@ -188,6 +189,7 @@ Example definition:
188189
- Set {deviceTemperature = {customDevice = owen} to 72}
189190

190191
> Define a composite entity ‘deviceTemperature’ that has device (list entity), customDevice (ml entity), temperature (pre-built entity) as children
192+
191193
@ composite deviceTemperature = [device, customDevice, temperature]
192194

193195
@ list device =
@@ -212,6 +214,7 @@ Example definition:
212214
@ hrf-number = /hrf-[0-9]{6}/
213215

214216
> Alternate definition
217+
215218
@ regex hrf-number from, to = /hrf-[0-9]{6}/
216219
```
217220

@@ -234,16 +237,20 @@ Roles in .lu file format can be explicitly or implicity defined.
234237
Explicit definition follow the following notation - @ \<entityType> \<entityName> [hasRole[s]] role1, role2, ...
235238
```markdown
236239
> # ml entity definition with roles
240+
237241
@ ml name role1, role2
238242

239243
> this is the same as
244+
240245
@ ml name hasRoles role1, role2
241246

242247
> this is also the same as
248+
243249
@ ml name
244250
@ name hasRoles role1, role2
245251

246252
> Also same as
253+
247254
@ ml name
248255
@ name hasRole role1
249256
@ name hasRole role2
@@ -258,6 +265,7 @@ Implicit definition: You can refer to roles directly in patterns as well as in l
258265
- {userName=vishwac} is my name
259266

260267
> This definition is same as including an explicit defintion for userName with 'lastName', 'firstName' as roles
268+
261269
> @ ml userName hasRoles lastName, firstName
262270
```
263271

@@ -273,8 +281,9 @@ In patterns, you can use roles using the {\<entityName\>:\<roleName\>} notation.
273281
You can define multiple roles for an entity in patterns and the parser will do rest!
274282

275283
```markdown
276-
# BookFlight
277284
> roles can be specified for list entity types as well - in this case fromCity and toCity are added as roles to the 'city' list entity defined further below
285+
286+
# BookFlight
278287
- book flight from {city:fromCity} to {city:toCity}
279288
- [can you] get me a flight from {city:fromCity} to {city:toCity}
280289
- get me a flight to {city:toCity}
@@ -331,7 +340,7 @@ Here's an example of a phrase list definition:
331340
@ phraseList Want
332341
@ phraseList Want =
333342
- require, need, desire, know
334-
```
343+
335344

336345
> You can also break up the phrase list values into an actual list
337346

@@ -341,6 +350,7 @@ Here's an example of a phrase list definition:
341350
- desire
342351
- know
343352
```
353+
344354
By default synonyms are set to be **not interchangeable** (matches with the portal experience). You can optionally set the synonyms to be **interchangeable** as part of the definition. Here's an example:
345355

346356
```markdown
@@ -355,26 +365,33 @@ Here's how you add a feature to a ml entity or an intent - with `usesFeature`.
355365

356366
```markdown
357367
> entity definition - <> \<entityType> \<entityName> [<roles>]
368+
358369
@ prebuilt personName
359370
@ prebuilt age
360371

361372
> entity definition with roles
373+
362374
@ ml userName hasRoles fistName, lastName
363375

364376
> add entity as feature to another entity
377+
365378
@ userName usesFeature personName
366379

367380
> add entity as feature to intent
381+
368382
@ intent getUserNameIntent usesFeature personName
369383

370384
> Intent definition
385+
371386
# getUserNameIntent
372387
- utterances
373388

374389
> multiple entities as feature to a model
390+
375391
@ intent getUserNameIntent usesFeature age, personName
376392

377393
> intent as feature to another intent
394+
378395
@ intent getUserProfileIntent usesFeature getUserNameIntent
379396

380397
# getUserProfileIntent
@@ -393,21 +410,25 @@ Here's how you define phrase list as a feature to another model
393410

394411
```markdown
395412
> phrase list definition
413+
396414
@ phraseList PLCity(interchangeable) =
397415
- seattle
398416
- space needle
399417
- SEATAC
400418
- SEA
401419

402420
> phrase list as feature to intent (also applicable to entities)
421+
403422
@ intent getUserProfileIntent usesFeature PLCity
404423

405424
> phrase list as a feature to an ml entity.
425+
406426
@ ml myCity usesFeature PLCity
407427

408428
@ regex regexZipcode = /[0-9]{5}/
409429

410430
> phrase list as feature to n-depth entity with phrase list as a feature
431+
411432
@ ml address fromAddress, toAddress
412433
@ address =
413434
- @ number 'door number'
@@ -474,16 +495,20 @@ Here's an example of those references:
474495

475496
```markdown
476497
> You can include references to other .lu files
498+
477499
[All LU files](./all.lu)
478500

479501
> References to other files can have wildcards in them
502+
480503
[en-us](./en-us/*)
481504

482505
> References to other lu files can include sub-folders as well.
483506
> /** indicates to the parser to recursively look for .lu files in all subfolders as well.
507+
484508
[all LU files](../**)
485509

486510
> You can include deep references to intents defined in a .lu file in utterances
511+
487512
# None
488513
- [None uttearnces](./all.lu#Help)
489514

@@ -500,12 +525,14 @@ Here's an example of those references:
500525
> - [all.lu](./all.lu#*utterancesAndPatterns*)
501526

502527
> You can include wild cards with deep references to QnA maker questions defined in a .qna file in utterances
528+
503529
# None
504530
- [QnA questions](./*#?)
505531

506532
> With the above statement, the parser will parse **all** .lu files under ./, extract out all questions from QnA pairs in those files and add them under 'None' intent as defined in this file.
507533

508534
> You can include deep references to QnA maker questions defined in a .qna file in utterances
535+
509536
# None
510537
- [QnA questions](./qna1.qna#?)
511538

0 commit comments

Comments
 (0)