Package com.hw.langchain.schema
Class BaseChatMessageHistory
java.lang.Object
com.hw.langchain.schema.BaseChatMessageHistory
- Direct Known Subclasses:
ChatMessageHistory
,DataBaseChatMessageHistory
,RedisChatMessageHistory
Base interface for chat message history, See `ChatMessageHistory` for default implementation.
- Author:
- HamaWhite
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAIMessage
(String message) Add an AI message to the storeabstract void
addMessage
(BaseMessage message) Add a self-created message to the storevoid
addUserMessage
(String message) Add a user message to the storeabstract void
clear()
Remove all messages from the store
-
Field Details
-
messages
-
-
Constructor Details
-
BaseChatMessageHistory
public BaseChatMessageHistory()
-
-
Method Details
-
addUserMessage
Add a user message to the store- Parameters:
message
-
-
addAIMessage
Add an AI message to the store -
addMessage
Add a self-created message to the store -
clear
public abstract void clear()Remove all messages from the store
-