Narrated Abdullah ibn Amr ibn al-'As:
I heard the Messenger of Allah (ﷺ) say: If I drink an antidote, or tie an amulet, or compose poetry, I am the type who does not care what he does.
Abu Dawud said: THis was peculiar to the Prophet (ﷺ), but some people have allowed to use it, i.e. antidote.