mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #6324] [MERGED] feat: Allow URL in citations to be different from the displayed name #8655
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/6324
Author: @RocketRider
Created: 10/22/2024
Status: ✅ Merged
Merged: 10/22/2024
Merged by: @tjbck
Base:
dev← Head:patch-2📝 Commits (2)
41bd16adon't overwrite name, keep url separate9153525use 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:

After:

The documentation does currently not at all mention this capability of providing citations through the OpenAI Interface.
Changelog Entry
Description
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.