Should I have sex???

Ok I went to the doctor and found out I have a UTI, I forgot to ask her if I had to be w/o sex for a period of time. I was googling and some recommend 2 weeks or as long as the antibiotics last. Please advice and thanks.