Package com.azure.ai.inference.models
Class ChatRole
java.lang.Object
com.azure.core.util.ExpandableStringEnum<ChatRole>
com.azure.ai.inference.models.ChatRole
- All Implemented Interfaces:
com.azure.core.util.ExpandableEnum<String>
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 instructs or sets the behavior of the assistant.static final ChatRoleThe role that represents extension tool activity within a chat completions operation.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, getValue, hashCode, toString, values
-
Field Details
-
SYSTEM
The role that instructs or sets the behavior of the assistant. -
USER
The role that provides input for chat completions. -
ASSISTANT
The role that provides responses to system-instructed, user-prompted input. -
TOOL
The role that represents extension tool activity within a chat completions operation.
-
-
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.