Package com.azure.ai.openai.models
Class ChatMessage
java.lang.Object
com.azure.ai.openai.models.ChatMessage
A single, role-attributed message within a chat completion interaction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the content property: The text associated with this message payload.getRole()Get the role property: The role associated with this message payload.setContent(String content) Set the content property: The text associated with this message payload.
-
Constructor Details
-
ChatMessage
Creates an instance of ChatMessage class.- Parameters:
role- the role value to set.
-
-
Method Details
-
getRole
Get the role property: The role associated with this message payload.- Returns:
- the role value.
-
getContent
Get the content property: The text associated with this message payload.- Returns:
- the content value.
-
setContent
Set the content property: The text associated with this message payload.- Parameters:
content- the content value to set.- Returns:
- the ChatMessage object itself.
-