The leader of the Australian Greens has made a shock announcement about her future as party leader.