[PR #430] [CLOSED] Outlet Langfuse Logging with chat_id Retention #419

Closed
opened 2026-10-18 21:05:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • ee52551 add langfuse pipline outlet
  • eff7d5b Refactor: 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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/pipelines/pull/430 **Author:** [@resqnet](https://github.com/resqnet) **Created:** 2/19/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add_langfuse_pipeline_outlet` --- ### 📝 Commits (2) - [`ee52551`](https://github.com/open-webui/pipelines/commit/ee5255144f5a8f8efa5041b8e2084f27056f0c17) add langfuse pipline outlet - [`eff7d5b`](https://github.com/open-webui/pipelines/commit/eff7d5bc3aec9e6d402c266155d6e38901404a49) Refactor: Remove unnecessary cache and exclude last assistant message from input to maintain context integrity ### 📊 Changes **1 file changed** (+145 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `examples/filters/langfuse_filter_pipeline_outlet.py` (+145 -0) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:05:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/pipelines#419
No description provided.