testing thinking
This commit is contained in:
parent
cc07b459c0
commit
3bb1d879ae
@ -185,16 +185,16 @@ 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 = chunk["contentBlockDelta"]["contentBlockIndex"]
|
||||
yield '<thinking>\n'
|
||||
print(f"Reasoning content: {thinking_block}")
|
||||
if "contentBlockIndex" in delta:
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user