Beijing is enforcing tough rules to ensure chatbots don’t misbehave, while hoping its models stay competitive with the U.S.