diff --git a/claude_sonnet-3-7-bedrock.py b/claude_sonnet-3-7-bedrock.py index a9dd991..e976eeb 100644 --- a/claude_sonnet-3-7-bedrock.py +++ b/claude_sonnet-3-7-bedrock.py @@ -189,7 +189,8 @@ class Pipeline: #thinking_block = delta["contentBlockIndex"] # yield '\n' #print(f"Reasoning content: {delta['reasoningContent']}") - print(delta["contentBlockIndex"]) + if "contentBlockIndex" in delta: + print(delta["contentBlockIndex"]) yield delta["reasoningContent"]["text"] #if "contentBlockStop" in delta and delta["contentBlockStop"]["contentBlockIndex"] == thinking_block: