From ba5fbffbe2bd5247de9d6bb06829792e37de2efc Mon Sep 17 00:00:00 2001 From: jknapp Date: Sun, 16 Mar 2025 19:34:19 -0700 Subject: [PATCH] testing thinking --- claude_sonnet-3-7-bedrock.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/claude_sonnet-3-7-bedrock.py b/claude_sonnet-3-7-bedrock.py index 5c00f7d..4d44bdb 100644 --- a/claude_sonnet-3-7-bedrock.py +++ b/claude_sonnet-3-7-bedrock.py @@ -183,13 +183,12 @@ class Pipeline: # Handle reasoning content (Chain of Thought) if "reasoningContent" in delta and "text" in delta["reasoningContent"]: - if '"
' in delta["reasoningContent"]["text"]: - yield "" - yield delta["reasoningContent"]["text"] + print(f"Reasoning content: {delta['reasoningContent']}") + yield delta["reasoningContent"]["text"] # Handle regular response text if "text" in delta: - yield delta["text"] + yield delta["text"] def get_completion(self, model_id: str, payload: dict) -> str: # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html