Terahertz generation from DFG and TPG configurations