View source: R/content-safety-extra.R
| foundry_moderate_image | R Documentation |
Analyze an image for harmful content with Azure AI Content Safety. image
can be a local file path or an HTTPS Azure Blob Storage URL.
foundry_moderate_image(
image,
categories = c("Hate", "Sexual", "SelfHarm", "Violence"),
output_type = c("FourSeverityLevels", "EightSeverityLevels"),
endpoint = NULL,
api_key = NULL,
api_version = "2024-09-01"
)
image |
Character. Local image path or HTTPS Azure Blob Storage URL. |
categories |
Character vector of harm categories. |
output_type |
Character. Severity level granularity. |
endpoint |
Character. Optional Content Safety endpoint. |
api_key |
Character. Optional Content Safety key. |
api_version |
Character. API version. Defaults to |
A tibble with one row per category and raw response payloads.
## Not run:
# Requires a configured Azure Content Safety endpoint and credentials,
# base64enc, and your own local image.png input file.
foundry_moderate_image("image.png")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.