-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
OpenAI: Ignore chunks with an empty choices
list
#192951
Merged
pgayvallet
merged 2 commits into
elastic:main
from
pgayvallet:kbn-xxx-openAI-ignore-empty-choice-events
Sep 15, 2024
Merged
OpenAI: Ignore chunks with an empty choices
list
#192951
pgayvallet
merged 2 commits into
elastic:main
from
pgayvallet:kbn-xxx-openAI-ignore-empty-choice-events
Sep 15, 2024
Conversation
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
/ci |
dgieselaar
approved these changes
Sep 14, 2024
botelastic
bot
added
ci:project-deploy-observability
Create an Observability project
Team:Obs AI Assistant
labels
Sep 14, 2024
pgayvallet
added
release_note:skip
Skip the PR/issue when compiling release notes
v9.0.0
backport:prev-minor
Backport to the previous minor version (i.e. one version back from main)
v8.16.0
Team:AI Infra
AppEx AI Infrastructure Team
and removed
Team:Obs AI Assistant
ci:project-deploy-observability
Create an Observability project
labels
Sep 14, 2024
Pinging @elastic/appex-ai-infra (Team:AI Infra) |
kobelb
approved these changes
Sep 14, 2024
botelastic
bot
added
ci:project-deploy-observability
Create an Observability project
Team:Obs AI Assistant
labels
Sep 14, 2024
…re-empty-choice-events
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Sep 15, 2024
## 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. (cherry picked from commit 8bffd61)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
This was referenced Sep 15, 2024
kibanamachine
added a commit
that referenced
this pull request
Sep 15, 2024
…192951) (#192960) # Backport This will backport the following commits from `main` to `8.x`: - [OpenAI: Ignore chunks with an empty `choices` list (#192951)](#192951) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pierre Gayvallet","email":"pierre.gayvallet@elastic.co"},"sourceCommit":{"committedDate":"2024-09-15T18:28:44Z","message":"OpenAI: Ignore chunks with an empty `choices` list (#192951)\n\n## Summary\r\n\r\nOpenAI added usage stats to their APIs recently:\r\nhttps://community.openai.com/t/usage-stats-now-available-when-using-streaming-with-the-chat-completions-api-or-completions-api/738156\r\n\r\nHowever, it's somewhat non BWC:\r\n\r\n> Note that this usage-specific chunk will have choices: [], so if you\r\nturn this feature on, you may need to update any code that accesses\r\n\r\n(Héhéhé)\r\n\r\nLeveraging this feature is for another day. This PR is just about\r\navoiding the whole thing to explode.","sha":"8bffd618059aacc30d6190a0d143d8b0c7217faf","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:Obs AI Assistant","ci:project-deploy-observability","v8.16.0","Team:AI Infra"],"title":"OpenAI: Ignore chunks with an empty `choices` list","number":192951,"url":"#192951: Ignore chunks with an empty `choices` list (#192951)\n\n## Summary\r\n\r\nOpenAI added usage stats to their APIs recently:\r\nhttps://community.openai.com/t/usage-stats-now-available-when-using-streaming-with-the-chat-completions-api-or-completions-api/738156\r\n\r\nHowever, it's somewhat non BWC:\r\n\r\n> Note that this usage-specific chunk will have choices: [], so if you\r\nturn this feature on, you may need to update any code that accesses\r\n\r\n(Héhéhé)\r\n\r\nLeveraging this feature is for another day. This PR is just about\r\navoiding the whole thing to explode.","sha":"8bffd618059aacc30d6190a0d143d8b0c7217faf"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"#192951: Ignore chunks with an empty `choices` list (#192951)\n\n## Summary\r\n\r\nOpenAI added usage stats to their APIs recently:\r\nhttps://community.openai.com/t/usage-stats-now-available-when-using-streaming-with-the-chat-completions-api-or-completions-api/738156\r\n\r\nHowever, it's somewhat non BWC:\r\n\r\n> Note that this usage-specific chunk will have choices: [], so if you\r\nturn this feature on, you may need to update any code that accesses\r\n\r\n(Héhéhé)\r\n\r\nLeveraging this feature is for another day. This PR is just about\r\navoiding the whole thing to explode.","sha":"8bffd618059aacc30d6190a0d143d8b0c7217faf"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
pgayvallet
added a commit
that referenced
this pull request
Sep 16, 2024
## Summary Follow-up of #192951 to address the missing bits (given I don't know how to grep)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Sep 16, 2024
) ## Summary Follow-up of elastic#192951 to address the missing bits (given I don't know how to grep) (cherry picked from commit 08b682f)
kibanamachine
added a commit
that referenced
this pull request
Sep 16, 2024
…is) (#192961) (#192978) # Backport This will backport the following commits from `main` to `8.x`: - [OpenAI: Ignore chunks with an empty `choices` list (bis) (#192961)](#192961) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pierre Gayvallet","email":"pierre.gayvallet@elastic.co"},"sourceCommit":{"committedDate":"2024-09-16T09:06:54Z","message":"OpenAI: Ignore chunks with an empty `choices` list (bis) (#192961)\n\n## Summary\r\n\r\nFollow-up of #192951 to address\r\nthe missing bits (given I don't know how to grep)","sha":"08b682fbd5f78ac82b42ddc7109e79f89e4ed961","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:Obs AI Assistant","ci:project-deploy-observability","v8.16.0","Team:AI Infra"],"title":"OpenAI: Ignore chunks with an empty `choices` list (bis)","number":192961,"url":"#192961: Ignore chunks with an empty `choices` list (bis) (#192961)\n\n## Summary\r\n\r\nFollow-up of #192951 to address\r\nthe missing bits (given I don't know how to grep)","sha":"08b682fbd5f78ac82b42ddc7109e79f89e4ed961"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"#192961: Ignore chunks with an empty `choices` list (bis) (#192961)\n\n## Summary\r\n\r\nFollow-up of #192951 to address\r\nthe missing bits (given I don't know how to grep)","sha":"08b682fbd5f78ac82b42ddc7109e79f89e4ed961"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
markov00
pushed a commit
to markov00/kibana
that referenced
this pull request
Sep 18, 2024
## 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.
markov00
pushed a commit
to markov00/kibana
that referenced
this pull request
Sep 18, 2024
) ## Summary Follow-up of elastic#192951 to address the missing bits (given I don't know how to grep)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport:prev-minor
Backport to the previous minor version (i.e. one version back from main)
ci:project-deploy-observability
Create an Observability project
release_note:skip
Skip the PR/issue when compiling release notes
Team:AI Infra
AppEx AI Infrastructure Team
Team:Obs AI Assistant
v8.16.0
v9.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
(Héhéhé)
Leveraging this feature is for another day. This PR is just about avoiding the whole thing to explode.