Skip to content

Commit 8c2373b

Browse files
authored
format rest-quickstart-text.md
1 parent 89c1d81 commit 8c2373b

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed

articles/ai-services/content-safety/includes/quickstarts/rest-quickstart-text.md

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ curl --location --request POST '<endpoint>/contentsafety/text:analyze?api-versio
3636
--header 'Content-Type: application/json' \
3737
--data-raw '{
3838
"text": "I hate you",
39-
"categories": [
40-
"Hate","Sexual","SelfHarm","Violence"
41-
],
42-
"blocklistNames": [
43-
"string"
44-
],
45-
"haltOnBlocklistHit": true,
46-
"outputType": "FourSeverityLevels"
39+
"categories": ["Hate", "Sexual", "SelfHarm", "Violence"],
40+
"blocklistNames": ["string"],
41+
"haltOnBlocklistHit": true,
42+
"outputType": "FourSeverityLevels"
4743
}'
4844
```
4945

@@ -68,12 +64,8 @@ See the following sample request body:
6864
```json
6965
{
7066
"text": "I hate you",
71-
"categories": [
72-
"Hate","Sexual","SelfHarm","Violence"
73-
],
74-
"blocklistNames": [
75-
"array"
76-
],
67+
"categories": ["Hate", "Sexual", "SelfHarm", "Violence"],
68+
"blocklistNames": ["array"],
7769
"haltOnBlocklistHit": false,
7870
"outputType": "FourSeverityLevels"
7971
}
@@ -96,21 +88,22 @@ You should see the text moderation results displayed as JSON data in the console
9688
}
9789
],
9890
"categoriesAnalysis": [
99-
{
100-
"category": "Hate",
101-
"severity": 2
102-
},
103-
{
104-
"category": "SelfHarm",
105-
"severity": 0
106-
},
107-
{
108-
"category": "Sexual",
109-
"severity": 0
110-
},
111-
{
112-
"category": "Violence",
113-
"severity": 0
91+
{
92+
"category": "Hate",
93+
"severity": 2
94+
},
95+
{
96+
"category": "SelfHarm",
97+
"severity": 0
98+
},
99+
{
100+
"category": "Sexual",
101+
"severity": 0
102+
},
103+
{
104+
"category": "Violence",
105+
"severity": 0
106+
}
114107
]
115108
}
116109
```

0 commit comments

Comments
 (0)