source: dialogmanager/src/main/resources/dialogdemo.json@ 29

Last change on this file since 29 was 29, checked in by wouter, 5 years ago

#27 separated question from answer

File size: 3.6 KB
Line 
1{
2 "specification": {
3 "phases": [
4 {
5 "label": "START",
6 "options": [
7 {
8 "OptionForParameters": {
9 "question": {
10 "NumberQuestion": {
11 "parameter": "random",
12 "min": -1000,
13 "max": 1000,
14 "stepsize": 1
15 }
16 },
17 "param": {
18 "values": {
19 }
20 },
21 "stimulus": {
22 "Textual": {
23 "question": "Please enter a random number between 0 and 9."
24 }
25 }
26 }
27 },
28 {
29 "OptionForParameters": {
30 "question": {
31 "NumberQuestion": {
32 "parameter": "random",
33 "min": -1000,
34 "max": 1000,
35 "stepsize": 1
36 }
37 },
38 "param": {
39 "values": {
40 }
41 },
42 "stimulus": {
43 "Textual": {
44 "question": "Can you give a random number, at least 0 and at most 9."
45 }
46 }
47 }
48 }
49 ],
50 "next": {
51 "gotoif": [
52 {
53 "label": "goodnum",
54 "condition": {
55 "values": {
56 "random": {
57 "num": 4.5
58 }
59 }
60 }
61 },
62 {
63 "label": "badnum",
64 "condition": {
65 "values": {
66 "random": {
67 "num": -4.5
68 }
69 }
70 }
71 },
72 {
73 "label": "badnum",
74 "condition": {
75 "values": {
76 "random": {
77 "num": 13.5
78 }
79 }
80 }
81 }
82 ]
83 }
84 },
85 {
86 "label": "goodnum",
87 "options": [
88 {
89 "OptionForParameters": {
90 "question": {
91 "Bool": {
92 "parameter": "retry"
93 }
94 },
95 "param": {
96 "values": {
97 }
98 },
99 "stimulus": {
100 "Textual": {
101 "question": "Yes, [random] is between 0 and 9. Do you want to retry?"
102 }
103 }
104 }
105 },
106 {
107 "OptionForParameters": {
108 "question": {
109 "Bool": {
110 "parameter": "retry"
111 }
112 },
113 "param": {
114 "values": {
115 }
116 },
117 "stimulus": {
118 "Textual": {
119 "question": "[random] is correct. Try again??"
120 }
121 }
122 }
123 }
124 ],
125 "next": {
126 "gotoif": [
127 {
128 "label": "END",
129 "condition": {
130 "values": {
131 "retry": {
132 "bool": false
133 }
134 }
135 }
136 },
137 {
138 "label": "START",
139 "condition": {
140 "values": {
141 "retry": {
142 "bool": true
143 }
144 }
145 }
146 }
147 ]
148 }
149 },
150 {
151 "label": "badnum",
152 "options": [
153 {
154 "OptionForParameters": {
155 "question": {
156 "Bool": {
157 "parameter": "retry"
158 }
159 },
160 "param": {
161 "values": {
162 }
163 },
164 "stimulus": {
165 "Textual": {
166 "question": "Nah, [random] is outside 0 to 9. Do you want to retry?"
167 }
168 }
169 }
170 },
171 {
172 "OptionForParameters": {
173 "question": {
174 "Bool": {
175 "parameter": "retry"
176 }
177 },
178 "param": {
179 "values": {
180 }
181 },
182 "stimulus": {
183 "Textual": {
184 "question": "That was not a correct answer. Try again??"
185 }
186 }
187 }
188 }
189 ],
190 "next": {
191 "gotoif": [
192 {
193 "label": "END",
194 "condition": {
195 "values": {
196 "retry": {
197 "bool": false
198 }
199 }
200 }
201 },
202 {
203 "label": "START",
204 "condition": {
205 "values": {
206 "retry": {
207 "bool": true
208 }
209 }
210 }
211 }
212 ]
213 }
214 }
215 ]
216 },
217 "parameters": {
218 "values": {
219 "dialog.PhaseLabel": {
220 "txt": "START"
221 }
222 }
223 }
224}
Note: See TracBrowser for help on using the repository browser.