KernelPromptTemplateFactory.TryCreate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of IPromptTemplate from a PromptTemplateConfig.
public bool TryCreate (Microsoft.SemanticKernel.PromptTemplateConfig templateConfig, out Microsoft.SemanticKernel.IPromptTemplate? result);
abstract member TryCreate : Microsoft.SemanticKernel.PromptTemplateConfig * IPromptTemplate -> bool
override this.TryCreate : Microsoft.SemanticKernel.PromptTemplateConfig * IPromptTemplate -> bool
Public Function TryCreate (templateConfig As PromptTemplateConfig, ByRef result As IPromptTemplate) As Boolean
Parameters
- templateConfig
- PromptTemplateConfig
Prompt template configuration
- result
- IPromptTemplate
The created template, or null if the specified template format is not supported.
Returns
true if the format is supported and the template can be created; otherwise, false.