Companies like Snap and Google are infusing generative AI into their messaging apps.