Partager via


LiquidPromptTemplateFactory.TryCreate Method

Definition

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.

Implements

Applies to