Files
llm-pii-poc/tests/PiiRedaction.Core.Tests/TestSupport/FakeOnnxNerModelRunner.cs
Bilal Nazer Ali dfc81dea28 Add PII redaction POC for secure LLM prompting.
Implements detect-redact-sanitize pipeline with regex, domain rules, and ONNX NER before the LLM boundary, plus NUnit tests and Xenovex push documentation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 13:05:07 +05:30

20 lines
511 B
C#

using PiiRedaction.Core.Detection;
using PiiRedaction.Core.Models;
namespace PiiRedaction.Core.Tests.TestSupport;
public sealed class FakeOnnxNerModelRunner : IOnnxNerModelRunner
{
public bool IsModelAvailable { get; set; }
public IReadOnlyList<PiiEntity> EntitiesToReturn { get; set; } = [];
public string? LastPredictedText { get; private set; }
public IReadOnlyList<PiiEntity> PredictEntities(string text)
{
LastPredictedText = text;
return EntitiesToReturn;
}
}