i am fairly new at all of this stuff, but in this situation i would not think that you gave up too soon. there is no guarantee he will seek sobriety. 5 months is a nice start to a relationship, but you are starting to see the other part of the real person. i was told this before and ignored it- get out before it is too late. i think it is fair of you to tell him to contact you after a certain amount of time being clean.
but I worry about him. I feel if I could help him and have a positive influence on him, I should try. He doesn't really have any healthy, functioning friends.
i struggle wit hthis very thought, but after such a short time you do not really owe him your life. i thought i could have the same effect on my friend of 5 years, but there has been no change in 4 months.
good luck, i hope you don't get dragged down.