That is a decision for you and your allergy doctor to decide.
The average time frame is 3-5 years of maintenance therapy. Some people need allergy shots longer. Sometimes a trial off the allergy shots is another alternative to see if you are desensitized. The best way to find out is to sit down with your allergist and come up with an agreeable plan for both of you.