Primarily medication. Fasting has a long (ancient) history as a treatment for epilepsy, the modern revival and investigation of the ketogenic diet specifically relates to certain types drug-resistant childhood epilepsy. The Wikipedia article on the ketogenic diet is quite informative.