Class UserMessage

java.lang.Object
dev.langchain4j.data.message.UserMessage
All Implemented Interfaces:
ChatMessage

public class UserMessage extends Object implements ChatMessage
Represents a message from a user, typically an end user of the application.
Depending on the supported modalities (text, image, audio, video, etc.) of the model, user messages can contain either a single text (a String) or multiple Contents, which can be either TextContent, ImageContent, AudioContent, VideoContent, or PdfFileContent.
Optionally, user message can contain a name of the user. Be aware that not all models support names in UserMessage.