From 8a8e7afa968f9c241a6bf85e2e9f711e8be41c7c Mon Sep 17 00:00:00 2001 From: Rayan Mostovoi <135296650+Bubullzz@users.noreply.github.com> Date: Tue, 28 May 2024 02:19:20 +0200 Subject: [PATCH] small fix on examples/python-simplechat/client.py to actually get a streamed response and get tokens printed as we receive it (#4671) --- examples/python-simplechat/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/python-simplechat/client.py b/examples/python-simplechat/client.py index 9ae99fb7..f82a16b3 100644 --- a/examples/python-simplechat/client.py +++ b/examples/python-simplechat/client.py @@ -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 = ""