Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Enable Instructions of Recipes

The initial version of the cooking assistant spits out all the recipe steps at once. This should be changed to allow the user to indicate he or she has completed the step, which at a later point should also allow the user to ask queries about a step. To make this happen, we will make a small change to the given a30recipeStep pattern by adding a conversational step (user intent) to it. For this:

...

Add an intent you may call recipeContinuer to Dialogflow that is able to recognize phrases such as move on to next step, continue, simply next, or other similar phrases that the user might use to indicate a step has been completed.

...

As can be seen in the a30recipeStep pattern in ‘patterns.pl’, the agent is triggered by the user intent ‘recipeContinuer’. You need to implement such an intent in your dialogflow agent to make this workable. See this page for more information.

Enable End of Recipe

The initial version of the cooking assistant does not indicate that the final step of a recipe has been reached. It does already have a finalStep/3 predicate that is used as a marker for the final step. Modify the text generated for the finalStep intent in the text.pl file using the built-in string_concat/3 predicate to indicate to the user that this is the last step of the recipe.

...