Actually, you can never get consent for sure. It was only freshman philosophy class, but I remember studying philosophy of mind, and the concept of a philosophical zombie. No, not the shambling undead thinking deeply about the ethics of eating brains, but a thought experiment about a thing that behaves in all of the ways that you would expect of a human, but which has no conscious experience, and therefore no intent.
AI is helping to demonstrate the point that you can never know the mind of another person, and no way to know whether there is a conscious mind capable of consent behind the actions. Therefore, the best bet is to never have sex.