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 truss predict for content-type as text. #572

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

squidarth
Copy link
Collaborator

Depending on the content-type of the response, requests response.iter_content will either yield a series of bytes objects, or a series of strings.

Prior to this change, we were assuming only bytes would come back, which is an issue for TGI, which seems to send back a text content-type.

Fix by only decoding bytes.

@squidarth squidarth requested review from bolasim and aspctu August 16, 2023 02:47
@squidarth squidarth merged commit 96d13ae into main Aug 16, 2023
@squidarth squidarth deleted the sshanker/dont-decode-strings branch August 16, 2023 16:05
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.

2 participants