Enum CohereChatRequest.SafetyMode
- java.lang.Object
-
- java.lang.Enum<CohereChatRequest.SafetyMode>
-
- com.oracle.bmc.generativeaiinference.model.CohereChatRequest.SafetyMode
-
- All Implemented Interfaces:
BmcEnum
,Serializable
,Comparable<CohereChatRequest.SafetyMode>
- Enclosing class:
- CohereChatRequest
public static enum CohereChatRequest.SafetyMode extends Enum<CohereChatRequest.SafetyMode> implements BmcEnum
Used to select the safety instruction inserted into the prompt.When selected CONTEXTUAL mode, It is appropriate for wide-ranging interactions with fewer constraints on output while maintaining core protections by rejecting harmful or illegal suggestions. When selected STRICT mode, it aims to avoid all sensitive topics, such as violent or sexual acts and profanity. When selected OFF, the safety instruction will be omitted. Note: This parameter is only compatible with models Command R 08-2024, Command R+ 08-2024 and newer. Also, command-r7b-12-2024 only supports “CONTEXTUAL” and “STRICT” modes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Contextual
Off
Strict
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CohereChatRequest.SafetyMode
create(String key)
String
getValue()
static CohereChatRequest.SafetyMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static CohereChatRequest.SafetyMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Contextual
public static final CohereChatRequest.SafetyMode Contextual
-
Strict
public static final CohereChatRequest.SafetyMode Strict
-
Off
public static final CohereChatRequest.SafetyMode Off
-
-
Method Detail
-
values
public static CohereChatRequest.SafetyMode[] 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 (CohereChatRequest.SafetyMode c : CohereChatRequest.SafetyMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CohereChatRequest.SafetyMode 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 CohereChatRequest.SafetyMode create(String key)
-
-