Existing implementation assumed that the bot would provide a response to user based on sentiment and user request, but this was based on the sentiment and user request in the same speech utterance. The bot's response however, should be customized based on sentiment from prior user speech utterance. The app should be enhanced with stateful behavior that remembers the sentiment context across turns. This involves adding a new attribute to the VoiceAssistant class to store the last sentiment.
Existing implementation assumed that the bot would provide a response to user based on sentiment and user request, but this was based on the sentiment and user request in the same speech utterance. The bot's response however, should be customized based on sentiment from prior user speech utterance. The app should be enhanced with stateful behavior that remembers the sentiment context across turns. This involves adding a new attribute to the VoiceAssistant class to store the last sentiment.