Class UserMessage

  • All Implemented Interfaces:
    dev.langchain4j.data.message.ChatMessage

    
    public class UserMessage
     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.