PromptTemplateConfig.Builder Class
- java.
lang. Object - com.
microsoft. semantickernel. semanticfunctions. PromptTemplateConfig. Builder
- com.
public static class PromptTemplateConfig.Builder
Builder for a prompt template config.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Builder |
addInputVariable(InputVariable inputVariable)
Add an input variable to the prompt template config. |
| Builder |
addPromptTemplateOption(PromptTemplateOption option)
Set the prompt template options. |
|
Prompt |
build()
Build the prompt template config. |
| Builder |
withDescription(String description)
Set the description of the prompt template config. |
| Builder |
withExecutionSettings(Map<String,PromptExecutionSettings> executionSettings)
Set the prompt execution settings of the prompt template config. |
| Builder |
withInputVariables(List<InputVariable> inputVariables)
Set the input |
| Builder |
withName(String name)
Set the name of the prompt template config. |
| Builder |
withOutputVariable(OutputVariable<?> outputVariable)
Set the output variable of the prompt template config. |
| Builder |
withTemplate(String template)
Set the template of the prompt template config. |
| Builder |
withTemplateFormat(String templateFormat)
Set the template format of the prompt template config. |
Methods inherited from java.lang.Object
Method Details
addInputVariable
public PromptTemplateConfig.Builder addInputVariable(InputVariable inputVariable)
Add an input variable to the prompt template config.
Parameters:
Returns:
this builderaddPromptTemplateOption
public PromptTemplateConfig.Builder addPromptTemplateOption(PromptTemplateOption option)
Set the prompt template options.
Parameters:
Returns:
this builder.build
public PromptTemplateConfig build()
Build the prompt template config.
Returns:
withDescription
public PromptTemplateConfig.Builder withDescription(String description)
Set the description of the prompt template config.
Parameters:
Returns:
this builderwithExecutionSettings
public PromptTemplateConfig.Builder withExecutionSettings(Map
Set the prompt execution settings of the prompt template config.
Parameters:
Returns:
this builderwithInputVariables
public PromptTemplateConfig.Builder withInputVariables(List
Set the inputVariables of the prompt template config.
Parameters:
Returns:
this builderwithName
public PromptTemplateConfig.Builder withName(String name)
Set the name of the prompt template config.
Parameters:
Returns:
this builderwithOutputVariable
public PromptTemplateConfig.Builder withOutputVariable(OutputVariable outputVariable)
Set the output variable of the prompt template config.
Parameters:
Returns:
this builderwithTemplate
public PromptTemplateConfig.Builder withTemplate(String template)
Set the template of the prompt template config.
Parameters:
Returns:
this builderwithTemplateFormat
public PromptTemplateConfig.Builder withTemplateFormat(String templateFormat)
Set the template format of the prompt template config.
Parameters:
Returns:
this builder