mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
feat(retrieval): add Perplexity attribution header (#24833)
Signed-off-by: James Liounis <james.liounis@perplexity.ai>
This commit is contained in:
parent
c8eb8edca4
commit
69c88e163d
2 changed files with 4 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import logging
|
|||
from typing import Literal, Optional
|
||||
|
||||
import requests
|
||||
from open_webui.env import VERSION
|
||||
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
|
||||
|
||||
MODELS = Literal[
|
||||
|
|
@ -64,6 +65,7 @@ def search_perplexity(
|
|||
headers = {
|
||||
'Authorization': f'Bearer {api_key}',
|
||||
'Content-Type': 'application/json',
|
||||
'X-Pplx-Integration': f'open-webui/{VERSION}',
|
||||
}
|
||||
|
||||
# Make the API request
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import logging
|
|||
from typing import Literal, Optional
|
||||
|
||||
import requests
|
||||
from open_webui.env import VERSION
|
||||
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
|
||||
from open_webui.utils.headers import include_user_info_headers
|
||||
|
||||
|
|
@ -47,6 +48,7 @@ def search_perplexity_search(
|
|||
headers = {
|
||||
'Authorization': f'Bearer {api_key}',
|
||||
'Content-Type': 'application/json',
|
||||
'X-Pplx-Integration': f'open-webui/{VERSION}',
|
||||
}
|
||||
|
||||
# Forward user info headers if user is provided
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue