Advertisement
Guest User

Conversation Slots Counter Example

a guest
Oct 31st, 2017
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 9.68 KB | None | 0 0
  1. {
  2.   "name": "Slot counter",
  3.   "created": "2017-10-26T06:19:43.235Z",
  4.   "intents": [
  5.     {
  6.       "intent": "INTENT3",
  7.       "created": "2017-10-27T11:36:37.102Z",
  8.       "updated": "2017-10-27T11:36:37.102Z",
  9.       "examples": [
  10.         {
  11.           "text": "How are you?, Can you help me?",
  12.           "created": "2017-10-27T11:36:37.111Z",
  13.           "updated": "2017-10-27T11:36:37.111Z"
  14.         }
  15.       ],
  16.       "description": null
  17.     },
  18.     {
  19.       "intent": "INTENT2",
  20.       "created": "2017-10-27T11:36:37.102Z",
  21.       "updated": "2017-10-27T11:36:37.102Z",
  22.       "examples": [
  23.         {
  24.           "text": "question 2?",
  25.           "created": "2017-10-27T11:36:37.111Z",
  26.           "updated": "2017-10-27T11:36:37.111Z"
  27.         }
  28.       ],
  29.       "description": null
  30.     },
  31.     {
  32.       "intent": "INTENT1",
  33.       "created": "2017-10-27T11:36:37.102Z",
  34.       "updated": "2017-10-27T11:36:37.102Z",
  35.       "examples": [
  36.         {
  37.           "text": "question 1?",
  38.           "created": "2017-10-27T11:36:37.111Z",
  39.           "updated": "2017-10-27T11:36:37.111Z"
  40.         }
  41.       ],
  42.       "description": null
  43.     }
  44.   ],
  45.   "updated": "2017-11-01T02:23:21.544Z",
  46.   "entities": [
  47.     {
  48.       "entity": "sys-date",
  49.       "values": [],
  50.       "created": "2017-11-01T01:50:04.094Z",
  51.       "updated": "2017-11-01T01:50:04.094Z",
  52.       "metadata": null,
  53.       "description": null
  54.     },
  55.     {
  56.       "entity": "sys-person",
  57.       "values": [],
  58.       "created": "2017-11-01T01:50:08.911Z",
  59.       "updated": "2017-11-01T01:50:08.911Z",
  60.       "metadata": null,
  61.       "description": null
  62.     }
  63.   ],
  64.   "language": "en",
  65.   "metadata": {
  66.     "api_version": {
  67.       "major_version": "v1",
  68.       "minor_version": "2017-05-26"
  69.     }
  70.   },
  71.   "description": "Example code showing how to have a slot counter to exit.  http://sodoherty.ai",
  72.   "dialog_nodes": [
  73.     {
  74.       "type": "slot",
  75.       "title": null,
  76.       "output": null,
  77.       "parent": "node_1_1509501013160",
  78.       "context": null,
  79.       "created": "2017-11-01T01:50:36.823Z",
  80.       "updated": "2017-11-01T01:50:44.355Z",
  81.       "metadata": null,
  82.       "variable": "$date",
  83.       "next_step": null,
  84.       "conditions": null,
  85.       "description": null,
  86.       "dialog_node": "slot_3_1509501035783",
  87.       "previous_sibling": "node_12_1509501240595"
  88.     },
  89.     {
  90.       "type": "event_handler",
  91.       "title": null,
  92.       "output": {},
  93.       "parent": "node_1_1509501013160",
  94.       "context": {
  95.         "counter": "<? $counter = $counter + 1 ?>"
  96.       },
  97.       "created": "2017-11-01T02:00:33.007Z",
  98.       "updated": "2017-11-01T02:19:50.506Z",
  99.       "metadata": null,
  100.       "next_step": null,
  101.       "conditions": null,
  102.       "event_name": "generic",
  103.       "description": null,
  104.       "dialog_node": "handler_14_1509501586776",
  105.       "previous_sibling": "handler_10_1509501135265"
  106.     },
  107.     {
  108.       "type": "event_handler",
  109.       "title": null,
  110.       "output": {
  111.         "text": {
  112.           "values": [
  113.             "What name and date"
  114.           ],
  115.           "selection_policy": "sequential"
  116.         }
  117.       },
  118.       "parent": "node_1_1509501013160",
  119.       "context": null,
  120.       "created": "2017-11-01T01:50:36.047Z",
  121.       "updated": "2017-11-01T02:01:44.696Z",
  122.       "metadata": null,
  123.       "next_step": null,
  124.       "conditions": null,
  125.       "event_name": "focus",
  126.       "description": null,
  127.       "dialog_node": "handler_2_1509501035760",
  128.       "previous_sibling": "slot_6_1509501050934"
  129.     },
  130.     {
  131.       "type": "response_condition",
  132.       "title": null,
  133.       "output": {
  134.         "text": {
  135.           "values": [
  136.             "You entered $date and $person"
  137.           ],
  138.           "selection_policy": "sequential"
  139.         }
  140.       },
  141.       "parent": "node_1_1509501013160",
  142.       "context": null,
  143.       "created": "2017-11-01T01:54:00.845Z",
  144.       "updated": "2017-11-01T02:08:53.866Z",
  145.       "metadata": null,
  146.       "next_step": null,
  147.       "conditions": "$date != \"cancel\" || $person != \"cancel\"",
  148.       "description": null,
  149.       "dialog_node": "node_12_1509501240595",
  150.       "previous_sibling": "handler_14_1509501586776"
  151.     },
  152.     {
  153.       "type": "event_handler",
  154.       "title": null,
  155.       "output": {
  156.         "text": {
  157.           "values": [
  158.             "You have gotten the question wrong too many times."
  159.           ],
  160.           "selection_policy": "sequential"
  161.         }
  162.       },
  163.       "parent": "node_1_1509501013160",
  164.       "context": {
  165.         "date": "cancel",
  166.         "person": "cancel",
  167.         "counter": 99
  168.       },
  169.       "created": "2017-11-01T01:53:06.112Z",
  170.       "updated": "2017-11-01T02:19:50.077Z",
  171.       "metadata": null,
  172.       "next_step": null,
  173.       "conditions": "$counter > 3",
  174.       "event_name": "generic",
  175.       "description": null,
  176.       "dialog_node": "handler_10_1509501135265",
  177.       "previous_sibling": "node_6_1509502255826"
  178.     },
  179.     {
  180.       "type": "slot",
  181.       "title": null,
  182.       "output": null,
  183.       "parent": "node_1_1509501013160",
  184.       "context": null,
  185.       "created": "2017-11-01T01:50:51.268Z",
  186.       "updated": "2017-11-01T01:50:58.334Z",
  187.       "metadata": null,
  188.       "variable": "$person",
  189.       "next_step": null,
  190.       "conditions": null,
  191.       "description": null,
  192.       "dialog_node": "slot_6_1509501050934",
  193.       "previous_sibling": "slot_3_1509501035783"
  194.     },
  195.     {
  196.       "title": null,
  197.       "output": {},
  198.       "parent": "node_1_1509501013160",
  199.       "context": {
  200.         "date": null,
  201.         "person": null,
  202.         "counter": 1
  203.       },
  204.       "created": "2017-11-01T02:10:56.128Z",
  205.       "updated": "2017-11-01T02:22:43.394Z",
  206.       "metadata": null,
  207.       "next_step": null,
  208.       "conditions": "$counter == 99",
  209.       "description": null,
  210.       "dialog_node": "node_6_1509502255826",
  211.       "previous_sibling": null
  212.     },
  213.     {
  214.       "type": "event_handler",
  215.       "title": null,
  216.       "output": {
  217.         "text": "What person"
  218.       },
  219.       "parent": "slot_6_1509501050934",
  220.       "context": null,
  221.       "created": "2017-11-01T01:50:52.131Z",
  222.       "updated": "2017-11-01T01:51:16.203Z",
  223.       "metadata": null,
  224.       "next_step": null,
  225.       "conditions": null,
  226.       "event_name": "focus",
  227.       "description": null,
  228.       "dialog_node": "handler_8_1509501050934",
  229.       "previous_sibling": "handler_7_1509501050934"
  230.     },
  231.     {
  232.       "type": "event_handler",
  233.       "title": null,
  234.       "output": null,
  235.       "parent": "slot_6_1509501050934",
  236.       "context": {
  237.         "person": "@sys-person"
  238.       },
  239.       "created": "2017-11-01T01:50:51.710Z",
  240.       "updated": "2017-11-01T01:50:58.730Z",
  241.       "metadata": null,
  242.       "next_step": null,
  243.       "conditions": "@sys-person",
  244.       "event_name": "input",
  245.       "description": null,
  246.       "dialog_node": "handler_7_1509501050934",
  247.       "previous_sibling": null
  248.     },
  249.     {
  250.       "type": "event_handler",
  251.       "title": null,
  252.       "output": {
  253.         "text": "What date"
  254.       },
  255.       "parent": "slot_3_1509501035783",
  256.       "context": null,
  257.       "created": "2017-11-01T01:50:37.792Z",
  258.       "updated": "2017-11-01T01:50:51.035Z",
  259.       "metadata": null,
  260.       "next_step": null,
  261.       "conditions": null,
  262.       "event_name": "focus",
  263.       "description": null,
  264.       "dialog_node": "handler_5_1509501035783",
  265.       "previous_sibling": "handler_4_1509501035783"
  266.     },
  267.     {
  268.       "type": "event_handler",
  269.       "title": null,
  270.       "output": null,
  271.       "parent": "slot_3_1509501035783",
  272.       "context": {
  273.         "date": "@sys-date"
  274.       },
  275.       "created": "2017-11-01T01:50:37.300Z",
  276.       "updated": "2017-11-01T01:50:44.828Z",
  277.       "metadata": null,
  278.       "next_step": null,
  279.       "conditions": "@sys-date",
  280.       "event_name": "input",
  281.       "description": null,
  282.       "dialog_node": "handler_4_1509501035783",
  283.       "previous_sibling": null
  284.     },
  285.     {
  286.       "type": "frame",
  287.       "title": null,
  288.       "output": {},
  289.       "parent": null,
  290.       "context": null,
  291.       "created": "2017-11-01T01:50:13.446Z",
  292.       "updated": "2017-11-01T02:12:04.071Z",
  293.       "metadata": {
  294.         "fallback": "leave",
  295.         "_customization": {
  296.           "mcr": true
  297.         }
  298.       },
  299.       "next_step": {
  300.         "behavior": "jump_to",
  301.         "selector": "condition",
  302.         "dialog_node": "node_6_1509502255826"
  303.       },
  304.       "conditions": "input.text == \"go\"",
  305.       "description": null,
  306.       "dialog_node": "node_1_1509501013160",
  307.       "previous_sibling": "Welcome"
  308.     },
  309.     {
  310.       "title": null,
  311.       "output": {
  312.         "text": {
  313.           "values": [
  314.             "I didn't understand."
  315.           ],
  316.           "selection_policy": "sequential"
  317.         }
  318.       },
  319.       "parent": null,
  320.       "context": null,
  321.       "created": "2017-11-01T02:04:41.910Z",
  322.       "updated": "2017-11-01T02:05:01.166Z",
  323.       "metadata": null,
  324.       "next_step": null,
  325.       "conditions": "anything_else",
  326.       "description": null,
  327.       "dialog_node": "node_1_1509501881619",
  328.       "previous_sibling": "node_1_1509501013160"
  329.     },
  330.     {
  331.       "title": "Welcome",
  332.       "output": {
  333.         "text": {
  334.           "values": [
  335.             "Type in `go` to activate the slot."
  336.           ],
  337.           "selection_policy": "sequential"
  338.         }
  339.       },
  340.       "parent": null,
  341.       "context": {
  342.         "counter": 1
  343.       },
  344.       "created": "2017-10-26T06:20:25.790Z",
  345.       "updated": "2017-11-01T02:07:50.727Z",
  346.       "metadata": null,
  347.       "next_step": null,
  348.       "conditions": "welcome",
  349.       "description": null,
  350.       "dialog_node": "Welcome",
  351.       "previous_sibling": null
  352.     }
  353.   ],
  354.   "workspace_id": "09185f30-2ebc-4e47-9069-49236ed5ba4e",
  355.   "counterexamples": [],
  356.   "learning_opt_out": false
  357. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement