cohere-ai / cohere-python

Python Library for Accessing the Cohere API
https://docs.cohere.ai
MIT License
300 stars 65 forks source link

Flush stdout in chat_stream example in README #487

Closed srithon closed 4 months ago

srithon commented 6 months ago

By default, without explicitly flushing stdout, Python only flushes the output buffer when it encounters newlines. This makes it look like generations are only being returned line-by-line. This misunderstanding led me to file this issue under the Golang SDK, wrongly thinking that this was an issue with the Cohere SDK as a whole rather than just being a byproduct of Python's output buffering.

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.