Build ChatGPT Chatbots with LangChain Memory: Understanding and Implementing Memory in Conversations