[PR #6324] [MERGED] feat: Allow URL in citations to be different from the displayed name #8655

Closed
opened 2025-11-11 18:02:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/6324
Author: @RocketRider
Created: 10/22/2024
Status: Merged
Merged: 10/22/2024
Merged by: @tjbck

Base: devHead: patch-2


📝 Commits (2)

  • 41bd16a don't overwrite name, keep url separate
  • 9153525 use url if available as document link

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 src/lib/components/chat/Messages/Citations.svelte (+1 -1)
📝 src/lib/components/chat/Messages/CitationsModal.svelte (+2 -2)

📄 Description

I have a RAG based Backend which hosts the source documents on a different server. When calling it through the OpenAI Interface, I am returning the citations but currently I was not able to set the displayed name independent of the URL.
I want the displayed name to be something like "myPDF.pdf" but it should link in the modal view to "http://test.de/myPDF.pdf". In order to do that, I had to remove the overwrite of the source.name field. It was getting overwritten as soon as the id is an URL. I now added a separate field url, that is set from the id, if it is an url.

Before:
image

After:
image

The documentation does currently not at all mention this capability of providing citations through the OpenAI Interface.

Changelog Entry

Description

  • Allow an external URL in citations, but still display the filename to the user.

🔄 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/6324 **Author:** [@RocketRider](https://github.com/RocketRider) **Created:** 10/22/2024 **Status:** ✅ Merged **Merged:** 10/22/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `patch-2` --- ### 📝 Commits (2) - [`41bd16a`](https://github.com/open-webui/open-webui/commit/41bd16acbe9fc4b129be8adcadbcb4340fb32be9) don't overwrite name, keep url separate - [`9153525`](https://github.com/open-webui/open-webui/commit/9153525c8410956e5342c9101d98fcc4ac367358) use url if available as document link ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Messages/Citations.svelte` (+1 -1) 📝 `src/lib/components/chat/Messages/CitationsModal.svelte` (+2 -2) </details> ### 📄 Description I have a RAG based Backend which hosts the source documents on a different server. When calling it through the OpenAI Interface, I am returning the citations but currently I was not able to set the displayed name independent of the URL. I want the displayed name to be something like "myPDF.pdf" but it should link in the modal view to "http://test.de/myPDF.pdf". In order to do that, I had to remove the overwrite of the source.name field. It was getting overwritten as soon as the id is an URL. I now added a separate field url, that is set from the id, if it is an url. Before: ![image](https://github.com/user-attachments/assets/76267e5a-5d21-4b34-ac73-446a4f9b2847) After: ![image](https://github.com/user-attachments/assets/b0db4772-a3c7-4441-8067-4ba0c8fe22bd) The documentation does currently not at all mention this capability of providing citations through the OpenAI Interface. # Changelog Entry ### Description - Allow an external URL in citations, but still display the filename to the user. --- <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 2025-11-11 18:02:09 -06: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#8655