testing thinking
This commit is contained in:
		| @@ -179,6 +179,7 @@ class Pipeline: | |||||||
|         print(f"{streaming_response} for {payload}") |         print(f"{streaming_response} for {payload}") | ||||||
|         thinking_start = False |         thinking_start = False | ||||||
|         for chunk in streaming_response["stream"]: |         for chunk in streaming_response["stream"]: | ||||||
|  |             print(chunk) | ||||||
|             if "contentBlockDelta" in chunk: |             if "contentBlockDelta" in chunk: | ||||||
|                 delta = chunk["contentBlockDelta"]["delta"] |                 delta = chunk["contentBlockDelta"]["delta"] | ||||||
|                  |                  | ||||||
| @@ -187,7 +188,7 @@ class Pipeline: | |||||||
|                   if not thinking_start: |                   if not thinking_start: | ||||||
|                     thinking_start = True |                     thinking_start = True | ||||||
|                     yield '<details type="reasoning" done="false">\n<summary>Thinking…</summary>\n' |                     yield '<details type="reasoning" done="false">\n<summary>Thinking…</summary>\n' | ||||||
|                   print(f"Reasoning content: {delta['reasoningContent']}")  |                   #print(f"Reasoning content: {delta['reasoningContent']}")  | ||||||
|                   yield delta["reasoningContent"]["text"] |                   yield delta["reasoningContent"]["text"] | ||||||
|                  |                  | ||||||
|                 # Handle regular response text |                 # Handle regular response text | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user