Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix intolerance for new field in TGI stream response: 'index' #2006

Conversation

danielpcox
Copy link
Contributor

@danielpcox danielpcox commented Jan 30, 2024

Fixes #2005

This PR adds tolerance for an index field in the TextGenerationStreamResponse.

The latest version of HuggingFace Text Generation Inference added an index field to the streaming response to be compatible with OpenAI clients, but the HuggingFace InferenceClient wasn't updated to accept it.

huggingface/text-generation-inference@0eabc83#diff-c3259a23eb2e9e4e39f9a5226354b99508e42b05a158036dc482397410becd52R501

@danielpcox danielpcox changed the title Fixing intolerance for new TGI field 'index' Fixing intolerance for new TGI streaming response field 'index' Jan 30, 2024
@danielpcox danielpcox changed the title Fixing intolerance for new TGI streaming response field 'index' Fix intolerance for new TGI streaming response field 'index' Jan 30, 2024
@danielpcox danielpcox changed the title Fix intolerance for new TGI streaming response field 'index' Fix intolerance for new field in TGI stream response: 'index' Jan 30, 2024
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @danielpcox! Thanks a ton for reporting the issue, investigating it and opening a PR to fix it! The PR looks good to me 👍

I've triggered the CI. Let's wait for it to complete and then we should be good to merge 🤗

EDIT: I've just pushed a commit to your branch for styling issues. Hope that's fine with you.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor

Wauplin commented Feb 6, 2024

I've slightly iterated on the test and it's now ready to be merged! CI is currently failing but it's unrelated. Thanks again!

@Wauplin Wauplin merged commit 5433ea9 into huggingface:main Feb 6, 2024
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextGenerationStreamResponse missing a key present in the stream response
3 participants