public override BaseNode GetNextNode(Intent intent, Session session, ILambdaContext lambdaContext) { if (ValidIntents.ContainsKey(intent.Name)) { return(Story.Nodes[ValidIntents[intent.Name]]); } else { return(Story.Nodes[IncorrectIntentNextNodeIndex]); } }
public override BaseNode GetNextNode(Intent intent, Session session, ILambdaContext lambdaContext) { if (ValidIntents.ContainsKey(intent.Name)) { lambdaContext.Logger.LogLine("Found intent " + intent.Name + " with node index " + ValidIntents[intent.Name]); return(Story.Nodes[ValidIntents[intent.Name]]); } else { lambdaContext.Logger.LogLine("No intent found. Using node index " + IncorrectIntentNextNodeIndex); return(Story.Nodes[IncorrectIntentNextNodeIndex]); } }
public override void ModifySessionAttributes(Dictionary <string, object> attributes, Intent intent, Session session, ILambdaContext lambdaContext) { base.ModifySessionAttributes(attributes, intent, session, lambdaContext); if (!attributes.ContainsKey(ParameterName)) { attributes.Add(ParameterName, ValidIntents.ContainsKey(intent.Name)); } else { attributes[ParameterName] = ValidIntents.ContainsKey(intent.Name); } }