Class AssistantMessage
java.lang.Object
org.springframework.ai.chat.messages.AbstractMessage
org.springframework.ai.chat.messages.AssistantMessage
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
-
Field Summary
Fields inherited from class org.springframework.ai.chat.messages.AbstractMessage
MESSAGE_TYPE, messageType, metadata, textContent
-
Constructor Summary
ConstructorDescriptionAssistantMessage
(String content) AssistantMessage
(String content, Map<String, Object> properties) AssistantMessage
(String content, Map<String, Object> properties, List<AssistantMessage.ToolCall> toolCalls) -
Method Summary
Methods inherited from class org.springframework.ai.chat.messages.AbstractMessage
getContent, getMessageType, getMetadata
-
Constructor Details
-
AssistantMessage
-
AssistantMessage
-
AssistantMessage
-
-
Method Details
-
getToolCalls
-
hasToolCalls
public boolean hasToolCalls() -
equals
- Overrides:
equals
in classAbstractMessage
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractMessage
-
toString
-