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

Avoid bogus access to json.choices.delta.content #71

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

ccreutzi
Copy link
Member

@ccreutzi ccreutzi commented Aug 5, 2024

The streaming interface sometimes responds with something like json.choices = {"index":0,"delta":{},"logprobs":[],"finish_reason":"length"}. Stop blindly assuming json.choices.delta.content exists.

The streaming interface sometimes responds with something like `json.choices = {"index":0,"delta":{},"logprobs":[],"finish_reason":"length"}`. Stop blindly assuming `json.choices.delta.content` exists.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.10%. Comparing base (e72cc99) to head (53c1df5).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #71   +/-   ##
=======================================
  Coverage   97.10%   97.10%           
=======================================
  Files          40       40           
  Lines        1347     1349    +2     
=======================================
+ Hits         1308     1310    +2     
  Misses         39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ccreutzi ccreutzi merged commit fce8bb8 into main Aug 5, 2024
1 check passed
@ccreutzi ccreutzi deleted the avoid-content-error branch August 5, 2024 15:02
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.

4 participants