Class KernelPromptTemplateFactory
- java.lang.Object
-
- com.microsoft.semantickernel.semanticfunctions.KernelPromptTemplateFactory
-
- All Implemented Interfaces:
PromptTemplateFactory
public class KernelPromptTemplateFactory extends Object implements PromptTemplateFactory
Factory for creating prompt templates. This factory creates the appropriate prompt template based on the template format.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microsoft.semantickernel.semanticfunctions.PromptTemplateFactory
PromptTemplateFactory.UnknownTemplateFormatException
-
-
Constructor Summary
Constructors Constructor Description KernelPromptTemplateFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PromptTemplatetryCreate(PromptTemplateConfig templateConfig)Create a prompt template, if possible, from the given configuration.
-
-
-
Method Detail
-
tryCreate
public PromptTemplate tryCreate(@Nonnull PromptTemplateConfig templateConfig)
Description copied from interface:PromptTemplateFactoryCreate a prompt template, if possible, from the given configuration. If thePromptTemplateConfigis not supported, the method should throw anUnknownTemplateFormatException.- Specified by:
tryCreatein interfacePromptTemplateFactory- Parameters:
templateConfig- The configuration for the prompt template.- Returns:
- The prompt template.
- See Also:
PromptTemplateConfig.getTemplateFormat()
-
-