Reflection
Updates - Sep 25: Remy's recipe library expands! I improved the code so that now a user can type in any ingredient keyword and Remy will be able to provide the user with a secret recipe! This requires me to write a method for the parameter food (whatever ingredient a user types in). In order for this to work, I have to first clean up the string a user writes. The bot looks for keyword "search for," for example, "search for chicken." After it detects the string that contains "search for," it will scrap the two words "search for," and uses the remaining keyword, which is the ingredient to search through API. The code is shown below:
food = body.gsub!("search for ", "")
message, media = recipes( food )
I also redesigned the dialog flow so that the conversation starts more naturally with "How are you doing today?"
--------------------------------------------------
Sep 24: Right now the Remy bot can only share one Ratatouille recipe with others. Eventually, I want him to be able to share any recipe based on the ingredient a user texts. I would love the conversation to be more dynamic and natural. For example, instead of typing a keyword to trigger the bot's response, I want the user to be able to express in a way he/she usually does. For the next round of improvement, I also want to incorporate rich media, such as GIF into the conversation.
--------------------------------------------------