Enum 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.

    • 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 name
        NullPointerException - if the argument is null