testing thinking
This commit is contained in:
parent
5ed90be307
commit
ce3bc70838
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user