Add generator support for DM sent API.