AICentral.Logging.PIIStripping
0.20.6-pullrequest0150-0003
See the version list below for details.
dotnet add package AICentral.Logging.PIIStripping --version 0.20.6-pullrequest0150-0003
NuGet\Install-Package AICentral.Logging.PIIStripping -Version 0.20.6-pullrequest0150-0003
<PackageReference Include="AICentral.Logging.PIIStripping" Version="0.20.6-pullrequest0150-0003" />
paket add AICentral.Logging.PIIStripping --version 0.20.6-pullrequest0150-0003
#r "nuget: AICentral.Logging.PIIStripping, 0.20.6-pullrequest0150-0003"
// Install AICentral.Logging.PIIStripping as a Cake Addin #addin nuget:?package=AICentral.Logging.PIIStripping&version=0.20.6-pullrequest0150-0003&prerelease // Install AICentral.Logging.PIIStripping as a Cake Tool #tool nuget:?package=AICentral.Logging.PIIStripping&version=0.20.6-pullrequest0150-0003&prerelease
AICentral.Logging.PIIStripping
An Asynchronous logger for use with (AICentral)[www.github.com/microsoft/aicentral]. This logger leverages the Azure Text Analytics API to strip prompts and responses of PII data.
Configuration
dotnet add package AICentral.Logging.PIIStripping
builder.Services.AddAICentral(
builder.Configuration,
additionalComponentAssemblies:
[
typeof(PIIStrippingLogger).Assembly,
]);
{
"AICentral": {
"GenericSteps": [
{
"Type": "PIIStrippingLogger",
"Name": "pii-stripping-logger",
"Properties": {
"UseManagedIdentities": "true|false",
"UserAssignedManagedIdentityId": "<id-or-blank>",
"StorageQueueConnectionString": "<storage-connection-string>",
"QueueName": "queue-to-write-to",
"TextAnalyticsEndpoint": "<text-analytics-uri>",
"TextAnalyticsKey": "<text-analytics-key-if-if-not-using-managed-identities>",
"CosmosDatabase": "cosmos-database-to-log-to",
"CosmosContainer": "container-to-log-to",
"CosmosConnectionString": "<cosmos-connection-string-if-not-using-managed-identities>",
"StorageUri": "<uri-to-storage-if-using-managed-identities>",
"PIIStrippingDisabled": false
}
}
]
}
}
How does it work?
This logger is a wrapper around the AICentral logger that uses the Text Analytics API to strip PII data from the prompts and responses before logging them to Cosmos. Log statements are initially written to an Azure Queue, and then read from the queue by a separate background service, that uses the Text Analytics API to strip PII data. The stripped log statements are then written to Cosmos.
The Container needs to have a partition key specified by '/id'.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- AICentral.Core (>= 0.20.3)
- Aspire.StackExchange.Redis (>= 8.0.2)
- Azure.AI.TextAnalytics (>= 5.3.0)
- Azure.Identity (>= 1.13.1)
- Azure.Storage.Queues (>= 12.18.0)
- Microsoft.Azure.Cosmos (>= 3.41.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.