I've been trying to do this for several days and getting nowhere with the CopilotKit docs, so either I'm doing something wrong or I'm looking in the wrong place.
What I want to do is save the whole chat history as a json document to a nosql database like mongodb or cosmos DB keyed off a user ID set in the front end. If the user refreshes the page that holds the chat component or has to restart their computer or something, as long as it's within the time threshold, they can get back to their chat history. Every other AI assistant I've used to like ChatGPT has a method to save chats and restore them, so I can't imagine that this hasn't been done already, but I haven't been able to find any good examples for doing it in CopilotKit.
There is a single example in the message persistence page that uses a LangGraph PostgresQL checkpointer, but that's not the database I'm using. I've been trying to find any example that shows pulling the metadata properties that the UI sends, but I haven't seen even that much. Does anyone have any examples of writing a custom checkpoint or or or saving chat sessions to anything other than postgres or redis?
Many thanks!