class MongoDBChatMessageHistory// sessionId must come from a value the server has already validated
// (e.g. an authenticated session), never straight from a request field.
const chatHistory = new MongoDBChatMessageHistory({
collection: myCollection,
sessionId: 'unique-session-id',
});
const messages = await chatHistory.getMessages();
await chatHistory.clear();A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.