PromptTemplateConfig.AllowDangerouslySetContent Property

Definition

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

[System.Text.Json.Serialization.JsonPropertyName("allow_dangerously_set_content")]
public bool AllowDangerouslySetContent { get; set; }
[<System.Text.Json.Serialization.JsonPropertyName("allow_dangerously_set_content")>]
member this.AllowDangerouslySetContent : bool with get, set
Public Property AllowDangerouslySetContent As Boolean

Property Value

Attributes

Remarks

The default is false. When set to true the return values from functions only are 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