From 2a70f0ca5267348ec2742c33ef1ea3a37d73af62 Mon Sep 17 00:00:00 2001
From: awstools The size of the input text exceeds the limit. Use a smaller document. Amazon Comprehend can't process the language of the input text. For custom entity
- * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
- * For a list of supported languages,
+ * Amazon Comprehend can't process the language of the input text. For a list of supported languages,
* Supported languages in the Comprehend Developer Guide.
* The size of the input text exceeds the limit. Use a smaller document. Amazon Comprehend can't process the language of the input text. For custom entity
- * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
- * For a list of supported languages,
+ * Amazon Comprehend can't process the language of the input text. For a list of supported languages,
* Supported languages in the Comprehend Developer Guide.
* The size of the input text exceeds the limit. Use a smaller document. Amazon Comprehend can't process the language of the input text. For custom entity
- * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
- * For a list of supported languages,
+ * Amazon Comprehend can't process the language of the input text. For a list of supported languages,
* Supported languages in the Comprehend Developer Guide.
* The size of the input text exceeds the limit. Use a smaller document. Amazon Comprehend can't process the language of the input text. For custom entity
- * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
- * For a list of supported languages,
+ * Amazon Comprehend can't process the language of the input text. For a list of supported languages,
* Supported languages in the Comprehend Developer Guide.
* The size of the input text exceeds the limit. Use a smaller document. Amazon Comprehend can't process the language of the input text. For custom entity
- * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.
- * For a list of supported languages,
+ * Amazon Comprehend can't process the language of the input text. For a list of supported languages,
* Supported languages in the Comprehend Developer Guide.
* Custom classifier - a custom model that you have created and trained.
- * For input, you can provide plain text, a single-page document (PDF, Word, or image), or Textract API output.
- * For more information, see Custom classification in the Amazon Comprehend Developer Guide.
*
Prompt classifier - Amazon Comprehend provides a model for classifying prompts. + *
Prompt safety classifier - Amazon Comprehend provides a pre-trained model for classifying
+ * input prompts for generative AI applications.
* For input, you provide English plain text input.
- * For prompt classification, the response includes only the Classes
field.
- * For more information about prompt classifiers, see Prompt classifiers in the Amazon Comprehend Developer Guide.
Classes
field.
+ * For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide.
* If the system detects errors while processing a page in the input document,
- * the API response includes an entry in Errors
that describes the errors.
Errors
field that describes the errors.
* If the system detects a document-level error in your input document, the API returns an
* InvalidRequestException
error response.
* For details about this exception, see
diff --git a/clients/client-comprehend/src/commands/ContainsPiiEntitiesCommand.ts b/clients/client-comprehend/src/commands/ContainsPiiEntitiesCommand.ts
index b51bb5801e2d..58357c418abd 100644
--- a/clients/client-comprehend/src/commands/ContainsPiiEntitiesCommand.ts
+++ b/clients/client-comprehend/src/commands/ContainsPiiEntitiesCommand.ts
@@ -79,9 +79,7 @@ export interface ContainsPiiEntitiesCommandOutput extends ContainsPiiEntitiesRes
*
The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/CreateDocumentClassifierCommand.ts b/clients/client-comprehend/src/commands/CreateDocumentClassifierCommand.ts index c1b258fa3af8..296849f3e963 100644 --- a/clients/client-comprehend/src/commands/CreateDocumentClassifierCommand.ts +++ b/clients/client-comprehend/src/commands/CreateDocumentClassifierCommand.ts @@ -150,9 +150,7 @@ export interface CreateDocumentClassifierCommandOutput extends CreateDocumentCla * current request. * * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/CreateEntityRecognizerCommand.ts b/clients/client-comprehend/src/commands/CreateEntityRecognizerCommand.ts index 513feb2988b7..41997eaf734e 100644 --- a/clients/client-comprehend/src/commands/CreateEntityRecognizerCommand.ts +++ b/clients/client-comprehend/src/commands/CreateEntityRecognizerCommand.ts @@ -143,9 +143,7 @@ export interface CreateEntityRecognizerCommandOutput extends CreateEntityRecogni * current request. * * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/CreateFlywheelCommand.ts b/clients/client-comprehend/src/commands/CreateFlywheelCommand.ts index 98cfd58e5606..9957d79e65ab 100644 --- a/clients/client-comprehend/src/commands/CreateFlywheelCommand.ts +++ b/clients/client-comprehend/src/commands/CreateFlywheelCommand.ts @@ -146,9 +146,7 @@ export interface CreateFlywheelCommandOutput extends CreateFlywheelResponse, __M * current request. * * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectEntitiesCommand.ts b/clients/client-comprehend/src/commands/DetectEntitiesCommand.ts index f27f20b596c4..b1b2bf2b8e51 100644 --- a/clients/client-comprehend/src/commands/DetectEntitiesCommand.ts +++ b/clients/client-comprehend/src/commands/DetectEntitiesCommand.ts @@ -179,9 +179,7 @@ export interface DetectEntitiesCommandOutput extends DetectEntitiesResponse, __M *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectKeyPhrasesCommand.ts b/clients/client-comprehend/src/commands/DetectKeyPhrasesCommand.ts index 5c8b731e56f8..f56dc063bfb9 100644 --- a/clients/client-comprehend/src/commands/DetectKeyPhrasesCommand.ts +++ b/clients/client-comprehend/src/commands/DetectKeyPhrasesCommand.ts @@ -84,9 +84,7 @@ export interface DetectKeyPhrasesCommandOutput extends DetectKeyPhrasesResponse, *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectPiiEntitiesCommand.ts b/clients/client-comprehend/src/commands/DetectPiiEntitiesCommand.ts index 83418c3bdc0b..f14b8bc290f0 100644 --- a/clients/client-comprehend/src/commands/DetectPiiEntitiesCommand.ts +++ b/clients/client-comprehend/src/commands/DetectPiiEntitiesCommand.ts @@ -80,9 +80,7 @@ export interface DetectPiiEntitiesCommandOutput extends DetectPiiEntitiesRespons *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectSentimentCommand.ts b/clients/client-comprehend/src/commands/DetectSentimentCommand.ts index 4206159fabba..3733b41f679c 100644 --- a/clients/client-comprehend/src/commands/DetectSentimentCommand.ts +++ b/clients/client-comprehend/src/commands/DetectSentimentCommand.ts @@ -84,9 +84,7 @@ export interface DetectSentimentCommandOutput extends DetectSentimentResponse, _ *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectSyntaxCommand.ts b/clients/client-comprehend/src/commands/DetectSyntaxCommand.ts index 44111856b360..fe625135eb08 100644 --- a/clients/client-comprehend/src/commands/DetectSyntaxCommand.ts +++ b/clients/client-comprehend/src/commands/DetectSyntaxCommand.ts @@ -91,9 +91,7 @@ export interface DetectSyntaxCommandOutput extends DetectSyntaxResponse, __Metad *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectTargetedSentimentCommand.ts b/clients/client-comprehend/src/commands/DetectTargetedSentimentCommand.ts index 154aab0a7fed..4cd03489af8d 100644 --- a/clients/client-comprehend/src/commands/DetectTargetedSentimentCommand.ts +++ b/clients/client-comprehend/src/commands/DetectTargetedSentimentCommand.ts @@ -103,9 +103,7 @@ export interface DetectTargetedSentimentCommandOutput extends DetectTargetedSent *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/DetectToxicContentCommand.ts b/clients/client-comprehend/src/commands/DetectToxicContentCommand.ts index 54eb8d0c0486..9488bd5d14b0 100644 --- a/clients/client-comprehend/src/commands/DetectToxicContentCommand.ts +++ b/clients/client-comprehend/src/commands/DetectToxicContentCommand.ts @@ -42,10 +42,9 @@ export interface DetectToxicContentCommandOutput extends DetectToxicContentRespo /** * @public *Performs toxicity analysis on the list of text strings that you provide as input. - * The analysis uses the order of strings in the list to determine context when predicting toxicity. * The API response contains a results list that matches the size of the input list. - * For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide - *
+ * For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide. + * * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -94,9 +93,7 @@ export interface DetectToxicContentCommandOutput extends DetectToxicContentRespo *The size of the input text exceeds the limit. Use a smaller document.
* * @throws {@link UnsupportedLanguageException} (client fault) - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
* diff --git a/clients/client-comprehend/src/commands/StartDocumentClassificationJobCommand.ts b/clients/client-comprehend/src/commands/StartDocumentClassificationJobCommand.ts index 9d08d104c6d1..4445c896d62f 100644 --- a/clients/client-comprehend/src/commands/StartDocumentClassificationJobCommand.ts +++ b/clients/client-comprehend/src/commands/StartDocumentClassificationJobCommand.ts @@ -42,7 +42,7 @@ export interface StartDocumentClassificationJobCommandOutput /** * @public - *Starts an asynchronous document classification job. Use the + *
Starts an asynchronous document classification job using a custom classification model. Use the
* DescribeDocumentClassificationJob
* operation to track the progress of the job.
Provides additional detail about why the request failed:
- *Document size is too large - Check the size of your file and resubmit the request.
- *Document type is not supported - Check the file type and resubmit the request.
- *Too many pages in the document - Check the number of pages in your file and resubmit the request.
- *Access denied to Amazon Textract - Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
- *Provides additional detail about why the request failed.
*/ export interface InvalidRequestDetail { /** * @public - *Reason code is INVALID_DOCUMENT
.
Reason codes include the following values:
+ *DOCUMENT_SIZE_EXCEEDED - Document size is too large. Check the size of your file and resubmit the request.
+ *UNSUPPORTED_DOC_TYPE - Document type is not supported. Check the file type and resubmit the request.
+ *PAGE_LIMIT_EXCEEDED - Too many pages in the document. Check the number of pages in your file and resubmit the request.
+ *TEXTRACT_ACCESS_DENIED - Access denied to Amazon Textract. Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
+ *NOT_TEXTRACT_JSON - Document is not Amazon Textract JSON format. Verify the format and resubmit the request.
+ *MISMATCHED_TOTAL_PAGE_COUNT - Check the number of pages in your file and resubmit the request.
+ *INVALID_DOCUMENT - Invalid document. Check the file and resubmit the request.
+ *Provides additional detail about why the request failed:
- *Document size is too large - Check the size of your file and resubmit the request.
- *Document type is not supported - Check the file type and resubmit the request.
- *Too many pages in the document - Check the number of pages in your file and resubmit the request.
- *Access denied to Amazon Textract - Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
- *Provides additional detail about why the request failed.
*/ Detail?: InvalidRequestDetail; /** @@ -588,9 +583,7 @@ export interface BatchDetectEntitiesResponse { /** * @public - *Amazon Comprehend can't process the language of the input text. For custom entity - * recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted. - * For a list of supported languages, + *
Amazon Comprehend can't process the language of the input text. For a list of supported languages, * Supported languages in the Comprehend Developer Guide. *
*/ @@ -1573,11 +1566,11 @@ export interface DocumentReaderConfig { *
- * TABLES
- Returns information about any tables that are detected in the input document.
TABLES
- Returns additional information about any tables that are detected in the input document.
*
- * FORMS
- Returns information and the data from any forms that are detected in the input document.
FORMS
- Returns additional information about any forms that are detected in the input document.
* The Amazon Resource Number (ARN) of the endpoint.
- *For prompt classification, Amazon Comprehend provides the endpoint ARN: zzz
.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide + *
*For custom classification, you create an endpoint for your custom model. For more information, * see Using Amazon Comprehend endpoints.
*/ @@ -1609,7 +1603,7 @@ export interface ClassifyDocumentRequest { *Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an Amazon Textract DetectDocumentText
* or AnalyzeDocument
output file.
To classify a document using the prompt classifier, use the Text
parameter for input.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes. * If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode * the document file bytes for you.
@@ -1866,18 +1860,18 @@ export interface WarningsListItem { export interface ClassifyDocumentResponse { /** * @public - *The classes used by the document being analyzed. These are used for multi-class trained - * models. Individual classes are mutually exclusive and each document is expected to have only a + *
The classes used by the document being analyzed. These are used for models trained in multi-class mode. + * Individual classes are mutually exclusive and each document is expected to have only a * single class assigned to it. For example, an animal can be a dog or a cat, but not both at the * same time.
- *For prompt classification, the response includes a single class (UNDESIRED_PROMPT
), along with a confidence score.
- * A higher confidence score indicates that the input prompt is undesired in nature.
For prompt safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), + * along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
*/ Classes?: DocumentClass[]; /** * @public - *The labels used the document being analyzed. These are used for multi-label trained + *
The labels used in the document being analyzed. These are used for multi-label trained * models. Individual labels represent different categories that are related in some manner and * are not mutually exclusive. For example, a movie can be just an action movie, or it can be an * action movie, a science fiction movie, and a comedy, all at the same time.
@@ -2829,8 +2823,9 @@ export interface CreateDocumentClassifierRequest { /** * @public *Indicates the mode in which the classifier will be trained. The classifier can be trained - * in multi-class mode, which identifies one and only one class for each document, or multi-label - * mode, which identifies one or more labels for each document. In multi-label mode, multiple + * in multi-class (single-label) mode or multi-label mode. + * Multi-class mode identifies a single class label for each document and + * multi-label mode identifies one or more class labels for each document. Multiple * labels for an individual document are separated by a delimiter. The default delimiter between * labels is a pipe (|).
*/ @@ -3075,7 +3070,7 @@ export interface EntityTypesListItem { * custom entity recognizer. *Entity types must not contain the following invalid characters: \n (line break), \\n * (escaped line break, \r (carriage return), \\r (escaped carriage return), \t (tab), \\t - * (escaped tab), space, and , (comma).
+ * (escaped tab), and , (comma). */ Type: string | undefined; } @@ -6383,7 +6378,8 @@ export interface TextSegment { export interface DetectToxicContentRequest { /** * @public - *A list of up to 10 text strings. The maximum size for the list is 10 KB.
+ *A list of up to 10 text strings. Each string has a maximum size of 1 KB, and + * the maximum size of the list is 10 KB.
*/ TextSegments: TextSegment[] | undefined; @@ -6435,8 +6431,7 @@ export interface ToxicContent { /** * @public - *Toxicity analysis result for one string. For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide - *
+ *Toxicity analysis result for one string. For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide.
*/ export interface ToxicLabels { /** @@ -6447,7 +6442,7 @@ export interface ToxicLabels { /** * @public - *Overall toxicity score for the string.
+ *Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.
*/ Toxicity?: number; } diff --git a/codegen/sdk-codegen/aws-models/comprehend.json b/codegen/sdk-codegen/aws-models/comprehend.json index 5ae0469139ce..631868b9e569 100644 --- a/codegen/sdk-codegen/aws-models/comprehend.json +++ b/codegen/sdk-codegen/aws-models/comprehend.json @@ -979,7 +979,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a classification request to analyze a single document in real-time. ClassifyDocument
\n supports the following model types:
Custom classifier - a custom model that you have created and trained. \n For input, you can provide plain text, a single-page document (PDF, Word, or image), or Textract API output.\n For more information, see Custom classification in the Amazon Comprehend Developer Guide.
\nPrompt classifier - Amazon Comprehend provides a model for classifying prompts. \n For input, you provide English plain text input.\n For prompt classification, the response includes only the Classes
field.\n For more information about prompt classifiers, see Prompt classifiers in the Amazon Comprehend Developer Guide.
If the system detects errors while processing a page in the input document,\n the API response includes an entry in Errors
that describes the errors.
If the system detects a document-level error in your input document, the API returns an\n InvalidRequestException
error response.\n For details about this exception, see\n \n Errors in semi-structured documents in the Comprehend Developer Guide.\n
Creates a classification request to analyze a single document in real-time. ClassifyDocument
\n supports the following model types:
Custom classifier - a custom model that you have created and trained. \n For input, you can provide plain text, a single-page document (PDF, Word, or image), or \n Amazon Textract API output. For more information, see Custom classification in the Amazon Comprehend Developer Guide.
\nPrompt safety classifier - Amazon Comprehend provides a pre-trained model for classifying \n input prompts for generative AI applications. \n For input, you provide English plain text input.\n For prompt safety classification, the response includes only the Classes
field.\n For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide.
If the system detects errors while processing a page in the input document,\n the API response includes an Errors
field that describes the errors.
If the system detects a document-level error in your input document, the API returns an\n InvalidRequestException
error response.\n For details about this exception, see\n \n Errors in semi-structured documents in the Comprehend Developer Guide.\n
The Amazon Resource Number (ARN) of the endpoint.
\nFor prompt classification, Amazon Comprehend provides the endpoint ARN: zzz
.
For custom classification, you create an endpoint for your custom model. For more information, \n see Using Amazon Comprehend endpoints.
", + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the endpoint.
\nFor prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide\n
\nFor custom classification, you create an endpoint for your custom model. For more information, \n see Using Amazon Comprehend endpoints.
", "smithy.api#required": {} } }, "Bytes": { "target": "com.amazonaws.comprehend#SemiStructuredDocumentBlob", "traits": { - "smithy.api#documentation": "Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an Amazon Textract DetectDocumentText
\n or AnalyzeDocument
output file.
To classify a document using the prompt classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes.\n If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode\n the document file bytes for you.
\nThe maximum length of this field depends on the input document type. For details, see\n \n Inputs for real-time custom analysis in the Comprehend Developer Guide.
\nIf you use the Bytes
parameter, do not use the Text
parameter.
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an Amazon Textract DetectDocumentText
\n or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
Provide the input document as a sequence of base64-encoded bytes.\n If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode\n the document file bytes for you.
\nThe maximum length of this field depends on the input document type. For details, see\n \n Inputs for real-time custom analysis in the Comprehend Developer Guide.
\nIf you use the Bytes
parameter, do not use the Text
parameter.
The classes used by the document being analyzed. These are used for multi-class trained\n models. Individual classes are mutually exclusive and each document is expected to have only a\n single class assigned to it. For example, an animal can be a dog or a cat, but not both at the\n same time.
\nFor prompt classification, the response includes a single class (UNDESIRED_PROMPT
), along with a confidence score. \n A higher confidence score indicates that the input prompt is undesired in nature.
The classes used by the document being analyzed. These are used for models trained in multi-class mode.\n Individual classes are mutually exclusive and each document is expected to have only a\n single class assigned to it. For example, an animal can be a dog or a cat, but not both at the\n same time.
\nFor prompt safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), \n along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
" } }, "Labels": { "target": "com.amazonaws.comprehend#ListOfLabels", "traits": { - "smithy.api#documentation": "The labels used the document being analyzed. These are used for multi-label trained\n models. Individual labels represent different categories that are related in some manner and\n are not mutually exclusive. For example, a movie can be just an action movie, or it can be an\n action movie, a science fiction movie, and a comedy, all at the same time.
" + "smithy.api#documentation": "The labels used in the document being analyzed. These are used for multi-label trained\n models. Individual labels represent different categories that are related in some manner and\n are not mutually exclusive. For example, a movie can be just an action movie, or it can be an\n action movie, a science fiction movie, and a comedy, all at the same time.
" } }, "DocumentMetadata": { @@ -2526,7 +2526,7 @@ "Mode": { "target": "com.amazonaws.comprehend#DocumentClassifierMode", "traits": { - "smithy.api#documentation": "Indicates the mode in which the classifier will be trained. The classifier can be trained\n in multi-class mode, which identifies one and only one class for each document, or multi-label\n mode, which identifies one or more labels for each document. In multi-label mode, multiple\n labels for an individual document are separated by a delimiter. The default delimiter between\n labels is a pipe (|).
" + "smithy.api#documentation": "Indicates the mode in which the classifier will be trained. The classifier can be trained\n in multi-class (single-label) mode or multi-label mode. \n Multi-class mode identifies a single class label for each document and\n multi-label mode identifies one or more class labels for each document. Multiple\n labels for an individual document are separated by a delimiter. The default delimiter between\n labels is a pipe (|).
" } }, "ModelKmsKeyId": { @@ -4997,7 +4997,7 @@ } ], "traits": { - "smithy.api#documentation": "Performs toxicity analysis on the list of text strings that you provide as input.\n The analysis uses the order of strings in the list to determine context when predicting toxicity.\n The API response contains a results list that matches the size of the input list.\n For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide\n
" + "smithy.api#documentation": "Performs toxicity analysis on the list of text strings that you provide as input.\n The API response contains a results list that matches the size of the input list.\n For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide.\n
" } }, "com.amazonaws.comprehend#DetectToxicContentRequest": { @@ -5006,7 +5006,7 @@ "TextSegments": { "target": "com.amazonaws.comprehend#ListOfTextSegments", "traits": { - "smithy.api#documentation": "A list of up to 10 text strings. The maximum size for the list is 10 KB.
", + "smithy.api#documentation": "A list of up to 10 text strings. Each string has a maximum size of 1 KB, and\n the maximum size of the list is 10 KB.
", "smithy.api#required": {} } }, @@ -5674,7 +5674,7 @@ } }, "traits": { - "smithy.api#documentation": "Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT
\n as the read action, you must specify one or both of the following values:
\n TABLES
- Returns additional information about any tables that are detected in the input document.
\n FORMS
- Returns additional information about any forms that are detected in the input document.
TABLES or FORMS
" } }, "com.amazonaws.comprehend#DocumentReadMode": { @@ -5713,7 +5713,7 @@ "FeatureTypes": { "target": "com.amazonaws.comprehend#ListOfDocumentReadFeatureTypes", "traits": { - "smithy.api#documentation": "Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT
\n as the read action, you must specify one or both of the following values:
\n TABLES
- Returns information about any tables that are detected in the input document.
\n FORMS
- Returns information and the data from any forms that are detected in the input document.
Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT
\n as the read action, you must specify one or both of the following values:
\n TABLES
- Returns additional information about any tables that are detected in the input document.
\n FORMS
- Returns additional information about any forms that are detected in the input document.
An entity type within a labeled training dataset that Amazon Comprehend uses to train a\n custom entity recognizer.
\nEntity types must not contain the following invalid characters: \\n (line break), \\\\n\n (escaped line break, \\r (carriage return), \\\\r (escaped carriage return), \\t (tab), \\\\t\n (escaped tab), space, and , (comma).
", + "smithy.api#documentation": "An entity type within a labeled training dataset that Amazon Comprehend uses to train a\n custom entity recognizer.
\nEntity types must not contain the following invalid characters: \\n (line break), \\\\n\n (escaped line break, \\r (carriage return), \\\\r (escaped carriage return), \\t (tab), \\\\t\n (escaped tab), and , (comma).
", "smithy.api#required": {} } } @@ -7660,12 +7660,12 @@ "Reason": { "target": "com.amazonaws.comprehend#InvalidRequestDetailReason", "traits": { - "smithy.api#documentation": "Reason code is INVALID_DOCUMENT
.
Reason codes include the following values:
\nDOCUMENT_SIZE_EXCEEDED - Document size is too large. Check the size of your file and resubmit the request.
\nUNSUPPORTED_DOC_TYPE - Document type is not supported. Check the file type and resubmit the request.
\nPAGE_LIMIT_EXCEEDED - Too many pages in the document. Check the number of pages in your file and resubmit the request.
\nTEXTRACT_ACCESS_DENIED - Access denied to Amazon Textract. Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
\nNOT_TEXTRACT_JSON - Document is not Amazon Textract JSON format. Verify the format and resubmit the request.
\nMISMATCHED_TOTAL_PAGE_COUNT - Check the number of pages in your file and resubmit the request.
\nINVALID_DOCUMENT - Invalid document. Check the file and resubmit the request.
\nProvides additional detail about why the request failed:
\nDocument size is too large - Check the size of your file and resubmit the request.
\nDocument type is not supported - Check the file type and resubmit the request.
\nToo many pages in the document - Check the number of pages in your file and resubmit the request.
\nAccess denied to Amazon Textract - Verify that your account has permission to use Amazon Textract API operations and resubmit the request.
\nProvides additional detail about why the request failed.
" } }, "com.amazonaws.comprehend#InvalidRequestDetailReason": { @@ -10907,7 +10907,7 @@ } ], "traits": { - "smithy.api#documentation": "Starts an asynchronous document classification job. Use the \n DescribeDocumentClassificationJob
\n operation to track the progress of the job.
Starts an asynchronous document classification job using a custom classification model. Use the \n DescribeDocumentClassificationJob
\n operation to track the progress of the job.
Overall toxicity score for the string.
" + "smithy.api#documentation": "Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.
" } } }, "traits": { - "smithy.api#documentation": "Toxicity analysis result for one string. For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide\n
" + "smithy.api#documentation": "Toxicity analysis result for one string. For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide.
" } }, "com.amazonaws.comprehend#UnsupportedLanguageException": { @@ -13437,7 +13437,7 @@ } }, "traits": { - "smithy.api#documentation": "Amazon Comprehend can't process the language of the input text. For custom entity\n recognition APIs, only English, Spanish, French, Italian, German, or Portuguese are accepted.\n For a list of supported languages,\n Supported languages in the Comprehend Developer Guide.\n
", + "smithy.api#documentation": "Amazon Comprehend can't process the language of the input text. For a list of supported languages,\n Supported languages in the Comprehend Developer Guide.\n
", "smithy.api#error": "client", "smithy.api#httpError": 400 }