testing thinking

This commit is contained in:
jknapp 2025-03-16 20:24:39 -07:00
parent 5ed90be307
commit ce3bc70838

View File

@ -185,14 +185,15 @@ class Pipeline:
# Handle reasoning content (Chain of Thought)
if "reasoningContent" in delta and "text" in delta["reasoningContent"]:
if not thinking_block:
thinking_block = delta["contentBlockIndex"]
yield '<thinking>\n'
#print(f"Reasoning content: {delta['reasoningContent']}")
#if not thinking_block:
#thinking_block = delta["contentBlockIndex"]
# yield '<thinking>\n'
#print(f"Reasoning content: {delta['reasoningContent']}")
print(delta["contentBlockIndex"])
yield delta["reasoningContent"]["text"]
if "contentBlockStop" in delta and delta["contentBlockStop"]["contentBlockIndex"] == thinking_block:
yield '</thinking>\n\n'
#if "contentBlockStop" in delta and delta["contentBlockStop"]["contentBlockIndex"] == thinking_block:
# yield '</thinking>\n\n'
# Handle regular response text
if "text" in delta: