Package dev.langchain4j.data.message
Interface ChatMessage
- All Known Implementing Classes:
AiMessage,SystemMessage,ToolExecutionResultMessage,UserMessage
public interface ChatMessage
Represents a chat message.
Used together with
ChatLanguageModel and StreamingChatLanguageModel.- See Also:
-
Method Details
-
type
ChatMessageType type()The type of the message.- Returns:
- the type of the message
-
text
Deprecated, for removal: This API element is subject to removal in a future version.The text of the message.- Returns:
- the text of the message
-
SystemMessage,UserMessage,AiMessageandToolExecutionResultMessageinstead