[PR #7973] [CLOSED] enh: filter empty collections #22142

Closed
opened 2026-04-20 03:56:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/7973
Author: @gabriel-ecegi
Created: 12/20/2024
Status: Closed

Base: devHead: empty_collection_files_fix


📝 Commits (1)

  • d05490f enh: filter empty collections

📊 Changes

1 file changed (+17 additions, -8 deletions)

View changed files

📝 backend/open_webui/utils/middleware.py (+17 -8)

📄 Description

Pull Request Checklist

  • Target branch: Pull request targets the dev branch
  • Description: Backend filtering for empty collections in completions
  • Changelog: Added below
  • Documentation: No documentation updates needed
  • Dependencies: No new dependencies
  • Testing: Code changes have been tested
  • Code review: Self-review completed
  • Prefix: Using fix: prefix as this addresses a bug/improvement

Changelog Entry

Description

This PR adds the logic for filtering out empty collections in completions to the backend. This ensures a cleaner separation of concerns and avoids redundant frontend handling.

Changed

  • Implemented file filtering in middleware.py to exclude empty collections during chat completion processing.

Fixed

  • Fixed issue where empty collections caused errors in hybrid search by handling them at the backend level.

🔄 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/7973 **Author:** [@gabriel-ecegi](https://github.com/gabriel-ecegi) **Created:** 12/20/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `empty_collection_files_fix` --- ### 📝 Commits (1) - [`d05490f`](https://github.com/open-webui/open-webui/commit/d05490f4ef4d6b85635ddf5fbe0e522e4a332721) enh: filter empty collections ### 📊 Changes **1 file changed** (+17 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/middleware.py` (+17 -8) </details> ### 📄 Description # Pull Request Checklist - [x] **Target branch:** Pull request targets the `dev` branch - [x] **Description:** Backend filtering for empty collections in completions - [x] **Changelog:** Added below - [x] **Documentation:** No documentation updates needed - [x] **Dependencies:** No new dependencies - [x] **Testing:** Code changes have been tested - [x] **Code review:** Self-review completed - [x] **Prefix:** Using `fix:` prefix as this addresses a bug/improvement # Changelog Entry ### Description This PR adds the logic for filtering out empty collections in completions to the backend. This ensures a cleaner separation of concerns and avoids redundant frontend handling. ### Changed - Implemented file filtering in `middleware.py` to exclude empty collections during chat completion processing. ### Fixed - Fixed issue where empty collections caused errors in hybrid search by handling them at the backend level. --- <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 2026-04-20 03:56:28 -05: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#22142