mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #7698] Parameter mismatch in query_doc function call #14848
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?
Originally created by @juananpe on GitHub (Dec 8, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7698
Issue Description
I think that there is a parameter mismatch in the call to the
query_docfunction inbackend/open_webui/apps/retrieval/main.py. Thequery_docinutils.py:29a2719595/backend/open_webui/apps/retrieval/utils.py (L61-L65)function currently expects three parameters (
collection_name,query_embedding, andk), but four parameters (collection_name,query,embedding_function, andk) are being passed here:29a2719595/backend/open_webui/apps/retrieval/main.py (L1371-L1376)Proposed Solution
Modify the call to
query_docto compute thequery_embeddingusing theembedding_functionbefore passing it toquery_doc. Something like this:@tjbck commented on GitHub (Dec 10, 2024):
Good catch, fixed on dev!