mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 08:29:40 +00:00
Added a prompt injection detection (#857)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
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);
|
||||
}
|
||||
Reference in new issue
Block a user