This is done by simply feeding the previous conversation as part of the prompt. At least thats how Im doing it with Mindy, and Im pretty sure the only secret sauce chatGPT has is the bigger context window (8k tokens