mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 04:20:44 +02:00
feat(retrieval): add Perplexity attribution header (#24833)
Signed-off-by: James Liounis <james.liounis@perplexity.ai>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user