Hi @敏华 李
I Understand that you are encountering an issue with custom categories. The error message "sampleBlobUrl] only supports jsonl extension
means that the Azure AI Content Safety custom categories feature expects the sample data you provide (via the sampleBlobUrl field) to be a file in the JSON Lines (.jsonl
) format, not any other file type.
How to Fill the sampleBlobUrl
Field Correctly
- Prepare your training data as a
.jsonl
file. Each line in this file should be a separate JSON object representing a sample (for text categories, each sample is a text string and its label).
Upload this .jsonl
file to an Azure Blob Storage container.
Use the direct URL to this .jsonl
file as the value for sampleBlobUrl
when creating the custom category.
Example
Suppose your Azure Blob Storage container is called training-data
and your file is named my-category-samples.jsonl
. The URL might look like.
https://<your-storage-account>.blob.core.windows.net/training-data/my-category-samples.jsonl
You would use this URL as the value for sampleBlobUrl
in your API request or in the portal.
File Format Details
The file must have the .jsonl
extension.
Each line should be a valid JSON object.
- For text categories, a line might look like:
{"text": "example content", "label": "positive"}
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.