From the course: AI Workshop: Advanced Chatbot Development

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Solution: Build a basic chatbot

Solution: Build a basic chatbot

(upbeat music) - [Instructor] So, how was the challenge? In this challenge you had to build your first ever chatbot. It was similar to the demo, but now you had to do it yourself. The only little additional twist that we added, was to have the conversation history so our model will know what we talked about before, and therefore will be better at remembering what happened to answer us. So let's verify that. We'll connect to a GPU and now we'll do the Pip installs. There it is. Again, we're going to write the file flask_chatbot_app. This is the same as before. We load the same model, but now we'll have the conversation history global variable. So the only change will be in the generate response method. In that method, now we're going to append to the conversation history with the role user, the new message, and that's what we're going to send to the chatbot model. As now we have a history of messages, notice that instead of max tokens, which will be the overall answer including the…

Contents