-
public final class ChatMessageA single message in a chat conversation.
Pass a list of these to Elo.loadAd to get a contextually relevant ad. A MessageRole.SUMMARY message should carry the id and createdAt of the turn it summarizes: create both when the turn happens and pass them through to whatever writes the summary later.
-
-
Constructor Summary
Constructors Constructor Description ChatMessage(MessageRole role, String content, String id, Instant createdAt)ChatMessage(MessageRole role, String content, String id)ChatMessage(MessageRole role, String content)
-
Method Summary
Modifier and Type Method Description final MessageRolegetRole()final StringgetContent()final StringgetId()final InstantgetCreatedAt()-
-
Constructor Detail
-
ChatMessage
ChatMessage(MessageRole role, String content, String id, Instant createdAt)
-
ChatMessage
ChatMessage(MessageRole role, String content, String id)
-
ChatMessage
ChatMessage(MessageRole role, String content)
-
-
Method Detail
-
getRole
final MessageRole getRole()
-
getContent
final String getContent()
-
getCreatedAt
final Instant getCreatedAt()
-
-
-
-