-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Obs AI Assistant] Remove TokenCountEvent #209549
Conversation
withLatestFrom(withoutTokenCount$), | ||
withLatestFrom(shared.pipe(filterChunkEvents())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this? I think so but the previous naming was confusing.
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
x-pack/platform/plugins/shared/observability_ai_assistant/server/routes/runtime_types.ts
Outdated
Show resolved
Hide resolved
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
nextEvents$, | ||
title$.pipe(filter((value): value is TokenCountEvent => typeof value !== 'string')) | ||
).pipe(extractTokenCount()), | ||
nextEvents$.pipe(extractMessages()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better!
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Public APIs missing exports
Page load bundle
History
|
Starting backport for target branches: 9.0 |
Closes elastic#205479 This filters out the `ChatCompletionTokenCountEvent` from the inference plugin. This greatly simplifies handling ChatCompletion events in the Obs AI Assistant. (cherry picked from commit c4826bd)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.0`: - [[Obs AI Assistant] Remove TokenCountEvent (#209549)](#209549) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Søren Louv-Jansen","email":"soren.louv@elastic.co"},"sourceCommit":{"committedDate":"2025-02-20T17:59:19Z","message":"[Obs AI Assistant] Remove TokenCountEvent (#209549)\n\nCloses https://github.com/elastic/kibana/issues/205479\n\nThis filters out the `ChatCompletionTokenCountEvent` from the inference\nplugin. This greatly simplifies handling ChatCompletion events in the\nObs AI Assistant.","sha":"c4826bdfbfb88a31b455d2647e0268f8ffb4299f","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","Team:Obs AI Assistant","ci:project-deploy-observability","v9.1.0"],"title":"[Obs AI Assistant] Remove TokenCountEvent","number":209549,"url":"https://github.com/elastic/kibana/pull/209549","mergeCommit":{"message":"[Obs AI Assistant] Remove TokenCountEvent (#209549)\n\nCloses https://github.com/elastic/kibana/issues/205479\n\nThis filters out the `ChatCompletionTokenCountEvent` from the inference\nplugin. This greatly simplifies handling ChatCompletion events in the\nObs AI Assistant.","sha":"c4826bdfbfb88a31b455d2647e0268f8ffb4299f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209549","number":209549,"mergeCommit":{"message":"[Obs AI Assistant] Remove TokenCountEvent (#209549)\n\nCloses https://github.com/elastic/kibana/issues/205479\n\nThis filters out the `ChatCompletionTokenCountEvent` from the inference\nplugin. This greatly simplifies handling ChatCompletion events in the\nObs AI Assistant.","sha":"c4826bdfbfb88a31b455d2647e0268f8ffb4299f"}}]}] BACKPORT--> Co-authored-by: Søren Louv-Jansen <soren.louv@elastic.co>
Closes #205479
This filters out the
ChatCompletionTokenCountEvent
from the inference plugin. This greatly simplifies handling ChatCompletion events in the Obs AI Assistant.