Enum PromptTemplateOption
- java.lang.Object
-
- java.lang.Enum<PromptTemplateOption>
-
- com.microsoft.semantickernel.semanticfunctions.PromptTemplateOption
-
- All Implemented Interfaces:
Serializable,Comparable<PromptTemplateOption>
public enum PromptTemplateOption extends Enum<PromptTemplateOption>
Options to customize the behavior of a prompt.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW_CONTEXT_VARIABLE_METHOD_CALLS_UNSAFEAllow methods on objects provided as arguments to an invocation, to be invoked when rendering a template and its return value used.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PromptTemplateOptionvalueOf(String name)Returns the enum constant of this type with the specified name.static PromptTemplateOption[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 methodgetUserName()on each object inusers.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 nameNullPointerException- if the argument is null
-
-