Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AmazonBedrock/anthropic/00_Tutorial_How-To.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"\n",
"## Usage Notes & Tips 💡\n",
"\n",
"- This course uses Claude 3 Haiku with temperature 0. We will talk more about temperature later in the course. For now, it's enough to understand that these settings yield more deterministic results. All prompt engineering techniques in this course also apply to previous generation legacy Claude models such as Claude 2 and Claude Instant 1.2.\n",
"- This course uses Claude Haiku (latest) with temperature 0. We will talk more about temperature later in the course. For now, it's enough to understand that these settings yield more deterministic results. All prompt engineering techniques in this course also apply to other Claude models as well.\n",
"\n",
"- You can use `Shift + Enter` to execute the cell and move to the next one.\n",
"\n",
Expand Down Expand Up @@ -95,7 +95,8 @@
"session = boto3.Session() # create a boto3 session to dynamically get and set the region name\n",
"AWS_REGION = session.region_name\n",
"print(\"AWS Region:\", AWS_REGION)\n",
"MODEL_NAME = \"anthropic.claude-3-haiku-20240307-v1:0\"\n",
"# \"latest\" alias auto-updates when new models release; pin a specific version if needed\n",
"MODEL_NAME = \"anthropic.claude-haiku-4-5-latest-v1:0\"\n",
"\n",
"%store MODEL_NAME\n",
"%store AWS_REGION"
Expand Down
4 changes: 2 additions & 2 deletions AmazonBedrock/anthropic/10_2_Appendix_Tool_Use.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"from anthropic import AnthropicBedrock\n",
"\n",
"# Override the MODEL_NAME variable in the IPython store to use Sonnet instead of the Haiku model\n",
"MODEL_NAME='anthropic.claude-3-sonnet-20240229-v1:0'\n",
"MODEL_NAME='anthropic.claude-sonnet-4-5-latest-v1:0'\n",
"%store -r AWS_REGION\n",
"\n",
"client = AnthropicBedrock(aws_region=AWS_REGION)\n",
"\n",
"# Rewrittten to call Claude 3 Sonnet, which is generally better at tool use, and include stop_sequences\n",
"# Rewritten to call Claude Sonnet, which is generally better at tool use, and include stop_sequences\n",
"def get_completion(messages, system_prompt=\"\", prefill=\"\",stop_sequences=None):\n",
" message = client.messages.create(\n",
" model=MODEL_NAME,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"outputs": [],
"source": [
"# Store the model name and AWS region for later use\n",
"MODEL_NAME = \"anthropic.claude-3-haiku-20240307-v1:0\"\n",
"MODEL_NAME = \"anthropic.claude-haiku-4-5-latest-v1:0\"\n",
"AWS_REGION = \"us-west-2\"\n",
"\n",
"%store MODEL_NAME\n",
Expand Down
5 changes: 3 additions & 2 deletions AmazonBedrock/boto3/00_Tutorial_How-To.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"\n",
"## Usage Notes & Tips 💡\n",
"\n",
"- This course uses Claude 3 Haiku with temperature 0. We will talk more about temperature later in the course. For now, it's enough to understand that these settings yield more deterministic results. All prompt engineering techniques in this course also apply to previous generation legacy Claude models such as Claude 2 and Claude Instant 1.2.\n",
"- This course uses Claude Haiku (latest) with temperature 0. We will talk more about temperature later in the course. For now, it's enough to understand that these settings yield more deterministic results. All prompt engineering techniques in this course also apply to other Claude models as well.\n",
"\n",
"- You can use `Shift + Enter` to execute the cell and move to the next one.\n",
"\n",
Expand Down Expand Up @@ -100,7 +100,8 @@
"session = boto3.Session() # create a boto3 session to dynamically get and set the region name\n",
"AWS_REGION = session.region_name\n",
"print(\"AWS Region:\", AWS_REGION)\n",
"MODEL_NAME = \"anthropic.claude-3-haiku-20240307-v1:0\"\n",
"# \"latest\" alias auto-updates when new models release; pin a specific version if needed\n",
"MODEL_NAME = \"anthropic.claude-haiku-4-5-latest-v1:0\"\n",
"\n",
"%store MODEL_NAME\n",
"%store AWS_REGION"
Expand Down
4 changes: 2 additions & 2 deletions AmazonBedrock/boto3/10_2_Appendix_Tool_Use.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Rewrittten to call Claude 3 Sonnet, which is generally better at tool use, and include stop_sequences\n",
"# Rewritten to call Claude Sonnet, which is generally better at tool use, and include stop_sequences\n",
"# Import python's built-in regular expression library\n",
"import re\n",
"import boto3\n",
Expand All @@ -35,7 +35,7 @@
"from utils import hints\n",
"\n",
"# Override the MODEL_NAME variable in the IPython store to use Sonnet instead of the Haiku model\n",
"MODEL_NAME='anthropic.claude-3-sonnet-20240229-v1:0'\n",
"MODEL_NAME='anthropic.claude-sonnet-4-5-latest-v1:0'\n",
"%store -r AWS_REGION\n",
"\n",
"client = boto3.client('bedrock-runtime',region_name=AWS_REGION)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"import json\n",
"\n",
"# Store the model name and AWS region for later use\n",
"MODEL_NAME = \"anthropic.claude-3-haiku-20240307-v1:0\"\n",
"MODEL_NAME = \"anthropic.claude-haiku-4-5-latest-v1:0\"\n",
"AWS_REGION = \"us-west-2\"\n",
"\n",
"%store MODEL_NAME\n",
Expand Down
8 changes: 4 additions & 4 deletions AmazonBedrock/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
awscli==1.32.74
boto3==1.34.74
botocore==1.34.74
anthropic==0.21.3
awscli
boto3
botocore
anthropic>=0.39.0
pickleshare==0.7.5
5 changes: 3 additions & 2 deletions Anthropic 1P/00_Tutorial_How-To.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"outputs": [],
"source": [
"API_KEY = \"your_api_key_here\"\n",
"MODEL_NAME = \"claude-3-haiku-20240307\"\n",
"# \"latest\" alias auto-updates when new models release; pin a specific version if needed\n",
"MODEL_NAME = \"claude-haiku-4-5-latest\"\n",
"\n",
"# Stores the API_KEY & MODEL_NAME variables for use across notebooks within the IPython store\n",
"%store API_KEY\n",
Expand All @@ -66,7 +67,7 @@
"\n",
"## Usage Notes & Tips 💡\n",
"\n",
"- This course uses Claude 3 Haiku with temperature 0. We will talk more about temperature later in the course. For now, it's enough to understand that these settings yield more deterministic results. All prompt engineering techniques in this course also apply to previous generation legacy Claude models such as Claude 2 and Claude Instant 1.2.\n",
"- This course uses Claude Haiku (latest) with temperature 0. We will talk more about temperature later in the course. For now, it's enough to understand that these settings yield more deterministic results. All prompt engineering techniques in this course also apply to other Claude models as well.\n",
"\n",
"- You can use `Shift + Enter` to execute the cell and move to the next one.\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions Anthropic 1P/10.2_Appendix_Tool Use.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"\n",
"client = anthropic.Anthropic(api_key=API_KEY)\n",
"\n",
"# Rewrittten to call Claude 3 Sonnet, which is generally better at tool use, and include stop_sequences\n",
"# Rewritten to call Claude Sonnet, which is generally better at tool use, and include stop_sequences\n",
"def get_completion(messages, system_prompt=\"\", prefill=\"\",stop_sequences=None):\n",
" message = client.messages.create(\n",
" model=\"claude-3-sonnet-20240229\",\n",
" model=\"claude-sonnet-4-5-latest\",\n",
" max_tokens=2000,\n",
" temperature=0.0,\n",
" system=system_prompt,\n",
Expand Down