Skip to content

Commit 444486b

Browse files
committed
fix code blocks
1 parent bee3d97 commit 444486b

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

articles/ai-services/content-safety/how-to/custom-categories-rapid.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ The following command creates an incident with a name and definition.
5252
curl --location --request PATCH 'https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview' \
5353
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
5454
--header 'Content-Type: application/json' \
55-
--data '{
56-
\"incidentName\": \"<text-incident-name>\",
57-
\"incidentDefinition\": \"string\"
58-
}'
55+
--data '{ \"incidentName\": \"<test-incident>\", \"incidentDefinition\": \"<string>\"}'
5956
```
6057

6158
#### [Python](#tab/python)
@@ -115,9 +112,9 @@ curl --location 'https://<endpoint>/contentsafety/text/incidents/<text-incident-
115112
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
116113
--header 'Content-Type: application/json' \
117114
--data-raw '{
118-
"IncidentSamples": [
119-
{ "text": "<text-example-1>"},
120-
{ "text": "<text-example-2>"},
115+
\"IncidentSamples\": [
116+
{ \"text\": \"<text-example-1>\"},
117+
{ \"text\": \"<text-example-2>\"},
121118
...
122119
]
123120
}'
@@ -198,9 +195,9 @@ curl --location 'https://<endpoint>/contentsafety/text:detectIncidents?api-versi
198195
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
199196
--header 'Content-Type: application/json' \
200197
--data '{
201-
"text": "<test-text>",
202-
"incidentNames": [
203-
"<text-incident-name>"
198+
\"text\": \"<test-text>\",
199+
\"incidentNames\": [
200+
\"<text-incident-name>\"
204201
]
205202
}'
206203
```
@@ -309,11 +306,11 @@ curl --location 'https://<endpoint>/contentsafety/image/incidents/<image-inciden
309306
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
310307
--header 'Content-Type: application/json' \
311308
--data '{
312-
"IncidentSamples": [
309+
\"IncidentSamples\": [
313310
{
314-
"image": {
315-
"content": "<base64-data>",
316-
"bloburl": "<your-blob-storage-url>.png"
311+
\"image\": {
312+
\"content\": \"<base64-data>\",
313+
\"bloburl\": \"<your-blob-storage-url>.png\"
317314
}
318315
}
319316
]
@@ -394,12 +391,12 @@ curl --location 'https://<endpoint>/contentsafety/image:detectIncidents?api-vers
394391
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
395392
--header 'Content-Type: application/json' \
396393
--data '{
397-
"image": {
398-
"url": "<your-blob-storage-url>/image.png",
394+
\"image\": {
395+
\"url\": \"<your-blob-storage-url>/image.png\",
399396
"content": "<base64-data>"
400397
},
401-
"incidentNames": [
402-
"<image-incident-name>"
398+
\"incidentNames\": [
399+
\"<image-incident-name>\"
403400
]
404401
}
405402
}'
@@ -588,8 +585,8 @@ curl --location 'https://<endpoint>/contentsafety/text/incidents/<text-incident-
588585
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
589586
--header 'Content-Type: application/json' \
590587
--data '{
591-
"IncidentSampleIds": [
592-
"<your-incident-sample-id>"
588+
\"IncidentSampleIds\": [
589+
\"<your-incident-sample-id>\"
593590
]
594591
}'
595592
```
@@ -769,8 +766,8 @@ curl --location 'https://<endpoint>/contentsafety/image/incidents/<image-inciden
769766
--header 'Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
770767
--header 'Content-Type: application/json' \
771768
--data '{
772-
"IncidentSampleIds": [
773-
"<your-incident-sample-id>"
769+
\"IncidentSampleIds\": [
770+
\"<your-incident-sample-id>\"
774771
]
775772
}'
776773
```

0 commit comments

Comments
 (0)