mirror of
https://github.com/open-webui/pipelines.git
synced 2026-11-05 01:37:24 +00:00
[PR #430] [CLOSED] Outlet Langfuse Logging with chat_id Retention #419
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/pipelines#419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/pipelines/pull/430
Author: @resqnet
Created: 2/19/2025
Status: ❌ Closed
Base:
main← Head:add_langfuse_pipeline_outlet📝 Commits (2)
ee52551add langfuse pipline outleteff7d5bRefactor: Remove unnecessary cache and exclude last assistant message from input to maintain context integrity📊 Changes
1 file changed (+145 additions, -0 deletions)
View changed files
➕
examples/filters/langfuse_filter_pipeline_outlet.py(+145 -0)📄 Description
According to Issue #415, in the latest version, the pipe function is executed before the inlet function, resulting in the following problems:
Problems:
The inlet is expected to extract the chat_id from the request body and add or modify it in the body. However, since the pipe executes first, this process is not completed, leaving the chat_id absent.
The pipe function attempts to extract the chat_id from the body for processing, but without the correct chat_id, inconsistencies occur in log retrieval and various processes. Additionally, there is an issue where the inlet is not being called properly in the first place.
Proposal: To address the problem where the pipe function initiates before the chat_id extraction process in the inlet, we propose changing the log generation method to the outlet side. With this change, the chat_id will be correctly preserved on the outlet side, ensuring that Langfuse logs are reliably retrieved. Although future adjustments to the execution order and configurations should be considered, this approach of retrieving logs on the outlet side is proposed as a way to bypass the current issue.
Change Details:
Changed the implementation to generate Langfuse logs on the outlet side, removing dependency on the chat_id extraction process in the inlet.
Added processing to reliably obtain the chat_id from request information during log generation on the outlet and attach it to the log.
Verification:
Verified that the changes do not affect existing pipeline processing and that logs are retrieved correctly.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.