From 738ef19ca3ca0fdcfcfa04b47049908c366da26a Mon Sep 17 00:00:00 2001 From: Sharon Li <83460627+sharonxiaohanli@users.noreply.github.com> Date: Tue, 1 Apr 2025 09:55:46 -0400 Subject: [PATCH] Update getting_started_with_prompt_caching.ipynb update latest cache metric names. --- .../prompt-caching/getting_started_with_prompt_caching.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/introduction-to-bedrock/prompt-caching/getting_started_with_prompt_caching.ipynb b/introduction-to-bedrock/prompt-caching/getting_started_with_prompt_caching.ipynb index 5a1c552d2..67b74bc84 100644 --- a/introduction-to-bedrock/prompt-caching/getting_started_with_prompt_caching.ipynb +++ b/introduction-to-bedrock/prompt-caching/getting_started_with_prompt_caching.ipynb @@ -522,9 +522,9 @@ " \n", " elif \"metadata\" in chunk: \n", " if 'cacheReadInputTokenCount' in chunk[\"metadata\"]['usage']:\n", - " if chunk[\"metadata\"]['usage']['cacheWriteInputTokenCount'] > 100:\n", + " if chunk[\"metadata\"]['usage']['cacheWriteInputTokens'] > 1:\n", " cache_result = CACHE.WRITE\n", - " elif chunk[\"metadata\"]['usage']['cacheReadInputTokenCount'] > 1:\n", + " elif chunk[\"metadata\"]['usage']['cacheReadInputTokens'] > 1:\n", " cache_result = CACHE.READ\n", " else:\n", " print(json.dumps(chunk, sort_keys=False, indent=4))\n",