public enum ChatRole extends Enum<ChatRole>
| Enum Constant and Description |
|---|
ASSISTANT
助理
|
SYSTEM
系统
|
TOOL
工具
|
USER
用户
|
| Modifier and Type | Method and Description |
|---|---|
static ChatRole |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ChatRole[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChatRole SYSTEM
public static final ChatRole USER
public static final ChatRole TOOL
public static final ChatRole ASSISTANT
public static ChatRole[] values()
for (ChatRole c : ChatRole.values()) System.out.println(c);
public static ChatRole valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2025. All rights reserved.