To do it entirely would be very hard currently. It still can only remember 4096 tokens at a time. ChatGPT fools ppl into thinking it has a longer memory by summarizing information once it approches that limit.