Class UserMessage
java.lang.Object
nl.dannyj.mistral.models.completion.message.ChatMessage
nl.dannyj.mistral.models.completion.message.UserMessage
Represents a message with the 'user' role in a chat conversation.
User messages contain the input provided by the end-user.
-
Field Summary
Fields inherited from class nl.dannyj.mistral.models.completion.message.ChatMessage
content
-
Constructor Summary
ConstructorsConstructorDescriptionUserMessage
(@NonNull @NotEmpty List<ContentChunk> contentChunks) Constructs a new UserMessage with a list of content chunks (for multi-modal input).UserMessage
(@NonNull String textContent) Constructs a new UserMessage with simple text content. -
Method Summary
Methods inherited from class nl.dannyj.mistral.models.completion.message.ChatMessage
getContent, getTextContent
-
Constructor Details
-
UserMessage
Constructs a new UserMessage with simple text content.- Parameters:
textContent
- The text content for the user message. Cannot be null or empty.
-
UserMessage
Constructs a new UserMessage with a list of content chunks (for multi-modal input).- Parameters:
contentChunks
- The list of content chunks. Cannot be null or empty.
-
UserMessage
public UserMessage()
-
-
Method Details
-
getRole
Gets the role of this message.- Specified by:
getRole
in classChatMessage
- Returns:
- Always returns
MessageRole.USER
.
-
equals
-
canEqual
-
hashCode
public int hashCode()
-