Repository navigation
Expand file tree
/
Copy pathContentModRest.http
More file actions
51 lines (41 loc) · 2.56 KB
/
Copy pathContentModRest.http
File metadata and controls
51 lines (41 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
################################################
# DEPRECATED - Content Moderation - DEPRECATED #
################################################
# *********************************************************************************
# ******************************** CAUTION **************************************
# Content Moderator will be retired in 2027
# Please use Content Safety & Azure AI Language instead
# *********************************************************************************
# *********************************************************************************
# Content Moderation with all-inclusive example provided by MSFT demos
# https://learn.microsoft.com/en-us/azure/ai-services/content-moderator/client-libraries?pivots=programming-language-rest-api
######################################
# Environment Variables Used in Demo #
######################################
# The following vars are better added to settings.json as ENVIRONMENT Variables
# @contentModRegion = Enter the Azure Translator region here. (e.g. westus2)
# @contentModEndpoint = https://api.cognitive.microsofttranslator.com
# DO NOT check in or commit keys in your repos!!
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# @contentModSubscription = Enter your Azure subscription Key Here
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# DO NOT check in or commit keys in your repos!!
######################################
# Explanation of classifications
# See complete list of classifications at https://learn.microsoft.com/en-us/azure/ai-services/content-moderator/text-moderation-api#classification
#
# The following classifications are returned in the response:
# 1. Category 1: Explicit - may contain content that is generally recognized as explicit
# 2. Category 2: Suggestive - may contain content that is suggestive in nature
# 3. Category 3: Offensive - may contain content that is generally offensive
######################################
POST {{contentModEndpoint}}/contentmoderator/moderate/v1.0/ProcessText/Screen?classify=True HTTP/1.1
Content-Type: text/plain
Ocp-Apim-Subscription-Key: {{contentModSubscription}}
Is this a crap email abcdef@abcd.com, phone: 6657789887, IP: 255.255.255.255, 1 Microsoft Way, Redmond, WA 98052
########
# A more simple example to screen
POST {{contentModEndpoint}}/contentmoderator/moderate/v1.0/ProcessText/Screen?classify=True HTTP/1.1
Content-Type: text/plain
Ocp-Apim-Subscription-Key: {{contentModSubscription}}
Why is the service so crappy at this State's DMV?