Added a prompt injection detection (#857)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Sabrina-devopsandThorsten Sommer authored and GitHub committed 2026-08-23 11:09:11 +02:00
1 parent d3163badd9
commit 902a01a4d0
55 files changed
+5598 -70

No files matched your search

@@ -0,0 +1,17 @@
namespace AIStudio.Tools.Security;
/// <summary>
/// Asks the UI to tell the user what was filtered out of the content they just used.
/// </summary>
/// <remarks>
/// Carries every result of one user action rather than a single one. Attaching twenty
/// documents at once must produce one dialog listing all of them, not twenty dialogs.
/// </remarks>
/// <param name="Results">What was filtered, per piece of content.</param>
public sealed record PromptInjectionAlertMessage(IReadOnlyList<PromptInjectionScanResult> Results)
{
/// <summary>
/// Gets the total number of filtered passages across all content.
/// </summary>
public int TotalRedactedCount => this.Results.Sum(result => result.RedactedCount);
}