Enum ContextOverflowAction

    • Method Detail

      • values

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

        public static ContextOverflowAction 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
      • initializeEncodingForContextLimit

        public void initializeEncodingForContextLimit​(String model,
                                                      @Nullable
                                                      Integer maxContextSize)
        Initialize encoding for given model.
        Parameters:
        model - The model to calculate tokens.
        maxContextSize - the context limit.
      • processTokensWithLimit

        @Nullable
        public String processTokensWithLimit​(String model,
                                             String input,
                                             @Nullable
                                             Integer maxContextSize)
        Process tokens with given context limit.
        Parameters:
        model - The model to calculate tokens.
        input - The input string.
        maxContextSize - the context limit.
        Returns:
        processed tokens or null if the tokens should be skipped.
      • getDescription

        public org.apache.flink.configuration.description.InlineElement getDescription()
        Specified by:
        getDescription in interface org.apache.flink.configuration.DescribedEnum
      • getAllValuesAndDescriptions

        public static String getAllValuesAndDescriptions()