testing thinking
This commit is contained in:
		| @@ -185,16 +185,16 @@ class Pipeline: | |||||||
|                  |                  | ||||||
|                 # Handle reasoning content (Chain of Thought) |                 # Handle reasoning content (Chain of Thought) | ||||||
|                 if "reasoningContent" in delta and "text" in delta["reasoningContent"]: |                 if "reasoningContent" in delta and "text" in delta["reasoningContent"]: | ||||||
|                   #if not thinking_block: |                   if not thinking_block: | ||||||
|                     #thinking_block = delta["contentBlockIndex"] |                     thinking_block = chunk["contentBlockDelta"]["contentBlockIndex"] | ||||||
|                    # yield '<thinking>\n' |                     yield '<thinking>\n' | ||||||
|                   #print(f"Reasoning content: {delta['reasoningContent']}") |                     print(f"Reasoning content: {thinking_block}") | ||||||
|                   if "contentBlockIndex" in delta: |                   if "contentBlockIndex" in delta: | ||||||
|                     print(delta["contentBlockIndex"])  |                     print(delta["contentBlockIndex"])  | ||||||
|                   yield delta["reasoningContent"]["text"] |                   yield delta["reasoningContent"]["text"] | ||||||
|  |  | ||||||
|                 #if "contentBlockStop" in delta and delta["contentBlockStop"]["contentBlockIndex"] == thinking_block: |                 if "contentBlockStop" in delta and delta["contentBlockStop"]["contentBlockIndex"] == thinking_block: | ||||||
|                 #  yield '</thinking>\n\n' |                   yield '</thinking>\n\n' | ||||||
|  |  | ||||||
|                 # Handle regular response text |                 # Handle regular response text | ||||||
|                 if "text" in delta: |                 if "text" in delta: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user