mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-13 16:36:06 +00:00
Add flush=True to stream examples (#8862)
This commit is contained in:
parent
f616aee35a
commit
9892e95d03
@ -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)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user