Class UserMessage
java.lang.Object
org.springframework.ai.chat.messages.AbstractMessage
org.springframework.ai.chat.messages.UserMessage
- All Implemented Interfaces:
 Message,Content,MediaContent
A message of the type 'user' passed as input Messages with the user role are from the
 end-user or developer. They represent questions, prompts, or any input that you want
 the generative to respond to.
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsFields inherited from class org.springframework.ai.chat.messages.AbstractMessage
MESSAGE_TYPE, messageType, metadata, textContent - 
Constructor Summary
ConstructorsConstructorDescriptionUserMessage(String textContent) UserMessage(org.springframework.core.io.Resource resource)  - 
Method Summary
Methods inherited from class org.springframework.ai.chat.messages.AbstractMessage
equals, getMessageType, getMetadata, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.ai.content.Content
getMetadata 
- 
Field Details
- 
media
 
 - 
 - 
Constructor Details
- 
UserMessage
 - 
UserMessage
public UserMessage(org.springframework.core.io.Resource resource)  
 - 
 - 
Method Details
- 
toString
 - 
getText
Description copied from class:AbstractMessageGet the content of the message.- Specified by:
 getTextin interfaceContent- Overrides:
 getTextin classAbstractMessage- Returns:
 - the content of the message
 
 - 
getMedia
Description copied from interface:MediaContentGet the media associated with the content.- Specified by:
 getMediain interfaceMediaContent
 - 
copy
 - 
mutate
 - 
builder
 
 -