Enum PromptTemplateOption

    • Enum Constant Detail

      • ALLOW_CONTEXT_VARIABLE_METHOD_CALLS_UNSAFE

        public static final PromptTemplateOption ALLOW_CONTEXT_VARIABLE_METHOD_CALLS_UNSAFE
        Allow methods on objects provided as arguments to an invocation, to be invoked when rendering a template and its return value used. Typically, this would be used to call a getter on an object i.e. {{#each users}} {{userName}} {{/each}} on a handlebars template will call the method getUserName() on each object in users.

        WARNING: If this option is used, ensure that your template is trusted, and that objects added as arguments to an invocation, do not contain methods that are unsafe to be invoked when rendering a template.

    • Method Detail

      • values

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

        public static PromptTemplateOption 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