AI-Studio/app/MindWork AI Studio/Tools/Rust/SanitizePromptInjectionsResponse.cs
Sabrina-devops 902a01a4d0
Added a prompt injection detection (#857)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
2026-08-23 11:09:11 +02:00

13 lines
726 B
C#

using System.Text.Json.Serialization;
using AIStudio.Tools.Security;
namespace AIStudio.Tools.Rust;
/// <param name="SanitizedText">The content with the suspicious passages removed. Usable as it stands.</param>
/// <param name="Findings">The passages that were removed, capped by the runtime.</param>
/// <param name="RedactedCount">How many passages were removed in total, which may exceed the number of findings.</param>
public readonly record struct SanitizePromptInjectionsResponse(
[property: JsonPropertyName("sanitized_text")] string SanitizedText,
[property: JsonPropertyName("findings")] IReadOnlyList<PromptInjectionFinding> Findings,
[property: JsonPropertyName("redacted_count")] int RedactedCount);