US President Donald Trump said his country's commitment to Afghanistan was "not a blank cheque", telling the Kabul government that it had to help in strengthening its own security and the economy.