View a markdown version of this page

删除词汇表 - Amazon Bedrock

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

删除词汇表

使用 wit InvokeDataAutomationLibraryIngestionJobh “DELETE” 操作类型从库中移除特定实体。

AWS CLI 示例:

选项 1:使用 S3 清单文件

步骤 1:创建 JSONL 清单文件

创建一个包含实体 ID 列表的简单的 s3 清单文件。

示例:cv-delete-manifest.json

{"entityIds": ["medical-en", "medical-es"]}

步骤 2:将清单上传到 S3

aws s3 cp vocabulary-manifest.json s3://my-bucket/manifests/

步骤 3:启动摄取作业

使用启动操作InvokeDataAutomationLibraryIngestionJob类型为 DELETE 的词汇提取作业

请求

aws bedrock-data-automation invoke-data-automation-library-ingestion-job \ --library-arn "arn:aws:bedrock:us-east-1:123456789012:data-automation-library/healthcare-vocabulary" \ --entity-type "VOCABULARY" \ --operation-type "DELETE" \ --input-configuration '{"s3Object":{"s3Uri":"s3://my-bucket/manifests/cv-delete-manifest.json"}}' \ --output-configuration '{"s3Uri":"s3://my-bucket/outputs/"}'

响应:

{ "jobArn": "arn:aws:bedrock:us-east-1:123456789012:data-automation-library-ingestion-job/job-12345" }

选项 2:使用内联有效负载

请求

aws bedrock-data-automation invoke-data-automation-library-ingestion-job \ --library-arn "arn:aws:bedrock:us-east-1:123456789012:data-automation-library/healthcare-vocabulary" \ --entity-type "VOCABULARY" \ --operation-type "DELETE" \ --input-configuration '{"inlinePayload":{"deleteEntitiesInfo":{"entityIds": ["medical-en"]}}}' \ --output-configuration '{"s3Uri": "s3://my-bucket/outputs/"}'

AWS 控制台示例:

  1. 导航到您的图书馆的 “图书馆详情” 页面

  2. 从 “自定义词汇表” 中选择所需的实体

  3. 选择 “删除自定义词汇表”