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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/7973
Author: @gabriel-ecegi
Created: 12/20/2024
Status: ❌ Closed
Base:
dev← Head:empty_collection_files_fix📝 Commits (1)
d05490fenh: 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
devbranchfix:prefix as this addresses a bug/improvementChangelog 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
middleware.pyto exclude empty collections during chat completion processing.Fixed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.