ChatRole Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. ai. openai. models. ChatRole
- com.
- com.
public final class ChatRole
extends ExpandableStringEnum<ChatRole>
A description of the intended purpose of a message within a chat completions interaction.
Field Summary
Modifier and Type | Field and Description |
---|---|
static final
Chat |
ASSISTANT
The role that provides responses to system-instructed, user-prompted input. |
static final
Chat |
FUNCTION
The role that provides function results for chat completions. |
static final
Chat |
SYSTEM
The role that instructs or sets the behavior of the assistant. |
static final
Chat |
TOOL
The role that represents extension tool activity within a chat completions operation. |
static final
Chat |
USER
The role that provides input for chat completions. |
Constructor Summary
Constructor | Description |
---|---|
ChatRole() |
Deprecated
Use the fromString(String name) factory method.
Creates a new instance of Chat |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Chat |
fromString(String name)
Creates or finds a Chat |
static
Collection<Chat |
values()
Gets known Chat |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
ASSISTANT
public static final ChatRole ASSISTANT
The role that provides responses to system-instructed, user-prompted input.
FUNCTION
public static final ChatRole FUNCTION
The role that provides function results for chat completions.
SYSTEM
public static final ChatRole SYSTEM
The role that instructs or sets the behavior of the assistant.
TOOL
public static final ChatRole TOOL
The role that represents extension tool activity within a chat completions operation.
USER
public static final ChatRole USER
The role that provides input for chat completions.
Constructor Details
ChatRole
@Deprecated
public ChatRole()
Deprecated
Creates a new instance of ChatRole value.
Method Details
fromString
public static ChatRole fromString(String name)
Creates or finds a ChatRole from its string representation.
Parameters:
Returns:
values
public static Collection
Gets known ChatRole values.
Returns:
Applies to
Azure SDK for Java