Class ChatMessage
java.lang.Object
com.redis.vl.extensions.messagehistory.ChatMessage
A single chat message exchanged between a user and an LLM.
Matches the Python ChatMessage model from redisvl.extensions.message_history.schema
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ChatMessage
public ChatMessage()
-
-
Method Details
-
toDict
Converts the ChatMessage to a Map suitable for storing in Redis.- Returns:
- Map representation of the message
-
fromDict
Creates a ChatMessage from a Map (typically from Redis).- Parameters:
data
- Map containing message fields- Returns:
- ChatMessage instance
-