Partager via


LiquidPromptTemplateFactory.AllowDangerouslySetContent Property

Definition

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

public bool AllowDangerouslySetContent { get; init; }
member this.AllowDangerouslySetContent : bool with get, set
Public Property AllowDangerouslySetContent As Boolean

Property Value

Remarks

The default is false. When set to true then all input content added to templates is treated as safe content. For prompts which are being used with a chat completion service this should be set to false to protect against prompt injection attacks. When using other AI services e.g. Text-To-Image this can be set to true to allow for more complex prompts.

Applies to