Browse Source
small fix on examples/python-simplechat/client.py to actually get a streamed response and get tokens printed as we receive it (#4671)
language_support
Rayan Mostovoi
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
0 deletions
-
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 = "" |
|
|
|
|