fix(python-client): stream not set on the sync client (#109)

This commit is contained in:
OlivierDehaene 2023-03-08 16:48:16 +01:00 committed by GitHub
parent 5fd2dcb513
commit 2c5df5d2af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ print(text)
# ' Rayleigh scattering' # ' Rayleigh scattering'
``` ```
### Hugging Fae Inference Endpoint usage ### Hugging Face Inference Endpoint usage
```python ```python
from text_generation import Client from text_generation import Client

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "text-generation" name = "text-generation"
version = "0.2.0" version = "0.2.1"
description = "Hugging Face Text Generation Python Client" description = "Hugging Face Text Generation Python Client"
license = "Apache-2.0" license = "Apache-2.0"
authors = ["Olivier Dehaene <olivier@huggingface.co>"] authors = ["Olivier Dehaene <olivier@huggingface.co>"]

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
__version__ = "0.2.0" __version__ = "0.2.1"
from text_generation.client import Client, AsyncClient from text_generation.client import Client, AsyncClient
from text_generation.inference_api import InferenceAPIClient, InferenceAPIAsyncClient from text_generation.inference_api import InferenceAPIClient, InferenceAPIAsyncClient

View File

@ -191,7 +191,7 @@ class Client:
json=request.dict(), json=request.dict(),
headers=self.headers, headers=self.headers,
timeout=self.timeout, timeout=self.timeout,
stream=False, stream=True,
) )
if resp.status_code != 200: if resp.status_code != 200: