PromptTemplateConfig Class
- java.
lang. Object - com.
microsoft. semantickernel. semanticfunctions. PromptTemplateConfig
- com.
public class PromptTemplateConfig
Metadata for a prompt template.
Field Summary
Modifier and Type | Field and Description |
---|---|
static final int |
CURRENT_SCHEMA
The current prompt template config schema version. |
static final java.lang.String |
DEFAULT_CONFIG_NAME
The default name for a prompt template config. |
static final java.lang.String |
SEMANTIC_KERNEL_TEMPLATE_FORMAT
The default template format for a prompt template config. |
Constructor Summary
Modifier | Constructor | Description |
---|---|---|
PromptTemplateConfig(PromptTemplateConfig promptTemplate) |
Copy constructor. |
|
PromptTemplateConfig(Integer schema, String name, String template, String templateFormat, Set<PromptTemplateOption> promptTemplateOptions, String description, List<InputVariable> inputVariables, OutputVariable outputVariable, Map<String,PromptExecutionSettings> executionSettings) |
Constructor for a prompt template config |
|
protected | PromptTemplateConfig(String template) |
Constructor for a prompt template config |
protected | PromptTemplateConfig(String name, String template, String templateFormat, Set<PromptTemplateOption> promptTemplateOptions, String description, List<InputVariable> inputVariables, OutputVariable outputVariable, Map<String,PromptExecutionSettings> executionSettings) |
Constructor for a prompt template config |
Method Summary
Modifier and Type | Method and Description |
---|---|
static Builder |
builder()
Create a builder for a prompt template config. |
Builder |
copy()
Create a builder for a prompt template config which is a clone of the current object. |
static Builder |
defaultTemplateBuilder()
Create a builder for a prompt template config, where the constructed template will be considered the default to be used if no other config is selected. |
boolean | equals(Object obj) |
java.lang.String |
getDescription()
Get the description of the prompt template config. |
java.util.Map<java.lang.String,Prompt |
getExecutionSettings()
Get the prompt execution settings of the prompt template config. |
java.util.List<Input |
getInputVariables()
Get the input |
java.util.List<Input |
getKernelParametersMetadata()
Get the parameters metadata. |
Output |
getKernelReturnParameterMetadata()
Get the return parameter metadata. |
java.lang.String |
getName()
Get the name of the prompt template config. |
Output |
getOutputVariable()
Get the output variable of the prompt template config. |
java.util.Set<Prompt |
getPromptTemplateOptions()
Get the prompt template options of the prompt template config. |
int |
getSchema()
Get the schema version of the prompt template config. |
java.lang.String |
getTemplate()
Get the template of the prompt template config. |
java.lang.String |
getTemplateFormat()
Get the template format of the prompt template config. |
int | hashCode() |
static
Prompt |
parseFromJson(String json)
Deserialize the JSON string to a Prompt |
Methods inherited from java.lang.Object
Field Details
CURRENT_SCHEMA
public static final int CURRENT_SCHEMA
The current prompt template config schema version.
DEFAULT_CONFIG_NAME
public static final String DEFAULT_CONFIG_NAME
The default name for a prompt template config.
SEMANTIC_KERNEL_TEMPLATE_FORMAT
public static final String SEMANTIC_KERNEL_TEMPLATE_FORMAT
The default template format for a prompt template config.
Constructor Details
PromptTemplateConfig
public PromptTemplateConfig(PromptTemplateConfig promptTemplate)
Copy constructor.
Parameters:
PromptTemplateConfig
public PromptTemplateConfig(Integer schema, String name, String template, String templateFormat, Set
Constructor for a prompt template config
Parameters:
PromptTemplateConfig
protected PromptTemplateConfig(String template)
Constructor for a prompt template config
Parameters:
PromptTemplateConfig
protected PromptTemplateConfig(String name, String template, String templateFormat, Set
Constructor for a prompt template config
Parameters:
Method Details
builder
public static PromptTemplateConfig.Builder builder()
Create a builder for a prompt template config.
Returns:
copy
public PromptTemplateConfig.Builder copy()
Create a builder for a prompt template config which is a clone of the current object.
Returns:
defaultTemplateBuilder
public static PromptTemplateConfig.Builder defaultTemplateBuilder()
Create a builder for a prompt template config, where the constructed template will be considered the default to be used if no other config is selected.
Returns:
equals
public boolean equals(Object obj)
Overrides:
PromptTemplateConfig.equals(Object obj)Parameters:
getDescription
public String getDescription()
Get the description of the prompt template config.
Returns:
getExecutionSettings
public Map
Get the prompt execution settings of the prompt template config.
Returns:
getInputVariables
public List
Get the inputVariables of the prompt template config.
Returns:
getKernelParametersMetadata
public List
Get the parameters metadata.
Returns:
getKernelReturnParameterMetadata
public OutputVariable getKernelReturnParameterMetadata()
Get the return parameter metadata.
Returns:
getName
public String getName()
Get the name of the prompt template config.
Returns:
getOutputVariable
public OutputVariable getOutputVariable()
Get the output variable of the prompt template config.
Returns:
getPromptTemplateOptions
public Set
Get the prompt template options of the prompt template config.
Returns:
getSchema
public int getSchema()
Get the schema version of the prompt template config.
Returns:
getTemplate
public String getTemplate()
Get the template of the prompt template config.
Returns:
getTemplateFormat
public String getTemplateFormat()
Get the template format of the prompt template config.
Returns:
hashCode
public int hashCode()
Overrides:
PromptTemplateConfig.hashCode()parseFromJson
public static PromptTemplateConfig parseFromJson(String json)
Deserialize the JSON string to a PromptTemplateConfig.
Parameters:
Returns:
Throws: