US President Joe Biden has indicated he is now more optimistic about a ceasefire between Israel and Hamas than in months past.