DiagGPT: An LLM-based Chatbot with Automatic Topic Management for Task-Oriented Dialogue