HandlebarsPromptTemplateFactory Class
- java.
lang. Object - com.
microsoft. semantickernel. semanticfunctions. HandlebarsPromptTemplateFactory
- com.
Implements
public class HandlebarsPromptTemplateFactory
implements PromptTemplateFactory
A factory for creating a HandlebarsPromptTemplate instance for a PromptTemplateConfig that uses the handlebars template format.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
| static final java.lang.String |
HANDLEBARS_TEMPLATE_FORMAT
The handlebars template format. |
Constructor Summary
| Constructor | Description |
|---|---|
| HandlebarsPromptTemplateFactory() |
Initializes a new instance of the HandlebarsPromptTemplateFactory class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Prompt |
tryCreate(PromptTemplateConfig templateConfig)
Create a prompt template, if possible, from the given configuration. |
Methods inherited from java.lang.Object
Field Details
HANDLEBARS_TEMPLATE_FORMAT
public static final String HANDLEBARS_TEMPLATE_FORMAT
The handlebars template format.
Constructor Details
HandlebarsPromptTemplateFactory
public HandlebarsPromptTemplateFactory()
Initializes a new instance of the HandlebarsPromptTemplateFactory class.
Method Details
tryCreate
public PromptTemplate tryCreate(PromptTemplateConfig templateConfig)
Create a prompt template, if possible, from the given configuration. If the PromptTemplateConfig is not supported, the method should throw an UnknownTemplateFormatException.
Parameters: