Class AbstractMessage

java.lang.Object
org.springframework.ai.chat.messages.AbstractMessage
All Implemented Interfaces:
Message, Content
Direct Known Subclasses:
AssistantMessage, SystemMessage, ToolResponseMessage, UserMessage

public abstract class AbstractMessage extends Object implements Message
The AbstractMessage class is an abstract implementation of the Message interface. It provides a base implementation for message content, media attachments, metadata, and message type.
See Also:
  • Field Details

    • MESSAGE_TYPE

      public static final String MESSAGE_TYPE
      See Also:
    • messageType

      protected final MessageType messageType
    • textContent

      protected final String textContent
    • metadata

      protected final Map<String,Object> metadata
      Additional options for the message to influence the response, not a generative map.
  • Constructor Details

  • Method Details