nemoguardrails.library.privateai.request
Module for handling Private AI detection requests.
Module Contents
Functions
Data
API
async
Send a PII detection request to the Private AI API.
Parameters:
text
The text to analyze.
enabled_entities
List of entity types to detect.
server_endpoint
The API endpoint URL.
api_key
The API key for the Private AI service.
Returns:
The response from the Private AI API. See Private AI API reference for more details:
Raises:
ValueError: If api_key is missing for cloud API, if the API call fails, or if the response cannot be parsed as JSON.