From 0f7c22e3aaf61c371fd2c73ee60660abc5b70ced Mon Sep 17 00:00:00 2001 From: jknapp Date: Sun, 16 Mar 2025 21:15:31 -0700 Subject: [PATCH] testing thinking --- claude_sonnet-3-7-bedrock.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/claude_sonnet-3-7-bedrock.py b/claude_sonnet-3-7-bedrock.py index 7f61b5a..07eb090 100644 --- a/claude_sonnet-3-7-bedrock.py +++ b/claude_sonnet-3-7-bedrock.py @@ -178,7 +178,6 @@ class Pipeline: streaming_response = self.bedrock_runtime.converse_stream(**payload) thinking_block = None for chunk in streaming_response["stream"]: - print(chunk) if "contentBlockDelta" in chunk: delta = chunk["contentBlockDelta"]["delta"] @@ -189,8 +188,8 @@ class Pipeline: yield '\n' yield delta["reasoningContent"]["text"] - if "contentBlockStop" in chunk: #and chunk["contentBlockStop"]["contentBlockIndex"] == thinking_block: - yield '\n\n' + if "contentBlockStop" in chunk and chunk["contentBlockStop"]["contentBlockIndex"] == thinking_block: + yield '\n\n' # Handle regular response text if "text" in delta: