Skip to content

Commit

Permalink
Detect all private ai pii entities by default
Browse files Browse the repository at this point in the history
  • Loading branch information
letmerecall committed Oct 22, 2024
1 parent 824337a commit 2e64d1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion docs/user_guides/community/privateai.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rails:
server_endpoint: http://your-privateai-api-endpoint/process/text # Replace this with your Private AI process text endpoint
api_key: your-privateai-api-key # Optional: Not needed for the containerized version
input:
entities:
entities: # If no entity is specified here, all supported entities will be detected by default.
- NAME_FAMILY
- LOCATION_ADDRESS_STREET
- EMAIL_ADDRESS
Expand Down
3 changes: 0 additions & 3 deletions nemoguardrails/library/privateai/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ async def detect_pii(source: str, text: str, config: RailsConfig):
"retrieval",
], f"Private AI can only be defined in the input, output and retrieval flows. The current flow {source} is not allowed."

if len(pai_config.input.entities) == 0:
return False

entity_detected = await private_ai_detection_request(
text,
getattr(pai_config, source).entities,
Expand Down

0 comments on commit 2e64d1f

Please sign in to comment.