[GH-ISSUE #7518] query_collection got an unexpected keyword argument 'query' via API #30303

Closed
opened 2026-04-25 04:33:43 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jakern on GitHub (Dec 1, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7518

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: v0.4.7 & 0.4.6

  • Ollama (if applicable): 0.3.14

  • Operating System: Ubuntu 22.04- like

  • Browser (if applicable): Chromium 131
    Confirmation:

  • I have read and followed all the instructions provided in the README.md.

  • I am on the latest version of both Open WebUI and Ollama.

  • I have included the browser console logs.

  • I have included the Docker container logs.

  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

I am attempting to hit the /query/collection logs via swagger docs using collection name returned by /process/web API endpoint.

example request I think should work

curl -X 'POST' \
  'http://localhost:3000/retrieval/api/v1/query/collection' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "collection_names": [
    "eae9c4a8177e334d457a2cd8a9353f55058ee1cc4e1c9406e4c1d8f7a88deef"
  ],
  "query": "test",
  "k": 0,
  "r": 0,
  "hybrid": true
}'

should return a string from that collection.

Actual Behavior:

Actually returns 400 error

{
  "detail": "[ERROR: query_collection() got an unexpected keyword argument 'query']"
}

removing query field gives expected "field required" message

Description

Bug Summary:
see expected behavior

Reproduction Details

Steps to Reproduce:
see expected behavior

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:

ERROR [open_webui.apps.retrieval.main] query_collection() got an unexpected keyword argument 'query'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/main.py", line 1411, in query_collection_handler
    return query_collection(
           ^^^^^^^^^^^^^^^^^
TypeError: query_collection() got an unexpected keyword argument 'query'
INFO:     172.17.0.1:55524 - "POST /retrieval/api/v1/query/collection HTTP/1.1" 400 Bad Request
Originally created by @jakern on GitHub (Dec 1, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7518 # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.4.7 & 0.4.6 - **Ollama (if applicable):** 0.3.14 - **Operating System:** Ubuntu 22.04- like - **Browser (if applicable):** Chromium 131 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: I am attempting to hit the /query/collection logs via swagger docs using collection name returned by /process/web API endpoint. example request I think should work ``` curl -X 'POST' \ 'http://localhost:3000/retrieval/api/v1/query/collection' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "collection_names": [ "eae9c4a8177e334d457a2cd8a9353f55058ee1cc4e1c9406e4c1d8f7a88deef" ], "query": "test", "k": 0, "r": 0, "hybrid": true }' ``` should return a string from that collection. ## Actual Behavior: Actually returns 400 error ``` { "detail": "[ERROR: query_collection() got an unexpected keyword argument 'query']" } ``` removing query field gives expected "field required" message ## Description **Bug Summary:** see expected behavior ## Reproduction Details **Steps to Reproduce:** see expected behavior ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** ``` ERROR [open_webui.apps.retrieval.main] query_collection() got an unexpected keyword argument 'query' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/main.py", line 1411, in query_collection_handler return query_collection( ^^^^^^^^^^^^^^^^^ TypeError: query_collection() got an unexpected keyword argument 'query' INFO: 172.17.0.1:55524 - "POST /retrieval/api/v1/query/collection HTTP/1.1" 400 Bad Request ```
Author
Owner

@tjbck commented on GitHub (Dec 1, 2024):

Good catch, fixed on dev!

<!-- gh-comment-id:2510261778 --> @tjbck commented on GitHub (Dec 1, 2024): Good catch, fixed on dev!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#30303