[PR #4671] [MERGED] small fix in chatbot example to get stream of tokens #11559

Closed
opened 2026-04-12 23:32:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4671
Author: @Bubullzz
Created: 5/27/2024
Status: Merged
Merged: 5/28/2024
Merged by: @jmorganca

Base: mainHead: Bubullzz/fix-example-client.py


📝 Commits (1)

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

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 examples/python-simplechat/client.py (+1 -0)

📄 Description

It seems like without this line it is not getting the answer as a stream and we have to wait for the whole output to be generated before printing it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/4671 **Author:** [@Bubullzz](https://github.com/Bubullzz) **Created:** 5/27/2024 **Status:** ✅ Merged **Merged:** 5/28/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `Bubullzz/fix-example-client.py` --- ### 📝 Commits (1) - [`ba4291c`](https://github.com/ollama/ollama/commit/ba4291cedf4d746d521a83799ae5c6ee06194d97) small fix on examples/python-simplechat/client.py to actually get a streamed response and get tokens printed as we receive it ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `examples/python-simplechat/client.py` (+1 -0) </details> ### 📄 Description It seems like without this line it is not getting the answer as a stream and we have to wait for the whole output to be generated before printing it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:32:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11559