forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenAI: Ignore chunks with an empty
choices
list (elastic#192951)
## Summary OpenAI added usage stats to their APIs recently: https://community.openai.com/t/usage-stats-now-available-when-using-streaming-with-the-chat-completions-api-or-completions-api/738156 However, it's somewhat non BWC: > Note that this usage-specific chunk will have choices: [], so if you turn this feature on, you may need to update any code that accesses (Héhéhé) Leveraging this feature is for another day. This PR is just about avoiding the whole thing to explode.
- Loading branch information
1 parent
7b3fa3a
commit 8bffd61
Showing
3 changed files
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters