Implementing chat history.