Hi Bex,
I asked the same question about my peas, I was after a companition plant. I always feel a little easier if theres a natural to fix things, and had a reply back to say that they had managed to move on the ants by planting mint next to the peas.
(my appologies I can't remember who the reply was from, which is shocking because it was only this morning!)
They didn't say what sort of mint I'm assuming peppermint. Worth a try I recon. The only thing is Mint will rampage, so for my last 2 houses I've been really careful to keep it in a pot.
The ants will just move somewhere else but I suppose as long as it's not next to your veg patch you'll be ok.