View a markdown version of this page

刪除詞彙清單 - Amazon Bedrock

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

刪除詞彙清單

使用 InvokeDataAutomationLibraryIngestionJob 搭配 "DELETE" 操作類型,從您的程式庫移除特定實體。

AWS CLI 範例:

選項 1:使用 S3 資訊清單檔案

步驟 1:建立 JSONL 資訊清單檔案

使用 entityIds 清單建立簡單的 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. 選擇「刪除自訂詞彙清單」