Example

const chatHistory = new MongoDBChatMessageHistory({
collection: myCollection,
sessionId: 'unique-session-id',
});
const messages = await chatHistory.getMessages();
await chatHistory.clear();

Hierarchy

Constructors

Methods

  • Parameters

    • message: string

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<BaseMessage[]>

Generated using TypeDoc