testing thinking

This commit is contained in:
jknapp 2025-03-16 19:34:19 -07:00
parent 6c05ab0611
commit ba5fbffbe2

View File

@ -183,13 +183,12 @@ class Pipeline:
# Handle reasoning content (Chain of Thought)
if "reasoningContent" in delta and "text" in delta["reasoningContent"]:
if '"<details type="reasoning" done="false">' in delta["reasoningContent"]["text"]:
yield "<thinking>"
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