Unverified Commit 8a8e7afa authored by Rayan Mostovoi's avatar Rayan Mostovoi Committed by GitHub
Browse files

small fix on examples/python-simplechat/client.py to actually get a streamed...

small fix on examples/python-simplechat/client.py to actually get a streamed response and get tokens printed as we receive it (#4671)
parent c79f8c9c
......@@ -9,6 +9,7 @@ def chat(messages):
r = requests.post(
"http://0.0.0.0:11434/api/chat",
json={"model": model, "messages": messages, "stream": True},
stream=True
)
r.raise_for_status()
output = ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment