You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/content-safety/includes/quickstarts/rest-quickstart-custom-categories.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: pafarley
12
12
## Prerequisites
13
13
14
14
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
15
-
* Once you have your Azure subscription, <ahref="https://aka.ms/acs-create"title="Create a Content Safety resource"target="_blank">create a Content Safety resource</a> in the Azure portal to get your key and endpoint. Enter a unique name for your resource, select your subscription, and select a resource group, [supported region](./overview.md#region-availability), and supported pricing tier. Then select **Create**.
15
+
* Once you have your Azure subscription, <ahref="https://aka.ms/acs-create"title="Create a Content Safety resource"target="_blank">create a Content Safety resource</a> in the Azure portal to get your key and endpoint. Enter a unique name for your resource, select your subscription, and select a resource group, [supported region](../overview.md#region-availability), and supported pricing tier. Then select **Create**.
16
16
* The resource takes a few minutes to deploy. After it finishes, Select **go to resource**. In the left pane, under **Resource Management**, select **Subscription Key and Endpoint**. Copy the endpoint and either of the key values to a temporary location for later use.
17
17
* Also [create an Azure blob storage container](https://ms.portal.azure.com/#create/Microsoft.StorageAccount-ARM) where you'll keep your training annotation file.
18
18
* One of the following installed:
@@ -25,7 +25,7 @@ ms.author: pafarley
25
25
To train a custom category, you need example text data that represents the category you want to detect. In this guide, you can use sample data. The provided annotation file contains text prompts about survival advice in camping/wilderness situations. The trained model will learn to detect this type of content in new text data.
26
26
27
27
> [!TIP]
28
-
> For tips on creating your own data set, see the [How-to guide](./how-to/custom-categories.md#prepare-your-training-data).
28
+
> For tips on creating your own data set, see the [How-to guide](../how-to/custom-categories.md#prepare-your-training-data).
29
29
30
30
1. Download the [sample text data file](https://github.com/Azure-Samples/cognitive-services-sample-data-files/blob/master/ContentSafety/survival-advice.jsonl) from the GitHub repository.
31
31
1. Upload the _.jsonl_ file to your Azure Storage account blob container. Then copy the blob URL to a temporary location for later use.
@@ -36,7 +36,7 @@ For example, your blob URL cannot be split into two layers, such as example/exam
Copy file name to clipboardExpand all lines: articles/ai-services/content-safety/includes/quickstarts/rest-quickstart-groundedness.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,13 @@ ms.author: pafarley
14
14
## Prerequisites
15
15
16
16
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/)
17
-
* Once you have your Azure subscription, <ahref="https://aka.ms/acs-create"title="Create a Content Safety resource"target="_blank">create a Content Safety resource </a> in the Azure portal to get your key and endpoint. Enter a unique name for your resource, select your subscription, and select a resource group, [supported region](./overview.md#region-availability), and supported pricing tier. Then select **Create**.
17
+
* Once you have your Azure subscription, <ahref="https://aka.ms/acs-create"title="Create a Content Safety resource"target="_blank">create a Content Safety resource </a> in the Azure portal to get your key and endpoint. Enter a unique name for your resource, select your subscription, and select a resource group, [supported region](../overview.md#region-availability), and supported pricing tier. Then select **Create**.
18
18
* The resource takes a few minutes to deploy. After it does, go to the new resource. In the left pane, under **Resource Management**, select **API Keys and Endpoints**. Copy one of the subscription key values and endpoint to a temporary location for later use.
19
19
* (Optional) If you want to use the _reasoning_ feature, create an Azure OpenAI Service resource with a GPT model deployed.
20
20
*[cURL](https://curl.haxx.se/) or [Python](https://www.python.org/downloads/) installed.
21
21
22
22
## Authentication
23
-
For enhanced security, you need to use Managed Identity (MI) to manage access to your resources, for more details, please refer to [Security](./overview.md#security).
23
+
For enhanced security, you need to use Managed Identity (MI) to manage access to your resources, for more details, please refer to [Security](../overview.md#security).
24
24
25
25
## Check groundedness without reasoning
26
26
@@ -130,7 +130,7 @@ The parameters in the request body are defined in this table:
130
130
| **qna** | (Optional) Holds QnA data when the task type is `QnA`. | String |
131
131
| - `query` | (Optional) This represents the question in a QnA task. Character limit: 7,500. | String |
132
132
| **text** | (Required) The LLM output text to be checked. Character limit: 7,500. | String |
133
-
| **groundingSources** | (Required) Uses an array of grounding sources to validate AI-generated text. See [Input requirements](./overview.md#input-requirements) for limits. | String array |
133
+
| **groundingSources** | (Required) Uses an array of grounding sources to validate AI-generated text. See [Input requirements](../overview.md#input-requirements) for limits. | String array |
134
134
| **reasoning** | (Optional) Specifies whether to use the reasoning feature. The default value is `false`. If `true`, you need to bring your own Azure OpenAI GPT4o (0513, 0806 version) to provide an explanation. Be careful: using reasoning increases the processing time.| Boolean |
135
135
136
136
### Interpret the API response
@@ -287,7 +287,7 @@ The parameters in the request body are defined in this table:
287
287
|**qna**| (Optional) Holds QnA data when the task type is `QnA`. | String |
288
288
| - `query`| (Optional) This represents the question in a QnA task. Character limit: 7,500. | String |
289
289
|**text**| (Required) The LLM output text to be checked. Character limit: 7,500. | String |
290
-
|**groundingSources**| (Required) Uses an array of grounding sources to validate AI-generated text. See [Input requirements](./overview.md#input-requirements) for limits, | String array |
290
+
|**groundingSources**| (Required) Uses an array of grounding sources to validate AI-generated text. See [Input requirements](../overview.md#input-requirements) for limits, | String array |
291
291
|**reasoning**| (Optional) Set to `true`, the service uses Azure OpenAI resources to provide an explanation. Be careful: using reasoning increases the processing time and incurs extra fees.| Boolean |
292
292
|**llmResource**| (Required) If you want to use your own Azure OpenAI GPT4o (0513, 0806 version) resource to enable reasoning, add this field and include the subfields for the resources used. | String |
293
293
| - `resourceType `| Specifies the type of resource being used. Currently it only allows `AzureOpenAI`. We only support Azure OpenAI GPT4o (0513, 0806 version) resources and do not support other GPT types. | Enum|
@@ -441,7 +441,7 @@ The parameters in the request body are defined in this table:
441
441
|**qna**| (Optional) Holds QnA data when the task type is `QnA`. | String |
442
442
| - `query`| (Optional) This represents the question in a QnA task. Character limit: 7,500. | String |
443
443
|**text**| (Required) The LLM output text to be checked. Character limit: 7,500. | String |
444
-
|**groundingSources**| (Required) Uses an array of grounding sources to validate AI-generated text. See [Input requirements](./overview.md#input-requirements) for limits. | String Array |
444
+
|**groundingSources**| (Required) Uses an array of grounding sources to validate AI-generated text. See [Input requirements](../overview.md#input-requirements) for limits. | String Array |
445
445
|**correction**| (Optional) Set to `true`, the service uses Azure OpenAI resources to provide the corrected text, ensuring consistency with the grounding sources. Be careful: using correction increases the processing time and incurs extra fees.| Boolean |
446
446
|**llmResource**| (Required) If you want to use your own Azure OpenAI GPT4o (0513, 0806 version) resource to enable reasoning, add this field and include the subfields for the resources used. | String |
447
447
| - `resourceType `| Specifies the type of resource being used. Currently it only allows `AzureOpenAI`. We only support Azure OpenAI GPT4o (0513, 0806 version) resources and do not support other GPT types. | Enum|
Copy file name to clipboardExpand all lines: articles/ai-services/content-safety/includes/quickstarts/rest-quickstart-protected-material-code.md
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The following section walks through a sample request with cURL. Paste the comman
25
25
1. Replace `<your_subscription_key>` with one of the keys that come with your resource.
26
26
1. Optionally, replace the `"code"` field in the body with your own Code you'd like to analyze.
27
27
> [!TIP]
28
-
> See [Input requirements](./overview.md#input-requirements) for maximum Code length limitations. Protected material detection is meant to be run on LLM completions, not user prompts.
28
+
> See [Input requirements](../overview.md#input-requirements) for maximum Code length limitations. Protected material detection is meant to be run on LLM completions, not user prompts.
29
29
30
30
```shell
31
31
curl --location --request POST '<endpoint>/contentsafety/text:detectProtectedMaterialForCode?api-version=2024-09-15-preview' \
@@ -95,11 +95,6 @@ The JSON fields in the output are defined here:
95
95
96
96
If you want to clean up and remove an Azure AI services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
Copy file name to clipboardExpand all lines: articles/ai-services/content-safety/includes/quickstarts/rest-quickstart-protected-material-text.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The following section walks through a sample request with cURL. Paste the comman
25
25
1. Replace `<your_subscription_key>` with one of the keys that come with your resource.
26
26
1. Optionally, replace the `"text"` field in the body with your own text you'd like to analyze.
27
27
> [!TIP]
28
-
> See [Input requirements](./overview.md#input-requirements) for maximum text length limitations. Protected material detection is meant to be run on LLM completions, not user prompts.
28
+
> See [Input requirements](../overview.md#input-requirements) for maximum text length limitations. Protected material detection is meant to be run on LLM completions, not user prompts.
29
29
30
30
```shell
31
31
curl --location --request POST '<endpoint>/contentsafety/text:detectProtectedMaterial?api-version=2024-09-01' \
@@ -79,5 +79,5 @@ The JSON fields in the output are defined here:
79
79
80
80
If you want to clean up and remove an Azure AI services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it.
0 commit comments