Преглед изворни кода

small fix on examples/python-simplechat/client.py to actually get a streamed response and get tokens printed as we receive it (#4671)

Rayan Mostovoi пре 11 месеци
родитељ
комит
8a8e7afa96
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      examples/python-simplechat/client.py

+ 1 - 0
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 = ""