Class MessageRole
java.lang.Object
com.azure.core.util.ExpandableStringEnum<MessageRole>
com.azure.ai.openai.assistants.models.MessageRole
- All Implemented Interfaces:
com.azure.core.util.ExpandableEnum<String>
The possible values for roles attributed to messages in a thread.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MessageRole
The role representing the assistant.static final MessageRole
The role representing the end-user. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageRole
fromString
(String name) Creates or finds a MessageRole from its string representation.static Collection
<MessageRole> values()
Gets known MessageRole values.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, getValue, hashCode, toString, values
-
Field Details
-
USER
The role representing the end-user. -
ASSISTANT
The role representing the assistant.
-
-
Constructor Details
-
MessageRole
Deprecated.Use thefromString(String)
factory method.Creates a new instance of MessageRole value.
-
-
Method Details
-
fromString
Creates or finds a MessageRole from its string representation.- Parameters:
name
- a name to look for.- Returns:
- the corresponding MessageRole.
-
values
Gets known MessageRole values.- Returns:
- known MessageRole values.
-
fromString(String)
factory method.