huggingface / text-generation-inference

Large Language Model Text Generation Inference
http://hf.co/docs/text-generation-inference
Apache License 2.0
8.48k stars 968 forks source link

Error while fetching response with the Python library using the `generate` method #1673

Closed jtourille closed 4 months ago

jtourille commented 4 months ago

I encounter an error when using the last version of the text-generation library (0.7.0). When using the generate method, TGI v1.4.4 returns a json dictionary but the method is trying extract the first element of a list as presented below. Removing the indexing [0] seems to resolve the issue.

https://github.com/huggingface/text-generation-inference/blob/6c4496a1a30f119cebd3afbfedd847039325dbc9/clients/python/text_generation/client.py#L285

jtourille commented 4 months ago

It is a bug on my end. I am closing the issue.