mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #23238] [CLOSED] fix: remove invalid db kwarg from process_files_batch call #27099
Reference in New Issue
Block a user
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/open-webui/pull/23238
Author: @IgnazioDS
Created: 3/30/2026
Status: ❌ Closed
Base:
main← Head:fix/process-files-batch-db-kwarg📝 Commits (1)
83dae63fix: remove invalid db kwarg from process_files_batch call📊 Changes
1 file changed (+0 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+0 -1)📄 Description
Summary
process_files_batch()does not accept adbkeyword argument, butadd_files_to_knowledge_batchpassesdb=dbwhen calling it, which raises aTypeErrorat runtime.Root cause: The function signature in
routers/retrieval.pyintentionally omitsdbbecause it makes long-running external embedding API calls (5–60+ seconds) and manages its own short-lived DB sessions internally.Fix: Remove the
db=dbline from the call inknowledge.py.Fixes #23137
Change
Test plan
POST /api/v1/knowledge/{id}/files/batchwith a valid collection — should no longer raiseTypeError: process_files_batch() got an unexpected keyword argument 'db'🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.