add get history chat function