The simplest way to construct an artificial assistant with TensorFlow is to use a sequence-to-sequence (Seq2Seq) model, which we learned in the chapter on RNNs.
While originally developed for neural machine translation, we can adjust this model to act as an intelligent chatbot for our own purposes. We'll create the brain behind our assistant as a Python class called IntelligentAssistant. Then, we'll create the training and chatting functions for our assistant:
- First, let's start with our standard imports and initialize our variables. Take special note of the mask variable here; masks are placeholders that allow ...