Skip to contents

Creates a guardrail provider that sends scanned text to a caller-managed Presidio Analyzer HTTP service. The adapter is opt-in and transmits content only when a scan using it runs.

Usage

presidio_provider(
  endpoint,
  language = "en",
  entities = NULL,
  min_score = 0.5,
  on_error = c("block", "skip"),
  timeout_seconds = 10,
  show_stats = FALSE
)

Arguments

endpoint

Scalar URL for a Presidio /analyze endpoint.

language

Scalar language code sent to Presidio.

entities

Optional character vector of entity types to request.

min_score

Minimum confidence from 0 to 1 to retain.

on_error

Whether adapter failures create a blocking finding or warn and skip the adapter.

timeout_seconds

Positive request timeout in seconds.

show_stats

Show construction time and available usage metrics.

Value

A shieldr_provider for scanner_options().

Examples

presidio <- presidio_provider("http://127.0.0.1:5002/analyze")