testing thinking
This commit is contained in:
parent
f0c534a093
commit
3148979440
@ -179,6 +179,7 @@ class Pipeline:
|
||||
print(f"{streaming_response} for {payload}")
|
||||
thinking_start = False
|
||||
for chunk in streaming_response["stream"]:
|
||||
print(chunk)
|
||||
if "contentBlockDelta" in chunk:
|
||||
delta = chunk["contentBlockDelta"]["delta"]
|
||||
|
||||
@ -187,7 +188,7 @@ class Pipeline:
|
||||
if not thinking_start:
|
||||
thinking_start = True
|
||||
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"]
|
||||
|
||||
# Handle regular response text
|
||||
|
Loading…
x
Reference in New Issue
Block a user