Enum CohereChatRequest.PromptTruncation

  • All Implemented Interfaces:
    BmcEnum, Serializable, Comparable<CohereChatRequest.PromptTruncation>
    Enclosing class:
    CohereChatRequest

    public static enum CohereChatRequest.PromptTruncation
    extends Enum<CohereChatRequest.PromptTruncation>
    implements BmcEnum
    Defaults to OFF.

    Dictates how the prompt will be constructed. With promptTruncation set to AUTO_PRESERVE_ORDER, some elements from chatHistory and documents will be dropped to construct a prompt that fits within the model’s context length limit. During this process the order of the documents and chat history will be preserved. With prompt_truncation set to OFF, no elements will be dropped.

    • Method Detail

      • values

        public static CohereChatRequest.PromptTruncation[] 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.PromptTruncation c : CohereChatRequest.PromptTruncation.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.PromptTruncation 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