AI Chatbots: Building for Safety and Mitigating Legal Risks