All right, seems to work. So this max memory, is it the previously generated text? Do the world settings (locations, descriptions, etc) consume it?
Also, would you answer a few more questions i have about how the program works? The definitions for game world, stats, entities, locations and dictionary, are they sent with every prompt or only at the start of the game?