[PR #9505] [MERGED] Update jina_search.py #22381

Closed
opened 2026-04-20 04:06:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/9505
Author: @binxn
Created: 2/6/2025
Status: Merged
Merged: 2/7/2025
Merged by: @tjbck

Base: devHead: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+16 additions, -4 deletions)

View changed files

📝 backend/open_webui/retrieval/web/jina_search.py (+16 -4)

📄 Description

Description

Updated Jina's search function in order to use POST and make use of the result count passed by the user, as well as adding a header to not return the images possibly found on the search reducing token usage.

Added

  • "Content-Type": "application/json" header
  • "X-Retain-Images": "none" header
  • Added a payload variable containing the query and result count (capped at 10)

Changed

  • Replaced GET request by a POST request

Removed

  • [:count] cap on the data["data"] loop because we are already asking Jina to return the result count specified by the user

Additional Information

  • Jina supports a max of 10 result count

🔄 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/9505 **Author:** [@binxn](https://github.com/binxn) **Created:** 2/6/2025 **Status:** ✅ Merged **Merged:** 2/7/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`88db4ca`](https://github.com/open-webui/open-webui/commit/88db4ca7babc232f9bbb2962bb078178deb038b6) Update jina_search.py ### 📊 Changes **1 file changed** (+16 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/web/jina_search.py` (+16 -4) </details> ### 📄 Description ### Description Updated Jina's search function in order to use POST and make use of the result count passed by the user, as well as adding a header to not return the images possibly found on the search reducing token usage. ### Added - `"Content-Type": "application/json"` header - `"X-Retain-Images": "none"` header - Added a `payload `variable containing the query and result count (capped at 10) ### Changed - Replaced GET request by a POST request ### Removed - `[:count]` cap on the `data["data"]` loop because we are already asking Jina to return the result count specified by the user --- ### Additional Information - Jina supports a max of 10 result count --- <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 04:06:33 -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#22381