Update ChatAPI.php