Class AbstractMessage
java.lang.Object
org.springframework.ai.chat.messages.AbstractMessage
- All Implemented Interfaces:
Message
- Direct Known Subclasses:
AssistantMessage
,ChatMessage
,FunctionMessage
,SystemMessage
,UserMessage
The AbstractMessage class is an abstract implementation of the Message interface. It
provides a base implementation for message content, media attachments, properties, and
message type.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected final MessageType
Additional options for the message to influence the response, not a generative map.protected final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractMessage
(MessageType messageType, String content) protected
AbstractMessage
(MessageType messageType, String textContent, List<Media> mediaData) protected
AbstractMessage
(MessageType messageType, String textContent, List<Media> mediaData, Map<String, Object> messageProperties) protected
AbstractMessage
(MessageType messageType, String content, Map<String, Object> messageProperties) protected
AbstractMessage
(MessageType messageType, org.springframework.core.io.Resource resource) protected
AbstractMessage
(MessageType messageType, org.springframework.core.io.Resource resource, Map<String, Object> messageProperties) -
Method Summary
-
Field Details
-
messageType
-
textContent
-
mediaData
-
properties
Additional options for the message to influence the response, not a generative map.
-
-
Constructor Details
-
AbstractMessage
-
AbstractMessage
protected AbstractMessage(MessageType messageType, String content, Map<String, Object> messageProperties) -
AbstractMessage
-
AbstractMessage
-
AbstractMessage
-
AbstractMessage
protected AbstractMessage(MessageType messageType, org.springframework.core.io.Resource resource, Map<String, Object> messageProperties)
-
-
Method Details
-
getContent
- Specified by:
getContent
in interfaceMessage
-
getMedia
-
getProperties
- Specified by:
getProperties
in interfaceMessage
-
getMessageType
- Specified by:
getMessageType
in interfaceMessage
-
hashCode
public int hashCode() -
equals
-