In Memory Chatbot
Abstract implementation of Chatbot that maintains sessions in memory. This implementation is thread-safe and supports configurable maximum number of sessions. When the maximum number of sessions is reached, the oldest sessions are evicted to make room for new ones.
Parameters
The maximum number of concurrent chat sessions to maintain. Defaults to 1000.
The number of sessions to evict when the limit is reached. Defaults to 10% of maxSessions.
Functions
Clears all sessions from memory.
Creates a new chat session and automatically registers it with the chatbot. Subclasses must implement doCreateSession to provide their specific session implementation.
Finds an existing chat session by its conversation ID.
Gets all active conversation IDs.
Gets the current number of active sessions.
Gets the maximum number of sessions that can be maintained.
Removes a chat session from the chatbot.