Enum CohereChatRequestV2.ToolsChoice

  • All Implemented Interfaces:
    BmcEnum, Serializable, Comparable<CohereChatRequestV2.ToolsChoice>
    Enclosing class:
    CohereChatRequestV2

    public static enum CohereChatRequestV2.ToolsChoice
    extends Enum<CohereChatRequestV2.ToolsChoice>
    implements BmcEnum
    Used to control whether or not the model will be forced to use a tool when answering.

    When REQUIRED is specified, the model will be forced to use at least one of the user-defined tools, and the tools parameter must be passed in the request. When NONE is specified, the model will be forced not to use one of the specified tools, and give a direct response. If tool_choice isn\u2019t specified, then the model is free to choose whether to use the specified tools or not. Note:This parameter is only compatible with models Command-r7b and newer.

    • Method Detail

      • values

        public static CohereChatRequestV2.ToolsChoice[] 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 (CohereChatRequestV2.ToolsChoice c : CohereChatRequestV2.ToolsChoice.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CohereChatRequestV2.ToolsChoice 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