[PR #10711] [MERGED] fix: Include usage in chatCompleted handler for pipeline outlet functions #9378

Closed
opened 2025-11-11 18:21:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/10711
Author: @jasonpnnl
Created: 2/24/2025
Status: Merged
Merged: 2/25/2025
Merged by: @tjbck

Base: devHead: send-usage-to-pipeline-outlet


📝 Commits (1)

  • 89aaf64 add optional usage to chatCompleted messages

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 src/lib/components/chat/Chat.svelte (+1 -0)

📄 Description

Changelog Entry

Description

  • This includes usage data if it exists in the chatCompleted handler which allows it to be processed in the filter pipeline outlet. I'm assuming this was functional at one point because pipelines, such as the Langfuse filter pipeline seem to assume it will be available but usage would never be passed to the outlet as code is currently. The langfuse filter is looking for info but this doesn't seem consistent with OpenAI so I left it as usage.

Fixed

  • This includes usage data if it exists in the chatCompleted handler which allows it to be processed in filter pipeline outlet functions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/10711 **Author:** [@jasonpnnl](https://github.com/jasonpnnl) **Created:** 2/24/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `send-usage-to-pipeline-outlet` --- ### 📝 Commits (1) - [`89aaf64`](https://github.com/open-webui/open-webui/commit/89aaf64209f4517b05c71648262eea1e870bc544) add optional usage to chatCompleted messages ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+1 -0) </details> ### 📄 Description # Changelog Entry ### Description - This includes usage data if it exists in the chatCompleted handler which allows it to be processed in the filter pipeline outlet. I'm assuming this was functional at one point because pipelines, such as the [Langfuse filter pipeline](https://github.com/open-webui/pipelines/blob/main/examples/filters/langfuse_filter_pipeline.py) seem to assume it will be available but usage would never be passed to the outlet as code is currently. The langfuse filter is looking for info but this doesn't seem consistent with OpenAI so I left it as usage. ### Fixed - This includes usage data if it exists in the chatCompleted handler which allows it to be processed in filter pipeline outlet functions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 18:21:09 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#9378