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 or ImageContent. In the future, the list of Content types will expand to allow for more modalities (e.g. audio, video, etc.).
Optionally, user message can contain a name of the user. Be aware that not all models support names in UserMessage.