Enum CohereMessageV2.Role
- java.lang.Object
-
- java.lang.Enum<CohereMessageV2.Role>
-
- com.oracle.bmc.generativeaiinference.model.CohereMessageV2.Role
-
- All Implemented Interfaces:
BmcEnum,Serializable,Comparable<CohereMessageV2.Role>
- Enclosing class:
- CohereMessageV2
public static enum CohereMessageV2.Role extends Enum<CohereMessageV2.Role> implements BmcEnum
To identify who the message is coming from, a role is associated to each message.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AssistantSystemToolUnknownEnumValueThis value is used if a service returns a value for this enum that is not recognized by this version of the SDK.User
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CohereMessageV2.Rolecreate(String key)StringgetValue()static CohereMessageV2.RolevalueOf(String name)Returns the enum constant of this type with the specified name.static CohereMessageV2.Role[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Assistant
public static final CohereMessageV2.Role Assistant
-
User
public static final CohereMessageV2.Role User
-
System
public static final CohereMessageV2.Role System
-
Tool
public static final CohereMessageV2.Role Tool
-
UnknownEnumValue
public static final CohereMessageV2.Role UnknownEnumValue
This value is used if a service returns a value for this enum that is not recognized by this version of the SDK.
-
-
Method Detail
-
values
public static CohereMessageV2.Role[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CohereMessageV2.Role c : CohereMessageV2.Role.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CohereMessageV2.Role valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
create
public static CohereMessageV2.Role create(String key)
-
-