A popular Chinese AI chatbot snapped at a user over a coding request, prompting an apology from its parent company Tencent.