From fe1b9ee6b8daf16d363334cedd3cc5a5e19e4177 Mon Sep 17 00:00:00 2001 From: Piyush Jain Date: Mon, 28 Aug 2023 16:01:43 -0700 Subject: [PATCH] Updated notebook for comprehend moderation (#9875) ### Description Updated the notebook for comprehend moderation. cc @baskaryan --- .../docs/guides/safety/amazon_comprehend_chain.ipynb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/docs_skeleton/docs/guides/safety/amazon_comprehend_chain.ipynb b/docs/docs_skeleton/docs/guides/safety/amazon_comprehend_chain.ipynb index 03277c16fe..e7e1961d42 100644 --- a/docs/docs_skeleton/docs/guides/safety/amazon_comprehend_chain.ipynb +++ b/docs/docs_skeleton/docs/guides/safety/amazon_comprehend_chain.ipynb @@ -30,12 +30,7 @@ "source": [ "import boto3\n", "\n", - "comprehend_client = boto3.client('comprehend', \n", - " region_name='us-east-1', \n", - " aws_access_key_id=\"ASIA6BR6ZDLNQLMEGWHM\",\n", - " aws_secret_access_key=\"Y79nefFoOfvgrog6sojSe55xTuKqDJY53BgfrtlG\",\n", - " aws_session_token=\"IQoJb3JpZ2luX2VjEIP//////////wEaCXVzLWVhc3QtMSJGMEQCIBvUl0Wj5Gu5GrHB+i5fHkaVc2V1381M7UNRX8EggHORAiB+dG/uKJ4loHn2oAcXIEy6+lfU7wygl4zw/vUo2VItFiqfAghMEAIaDDk2NTQyNTU2ODQ3NSIMfbh8uyoO1XONSkuEKvwBTMxeDCi//9U9LGIwZZzIiHOudQAqR2wlIGZKcw//abSeHNBE1AoDT8ibcqk7EuIt9fwnj1WYiLGmSIWd9/kSZShiKdYg0UpNWyr1/LdeutV5byFAjT21RnWTgSMr0QeSCU698PFusvO1Coph8C75pcqTVYsxi/HypJT8OfB5iCxKgfzx0qD4X6hScpIAEYZhgQXHFBAeubqMkVPYEqSob6fSm1vEI8LkU8HG1N2M2p8TzGCQWo5uBgtNkipxve++bkR+xjiNLIpAN3P1xF2/W/lYlz+4xGsi90aZqIVh/tOvAjg7Yx1Dd5Ir2C0fZc7wbtabzVFlJZ7GFcpcMOX0o6cGOp4BismuW2CJRBmFFpoparqraQaiQBY/VDbQg9KQc/Y6o0oCxkESLUdY6ino3yrheT3W832eAg0RwrmEaQqT8kKGyJFimUxrAF/otNQhySLKuSXLooguammJiQAtgK1EhmuLBUBoLcngxQ31kDqw13g7Ccwuo68fnI/QzQLj5MX+V5VLCSp9VrOzi9XSjmeF/TJQARdZeL3CSeu2pATQc80=\"\n", - " )" + "comprehend_client = boto3.client('comprehend', region_name='us-east-1')" ] }, { @@ -389,7 +384,6 @@ "comp_moderation_with_config = AmazonComprehendModerationChain(\n", " moderation_config=moderation_config, # specify the configuration\n", " client=comprehend_client, # optionally pass the Boto3 Client\n", - " force_base_exception=True, # Force BaseModerationError\n", " unique_id='john.doe@email.com', # A unique ID\n", " moderation_callback=my_callback, # BaseModerationCallbackHandler\n", " verbose=True\n",