Const formations
formations: ReadonlyMap<string, IFormationImmutable<string>> = new FormationMap<string>([{id: welcome,discourse: {type: DiscourseType.Statement,statement: 'Welcome!',},link: {type: LinkType.Direct,id: description,},},{id: description,discourse: {type: DiscourseType.Statement,statement: 'This is the demo conversation tree.',},link: {type: LinkType.Direct,id: intents,},},{id: intents,discourse: {type: DiscourseType.Expected,statement: 'What would you like to learn about today?',suggestions: ['Animals πΈ', 'Sports π'],expected: [new TargetIntent('animals'),new TargetIntent('sports'),],},link: {type: LinkType.Conditional,conditions: {'response.intent.animals.confidence > 0.5': animals,'response.intent.sports.confidence > 0.5': sports,},fallback: failure(intents),},},{id: animals,discourse: {type: DiscourseType.Statement,statement: 'Here are some questions about animals πΊπ΅π§π¦π€π¦π‘π¦π¦π¦π',},link: {type: LinkType.Direct,id: dogLegs,},},{id: dogLegs,discourse: {type: DiscourseType.Expected,statement: 'How many legs do dogs have? πΆ',suggestions: ['Two', 'Three', 'Four'],expected: [new TargetMeaning('four'),],},meta: {features: ['question'],question: {attempts: 3,},},link: {type: LinkType.Conditional,conditions: {'response.meaning.four.confidence > 0.5': success(catFur),},fallback: failure(dogLegs),},},{id: catFur,discourse: {type: DiscourseType.Expected,statement: 'Do cats have fur? π±π―π¦',suggestions: ['Yes', 'No'],expected: [new TargetMeaning('yes'),],},meta: {features: ['question'],question: {attempts: 1,},},link: {type: LinkType.Conditional,conditions: {'response.meaning.yes.confidence > 0.5': success(loop),},fallback: failure(catFur),},},{id: sports,discourse: {type: DiscourseType.Statement,statement: 'Let\'s learn about sports! β½ππβΎπΎπππ±ππΈπππ',},link: {type: LinkType.Direct,id: footballTeamNumbers,},},{id: footballTeamNumbers,discourse: {type: DiscourseType.Expected,statement: 'How many people are on a football team? β½',suggestions: ['Two', 'Five', 'Eleven'],expected: [new TargetMeaning('eleven'),],},meta: {features: ['question'],question: {depreciation: 0.5,},},link: {type: LinkType.Conditional,conditions: {'response.meaning.eleven.confidence > 0.5': success(rugbyTeams),},fallback: failure(footballTeamNumbers),},},{id: rugbyTeams,discourse: {type: DiscourseType.Expected,statement: 'How many rugby teams are there in a match? π',suggestions: ['One', 'Two', 'Three', 'Four'],expected: [new TargetMeaning('two'),],},meta: {features: ['question'],question: {points: 20,depreciation: 10,},},link: {type: LinkType.Conditional,conditions: {'response.meaning.two.confidence > 0.5': success(loop),},fallback: failure(rugbyTeams),},},{id: loop,discourse: {type: DiscourseType.Statement,statement: 'Now we will loop back to the beginning!',},link: {type: LinkType.Direct,id: welcome,},},{id: oops,discourse: {type: DiscourseType.Statement,statement: 'Oops, that\'s not rightβ¦',},link: {type: LinkType.Direct,id: welcome,},},{id: tryAgain,discourse: {type: DiscourseType.Statement,statement: 'Hmm, try again π€',},link: {type: LinkType.Direct,id: welcome,},},{id: haveAnotherGo,discourse: {type: DiscourseType.Statement,statement: 'Have another go, that wasn\'t the right answer!',},link: {type: LinkType.Direct,id: welcome,},},{id: incorrect,discourse: {type: DiscourseType.Statement,statement: 'Incorrect π',},link: {type: LinkType.Direct,id: welcome,},},{id: yep,discourse: {type: DiscourseType.Statement,statement: 'Yep π€©',},link: {type: LinkType.Direct,id: welcome,},},{id: wellDone,discourse: {type: DiscourseType.Statement,statement: 'Well done!',},link: {type: LinkType.Direct,id: welcome,},},{id: awesomeWork,discourse: {type: DiscourseType.Statement,statement: 'Awesome work π',},link: {type: LinkType.Direct,id: welcome,},},{id: correct,discourse: {type: DiscourseType.Statement,statement: 'Correct π€',},link: {type: LinkType.Direct,id: welcome,},},])