From c2a322164b62c4650074afeb80f593bc5b8036d8 Mon Sep 17 00:00:00 2001 From: Ray Bell Date: Fri, 30 Aug 2024 10:55:03 -0400 Subject: [PATCH] use client instead of bedrock as it other tutorials --- .../AmazonBedrock/boto3/00_Tutorial_How-To.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prompt_engineering_interactive_tutorial/AmazonBedrock/boto3/00_Tutorial_How-To.ipynb b/prompt_engineering_interactive_tutorial/AmazonBedrock/boto3/00_Tutorial_How-To.ipynb index a78ae59..d6ddcf8 100755 --- a/prompt_engineering_interactive_tutorial/AmazonBedrock/boto3/00_Tutorial_How-To.ipynb +++ b/prompt_engineering_interactive_tutorial/AmazonBedrock/boto3/00_Tutorial_How-To.ipynb @@ -122,7 +122,7 @@ "import boto3\n", "import json\n", "\n", - "bedrock = boto3.client('bedrock-runtime',region_name=AWS_REGION)\n", + "client = boto3.client('bedrock-runtime',region_name=AWS_REGION)\n", "\n", "def get_completion(prompt):\n", " body = json.dumps(\n", @@ -135,7 +135,7 @@ " \"system\": ''\n", " }\n", " )\n", - " response = bedrock.invoke_model(body=body, modelId=MODEL_NAME)\n", + " response = client.invoke_model(body=body, modelId=MODEL_NAME)\n", " response_body = json.loads(response.get('body').read())\n", "\n", " return response_body.get('content')[0].get('text')"