Skip to content

Commit

Permalink
merge remote seperate the new recognizer set sample
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixzhan committed Mar 2, 2020
1 parent c429fe3 commit 0d4dc2e
Show file tree
Hide file tree
Showing 17 changed files with 667 additions and 201 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$type": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "808722"
},
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"triggers": [
{
"$type": "Microsoft.OnBeginDialog",
"$designer": {
"id": "335456"
},
"actions": [
{
"$type": "Microsoft.TextInput",
"$designer": {
"id": "298897"
},
"property": "dialog.todo",
"prompt": "OK, please enter the title of your todo.",
"maxTurnCount": 3,
"value": "=@title",
"alwaysPrompt": false,
"allowInterruptions": "true"
},
{
"$type": "Microsoft.EditArray",
"$designer": {
"id": "567087"
},
"changeType": "push",
"itemsProperty": "user.todos",
"value": "=dialog.todo"
},
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "116673"
},
"activity": "${bfdactivity-116673()}"
}
]
}
],
"generator": "AddToDo.lg",
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[import](common.lg)

# bfdactivity-116673
-Successfully added a todo named ${dialog.todo}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$type": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "316336"
},
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"triggers": [
{
"$type": "Microsoft.OnBeginDialog",
"$designer": {
"id": "480162"
},
"actions": [
{
"$type": "Microsoft.EditArray",
"$designer": {
"id": "832307"
},
"changeType": "Clear",
"itemsProperty": "user.todos",
"resultProperty": "dialog.cleared"
},
{
"$type": "Microsoft.IfCondition",
"$designer": {
"id": "983761"
},
"condition": "dialog.cleared",
"actions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "832307"
},
"activity": "${bfdactivity-832307()}"
}
],
"elseActions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "983761"
},
"activity": "${bfdactivity-983761()}"
}
]
}
]
}
],
"generator": "ClearToDos.lg",
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[import](common.lg)

# bfdactivity-832307
-Successfully cleared items in the Todo List.

# bfdactivity-983761
-You don't have any items in the Todo List.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$type": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "114909"
},
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"triggers": [
{
"$type": "Microsoft.OnBeginDialog",
"$designer": {
"id": "768658"
},
"actions": [
{
"$type": "Microsoft.TextInput",
"$designer": {
"id": "870620"
},
"property": "dialog.todo",
"prompt": "OK, please enter the title of the todo you want to remove.",
"maxTurnCount": 3,
"value": "=@title",
"alwaysPrompt": false,
"allowInterruptions": "false"
},
{
"$type": "Microsoft.EditArray",
"$designer": {
"id": "492096"
},
"changeType": "Remove",
"itemsProperty": "user.todos",
"resultProperty": "dialog.removed",
"value": "=dialog.todo"
},
{
"$type": "Microsoft.IfCondition",
"$designer": {
"id": "549615"
},
"condition": "dialog.removed",
"actions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "725469"
},
"activity": "${bfdactivity-725469()}"
}
],
"elseActions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "549615"
},
"activity": "${bfdactivity-549615()}"
}
]
}
]
}
],
"generator": "DeleteToDo.lg",
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[import](common.lg)

# bfdactivity-725469
-Successfully removed a todo named ${dialog.todo}

# bfdactivity-549615
-${dialog.todo} is not in the Todo List

# bfdprompt-870620()
- OK, please enter the title of the todo you want to remove.
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"$type": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "288769",
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions."
},
"autoEndDialog": false,
"defaultResultProperty": "dialog.result",
"recognizer": {
"$kind": "Microsoft.RecognizerSet",
"recognizers": [
{
"$kind": "Microsoft.MultiLanguageRecognizer",
"recognizers": {
"en-us": {
"$kind": "Microsoft.CrossTrainedRecognizerSet",
"recognizers": [
{
"$kind": "Microsoft.RegexRecognizer",
"id": "regex",
"intents": [
{
"intent": "AddIntent",
"pattern": "(?i)(?:add|create) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?"
},
{
"intent": "ClearIntent",
"pattern": "(?i)(?:delete|remove|clear) (?:all|every) (?:to-dos|todos|tasks)"
},
{
"intent": "DeleteIntent",
"pattern": "(?i)(?:delete|remove|clear) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?"
},
{
"intent": "ShowIntent",
"pattern": "(?i)(?:show|see|view) .*(?:to-do|todo|task)"
},
{
"intent": "HelpIntent",
"pattern": "(?i)help"
},
{
"intent": "CancelIntent",
"pattern": "(?i)cancel|never mind"
}
]
}
]
}
}
},
{
"$kind": "Microsoft.ValueRecognizer"
}
]
},
"generator": "Main.lg",
"triggers": [
{
"$type": "Microsoft.OnConversationUpdateActivity",
"$designer": {
"id": "376720"
},
"actions": [
{
"$type": "Microsoft.Foreach",
"$designer": {
"id": "518944",
"name": "Loop: for each item"
},
"itemsProperty": "turn.Activity.membersAdded",
"actions": [
{
"$type": "Microsoft.IfCondition",
"$designer": {
"id": "641773",
"name": "Branch: if/else"
},
"condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)",
"actions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "157674",
"name": "Send a response"
},
"activity": "${bfdactivity-157674()}"
}
]
}
]
}
]
},
{
"$type": "Microsoft.OnIntent",
"$designer": {
"id": "064505"
},
"actions": [
{
"$type": "Microsoft.BeginDialog",
"dialog": "AddToDo"
}
],
"intent": "AddIntent"
},
{
"$type": "Microsoft.OnIntent",
"$designer": {
"id": "114961"
},
"actions": [
{
"$type": "Microsoft.BeginDialog",
"dialog": "DeleteToDo",
"$designer": {
"id": "978613"
}
}
],
"intent": "DeleteIntent"
},
{
"$type": "Microsoft.OnIntent",
"$designer": {
"id": "088050"
},
"actions": [
{
"$type": "Microsoft.BeginDialog",
"dialog": "ClearToDos"
}
],
"intent": "ClearIntent"
},
{
"$type": "Microsoft.OnIntent",
"$designer": {
"id": "633942"
},
"actions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "696707"
},
"activity": "${bfdactivity-696707()}"
}
],
"intent": "HelpIntent"
},
{
"$type": "Microsoft.OnIntent",
"$designer": {
"id": "794124"
},
"actions": [
{
"$type": "Microsoft.BeginDialog",
"dialog": "ShowToDos"
}
],
"intent": "ShowIntent"
},
{
"$type": "Microsoft.OnIntent",
"$designer": {
"id": "179728"
},
"actions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "677440"
},
"activity": "ok."
},
{
"$type": "Microsoft.EndDialog"
}
],
"intent": "CancelIntent"
},
{
"$type": "Microsoft.OnUnknownIntent",
"$designer": {
"id": "677447"
},
"actions": [
{
"$type": "Microsoft.SendActivity",
"$designer": {
"id": "677448"
},
"activity": "Hi! I'm a ToDo bot. Say \"add a todo named first\" to get started."
}
]
}
],
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema"
}
Loading

0 comments on commit 0d4dc2e

Please sign in to comment.