Continuum solvation models enable electronic structure calculations of systems in liquid environments, but because of the large number of empirical parameters, they are limited to the class of systems in their fit set (typically organic molecules). Here, we derive a solvation model with no empirical parameters for the dielectric response by taking the linear response limit of a classical density functional for molecular liquids. This model directly incorporates the nonlocal dielectric response of the liquid using an angular momentum expansion, and with a single fit parameter for dispersion contributions it predicts solvation energies of neutral molecules with an RMS error of 1.3 kcal/mol in water and 0.8 kcal/mol in chloroform and carbon tetrachloride. We show that this model is more accurate for strongly polar and charged systems than previous solvation models because of the parameter-free electric response, and demonstrate its suitability for ab initio solvation, including self-consistent solvation in quantum Monte Carlo calculations.