Class AssistantMessage
java.lang.Object
org.springframework.ai.chat.messages.AbstractMessage
org.springframework.ai.chat.messages.AssistantMessage
- All Implemented Interfaces:
Message,Content,MediaContent
- Direct Known Subclasses:
DeepSeekAssistantMessage
Lets the generative know the content was generated as a response to the user. This role
indicates messages that the generative has previously generated in the conversation. By
including assistant messages in the series, you provide context to the generative about
prior exchanges in the conversation.
- Since:
- 1.0.0
- Author:
- Mark Pollack, Christian Tzolov
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.springframework.ai.chat.messages.AbstractMessage
MESSAGE_TYPE, messageType, metadata, textContent -
Constructor Summary
ConstructorsConstructorDescriptionAssistantMessage(String content) AssistantMessage(String content, Map<String, Object> properties) AssistantMessage(String content, Map<String, Object> properties, List<AssistantMessage.ToolCall> toolCalls) AssistantMessage(String content, Map<String, Object> properties, List<AssistantMessage.ToolCall> toolCalls, List<Media> media) -
Method Summary
Methods inherited from class org.springframework.ai.chat.messages.AbstractMessage
getMessageType, getMetadata, getTextMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.ai.content.Content
getMetadata, getText
-
Field Details
-
media
-
-
Constructor Details
-
AssistantMessage
-
AssistantMessage
-
AssistantMessage
-
AssistantMessage
-
-
Method Details
-
getToolCalls
-
hasToolCalls
public boolean hasToolCalls() -
getMedia
Description copied from interface:MediaContentGet the media associated with the content.- Specified by:
getMediain interfaceMediaContent
-
equals
- Overrides:
equalsin classAbstractMessage
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractMessage
-
toString
-