Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
feat: Introduces a new feature or enhancement to the codebase
Changelog Entry
Description
Added support for Perplexity Sonar citations/sources to be displayed in a chat window with links instead of raw numbers like [1], [2] and so on.
Added
Supports "citations" key returned from LLM via API.
Emitting sources once full message (in case of stream after collecting all chunks) is received.
Changed
Updated index.ts to properly handle the source numbers, previously it assumed that sources starts from 0. In Perplexity Sonar sources start from 1 so updated the handling of both.
Added "suppress_sources" for tasks like, generating title, emoji etc. to do not emit sources in such case.
🔄 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/11216
**Author:** [@yazon](https://github.com/yazon)
**Created:** 3/5/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `perplexity-sources`
---
### 📝 Commits (3)
- [`1a51584`](https://github.com/open-webui/open-webui/commit/1a51584fe02ba917e229f52367363ff783babd22) Merge pull request #10939 from open-webui/dev
- [`a2f1dca`](https://github.com/open-webui/open-webui/commit/a2f1dcac16965c243d020d824bb2348523ff4692) Added support for citations/sources for functions, like Perplexity Sonar
- [`20252e6`](https://github.com/open-webui/open-webui/commit/20252e6df2526bd82c7451b5f3a821256e072a30) Added support for citations/sources for functions, like Perplexity Sonar
### 📊 Changes
**3 files changed** (+112 additions, -14 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/functions.py` (+84 -9)
📝 `backend/open_webui/routers/tasks.py` (+7 -0)
📝 `src/lib/utils/index.ts` (+21 -5)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
Discussion: https://github.com/open-webui/open-webui/discussions/11212
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for validating the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **feat**: Introduces a new feature or enhancement to the codebase
# Changelog Entry
### Description
- Added support for Perplexity Sonar citations/sources to be displayed in a chat window with links instead of raw numbers like [1], [2] and so on.
### Added
- Supports "citations" key returned from LLM via API.
- Emitting sources once full message (in case of stream after collecting all chunks) is received.
### Changed
- Updated index.ts to properly handle the source numbers, previously it assumed that sources starts from 0. In Perplexity Sonar sources start from 1 so updated the handling of both.
- Added "suppress_sources" for tasks like, generating title, emoji etc. to do not emit sources in such case.
---
### Additional Information
- Updated Perplexity Sonar Pipe is here: https://openwebui.com/f/yazon/perplexity_sonar_api_with_citations
### Screenshots or Videos
https://github.com/user-attachments/assets/df62d56e-41b8-40fd-a8d8-c61a7807a46f
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/11216
Author: @yazon
Created: 3/5/2025
Status: ❌ Closed
Base:
dev← Head:perplexity-sources📝 Commits (3)
1a51584Merge pull request #10939 from open-webui/deva2f1dcaAdded support for citations/sources for functions, like Perplexity Sonar20252e6Added support for citations/sources for functions, like Perplexity Sonar📊 Changes
3 files changed (+112 additions, -14 deletions)
View changed files
📝
backend/open_webui/functions.py(+84 -9)📝
backend/open_webui/routers/tasks.py(+7 -0)📝
src/lib/utils/index.ts(+21 -5)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Discussion: https://github.com/open-webui/open-webui/discussions/11212
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Additional Information
Screenshots or Videos
https://github.com/user-attachments/assets/df62d56e-41b8-40fd-a8d8-c61a7807a46f
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.