mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-31 10:23:18 +00:00
Add flush=True to stream examples (#8862)
This commit is contained in:
@@ -108,7 +108,7 @@
|
|||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"for s in chain.stream({\"topic\": \"bears\"}):\n",
|
"for s in chain.stream({\"topic\": \"bears\"}):\n",
|
||||||
" print(s.content, end=\"\")"
|
" print(s.content, end=\"\", flush=True)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"async for s in chain.astream({\"topic\": \"bears\"}):\n",
|
"async for s in chain.astream({\"topic\": \"bears\"}):\n",
|
||||||
" print(s.content, end=\"\")"
|
" print(s.content, end=\"\", flush=True)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user