Whenever possible, tolerate caterpillars.
Grow susceptible plants under fine netting or horticultural fleece to prevent adult flies or moths from laying eggs on plants. May sure the netting does not touch the plants since the adults will be able to lay eggs through the holes.
Regularly inspect and remove eggs and caterpillars by hand.