There are a couple of things that need to be initialised in the index utilities for AI History.
cd C:\InsightMaker\Utils\InsightMaker.IndexUtilities
.\InsightMaker.IndexUtilities.exe initialise --ai-history
You can check this was successful by logging into the Control Hub.
Enabling AI History in Search Flows
If your AI chats are hanging on the second message it is likely due to a malformed AI History index.
No History Written to Chatbot
After creating a new chatbot search flow and defining its AI history source you should restart the middleware with iisreset.