[PR #6665] [CLOSED] fix: Passing chat metadata to Pipe functions as an extra param #8728

Closed
opened 2025-11-11 18:04:23 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/6665
Author: @DmitriyAlergant
Created: 11/3/2024
Status: Closed

Base: devHead: metadata_to_pipe_functions


📝 Commits (1)

  • 6166559 Passing chat metadata to Pipe functions (as extra param if they want it)

📊 Changes

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

View changed files

📝 backend/open_webui/apps/webui/main.py (+1 -0)

📄 Description

Pull Request Checklist

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

Added a capability to pass the "metadata" object (chat_id, message_id, session_id, tools) to Pipe functions as an extra param if it wants to accept it. Metadata can be useful to functions for logging purposes. Without this change, chat metadata is not available to Pipe functions.

Added

Changed

Passing "metadata" dict to Pipe functions as an optional extra param, if the pipe() function signature has it.
Previously, this param was not passed and was not available to Pipe functions.

Deprecated

Removed

Fixed

Security

Breaking Changes

Additional Information

Not sure if this should be considered a FEAT? Seems too small of a change for a feature. And it is clearly backwards compatible.


🔄 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/6665 **Author:** [@DmitriyAlergant](https://github.com/DmitriyAlergant) **Created:** 11/3/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `metadata_to_pipe_functions` --- ### 📝 Commits (1) - [`6166559`](https://github.com/open-webui/open-webui/commit/6166559794a443a0ea7b098311c6d0f4107feb3e) Passing chat metadata to Pipe functions (as extra param if they want it) ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/apps/webui/main.py` (+1 -0) </details> ### 📄 Description # Pull Request Checklist - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Have you written and run sufficient tests for validating the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description Added a capability to pass the "metadata" object (chat_id, message_id, session_id, tools) to Pipe functions as an extra param if it wants to accept it. Metadata can be useful to functions for logging purposes. Without this change, chat metadata is not available to Pipe functions. ### Added ### Changed Passing "metadata" dict to Pipe functions as an optional extra param, if the pipe() function signature has it. Previously, this param was not passed and was not available to Pipe functions. ### Deprecated ### Removed ### Fixed ### Security ### Breaking Changes ### Additional Information Not sure if this should be considered a *FEAT*? Seems too small of a change for a feature. And it is clearly backwards compatible. --- <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:04:23 -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#8728