Skip to content

Commit

Permalink
Merge pull request #20 from botpress/rl_dialog
Browse files Browse the repository at this point in the history
feat(dialogManager): Add flow service
  • Loading branch information
rndlaine committed Aug 10, 2018
2 parents 6054f80 + c8132a8 commit 4b393ae
Show file tree
Hide file tree
Showing 113 changed files with 1,115 additions and 355 deletions.
20 changes: 0 additions & 20 deletions modules/core/src/repositories/ghost-bot-repository.ts

This file was deleted.

55 changes: 0 additions & 55 deletions modules/core/src/services/cms/index.ts

This file was deleted.

121 changes: 0 additions & 121 deletions modules/core/src/services/ghost-content/file-system.ts

This file was deleted.

41 changes: 0 additions & 41 deletions modules/core/src/services/ghost-content/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
99 changes: 99 additions & 0 deletions packages/core/data/bots/bot123/flows/main.flow.json
@@ -0,0 +1,99 @@
{
"version": "0.0.1",
"catchAll": {
"onReceive": [],
"next": [
{
"condition": "event.nlu.intent.is('forget')",
"node": "forget-my-name"
}
]
},
"startNode": "entry",
"nodes": [
{
"id": "bda0320009",
"name": "welcome",
"onEnter": ["say #!builtin_text-pSsHWg", "getTotalNumberOfConversations {}"],
"onReceive": null,
"next": [
{
"condition": "state.$r === 0",
"node": "first-time"
},
{
"condition": "state.$r > 0",
"node": "many-times"
}
]
},
{
"id": "7099199f90",
"name": "first-time",
"next": [],
"onEnter": ["say #!builtin_text-AY5SSW", "say #!builtin_text-X069Le"],
"onReceive": null
},
{
"id": "c69ee2d71f",
"name": "many-times",
"next": [],
"onEnter": ["say #!builtin_text-bFsOmf"],
"onReceive": null
},
{
"id": "4f50a2e9fd",
"name": "forget-my-name",
"next": [],
"onEnter": [
"say #!builtin_text-TtzrCV",
"resetUserVariable {\"name\":\"nickname\"}",
"say #!builtin_text-kKQ8C3"
],
"onReceive": null
},
{
"id": "a54a82eb7c",
"name": "entry",
"onEnter": ["getUserVariable {\"name\":\"nickname\",\"output\":\"$r\"}"],
"onReceive": null,
"next": [
{
"condition": "state.$r !== null",
"node": "welcome"
},
{
"condition": "true",
"node": "ask-name"
}
]
},
{
"id": "d29fc6b771",
"name": "ask-name",
"next": [
{
"condition": "true",
"node": "welcome"
}
],
"onEnter": ["say #!builtin_text-z0J9qh"],
"onReceive": [
"setUserVariable {\"name\":\"nickname\",\"value\":\"{{event.text}}\",\"expiry\":\"never\"}",
"getUserVariable {\"name\":\"nickname\",\"output\":\"$r\"}"
]
},
{
"id": "562598f0e2",
"name": "random-fact",
"next": [
{
"condition": "true",
"node": "welcome"
}
],
"onEnter": ["say #!builtin_text-KRrMLo"],
"onReceive": null
}
]
}

0 comments on commit 4b393ae

Please sign in to comment.