Package com.azure.ai.openai.models
Class ChatRole
java.lang.Object
com.azure.core.util.ExpandableStringEnum<ChatRole>
com.azure.ai.openai.models.ChatRole
A description of the intended purpose of a message within a chat completions interaction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChatRoleThe role that provides responses to system-instructed, user-prompted input.static final ChatRoleThe role that provides function results for char completions.static final ChatRoleThe role that instructs or sets the behavior of the assistant.static final ChatRoleThe role that provides input for chat completions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatRolefromString(String name) Creates or finds a ChatRole from its string representation.static Collection<ChatRole>values()Gets known ChatRole values.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, hashCode, toString, values
-
Field Details
-
SYSTEM
The role that instructs or sets the behavior of the assistant. -
ASSISTANT
The role that provides responses to system-instructed, user-prompted input. -
USER
The role that provides input for chat completions. -
FUNCTION
The role that provides function results for char completions.
-
-
Constructor Details
-
ChatRole
Deprecated.Use thefromString(String)factory method.Creates a new instance of ChatRole value.
-
-
Method Details
-
fromString
Creates or finds a ChatRole from its string representation.- Parameters:
name- a name to look for.- Returns:
- the corresponding ChatRole.
-
values
Gets known ChatRole values.- Returns:
- known ChatRole values.
-
fromString(String)factory method.