Share via


KernelPromptTemplateFactory Class

Definition

Provides an implementation of IPromptTemplateFactory for the SemanticKernelTemplateFormat template format.

public sealed class KernelPromptTemplateFactory : Microsoft.SemanticKernel.IPromptTemplateFactory
type KernelPromptTemplateFactory = class
    interface IPromptTemplateFactory
Public NotInheritable Class KernelPromptTemplateFactory
Implements IPromptTemplateFactory
Inheritance
KernelPromptTemplateFactory
Implements

Remarks

This is used as the default IPromptTemplateFactory when no other factory is provided.

Constructors

KernelPromptTemplateFactory(ILoggerFactory)

Initializes a new instance of the KernelPromptTemplateFactory class.

Properties

AllowDangerouslySetContent

Gets or sets a value indicating whether to allow potentially dangerous content to be inserted into the prompt.

Methods

TryCreate(PromptTemplateConfig, IPromptTemplate)

Creates an instance of IPromptTemplate from a PromptTemplateConfig.

Extension Methods

Create(IPromptTemplateFactory, PromptTemplateConfig)

Creates an instance of IPromptTemplate from a PromptTemplateConfig.

Applies to