Thermoelectric properties of Weyl and Dirac semimetals