This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-18 10:45:35 +02:00
1 parent 86ffe37cd8
commit c152eac632
13 files changed
+43 -5

No files matched your search

@@ -18,6 +18,7 @@
let tavilyKey = $state('');
let braveKey = $state('');
let perplexityKey = $state('');
let perplexityBaseUrl = $state('');
let ccKey = $state('');
let ccBaseUrl = $state('');
let ccModel = $state('');
@@ -44,6 +45,7 @@
tavilyKey = (config['web.tavily_api_key'] as string) || '';
braveKey = (config['web.brave_api_key'] as string) || '';
perplexityKey = (config['web.perplexity_api_key'] as string) || '';
perplexityBaseUrl = (config['web.perplexity_base_url'] as string) || '';
ccKey = (config['web.chat_completions_api_key'] as string) || '';
ccBaseUrl = (config['web.chat_completions_base_url'] as string) || '';
ccModel = (config['web.chat_completions_model'] as string) || '';
@@ -74,6 +76,7 @@
'web.tavily_api_key': tavilyKey,
'web.brave_api_key': braveKey,
'web.perplexity_api_key': perplexityKey,
'web.perplexity_base_url': perplexityBaseUrl,
'web.chat_completions_api_key': ccKey,
'web.chat_completions_base_url': ccBaseUrl,
'web.chat_completions_model': ccModel,
@@ -185,6 +188,12 @@
class="w-full mt-1 h-7 px-2 rounded-lg text-xs bg-gray-100 dark:bg-white/6 text-gray-700 dark:text-gray-300 border border-gray-200 dark:border-white/8 outline-none focus:border-blue-400 dark:focus:border-blue-500 transition-colors" />
<p class="text-[11px] text-gray-400 dark:text-gray-600 mt-0.5">{$t('admin.webPerplexityHint')}</p>
</div>
<div>
<label class="text-xs text-gray-600 dark:text-gray-400" for="pplx-base-url">{$t('admin.webPerplexityBaseUrl')}</label>
<input id="pplx-base-url" type="text" bind:value={perplexityBaseUrl} placeholder="https://api.perplexity.ai"
class="w-full mt-1 h-7 px-2 rounded-lg text-xs bg-gray-100 dark:bg-white/6 text-gray-700 dark:text-gray-300 border border-gray-200 dark:border-white/8 outline-none focus:border-blue-400 dark:focus:border-blue-500 transition-colors" />
<p class="text-[11px] text-gray-400 dark:text-gray-600 mt-0.5">{$t('admin.webPerplexityBaseUrlHint')}</p>
</div>
{:else if searchProvider === 'chat_completions'}
<div>
<label class="text-xs text-gray-600 dark:text-gray-400" for="cc-base-url">{$t('admin.webCcBaseUrl')}</label>
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo benötigt keinen API-Schlüssel (Fallback).",
"admin.webPerplexityKey": "Perplexity API-Schlüssel",
"admin.webPerplexityHint": "API-Schlüssel unter perplexity.ai erhalten",
"admin.webPerplexityBaseUrl": "Basis-URL",
"admin.webPerplexityBaseUrlHint": "Leer lassen für api.perplexity.ai. Ändern für LiteLLM oder andere kompatible Proxys.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "Basis-URL",
"admin.webCcKey": "API-Schlüssel",
@@ -283,6 +283,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo requires no API key (fallback).",
"admin.webPerplexityKey": "Perplexity API Key",
"admin.webPerplexityHint": "Get your API key at perplexity.ai",
"admin.webPerplexityBaseUrl": "Base URL",
"admin.webPerplexityBaseUrlHint": "Leave blank for api.perplexity.ai. Change for LiteLLM or other compatible proxies.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "Base URL",
"admin.webCcKey": "API Key",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo no requiere clave de API (respaldo).",
"admin.webPerplexityKey": "Clave de API de Perplexity",
"admin.webPerplexityHint": "Obtén tu clave de API en perplexity.ai",
"admin.webPerplexityBaseUrl": "URL base",
"admin.webPerplexityBaseUrlHint": "Dejar en blanco para api.perplexity.ai. Cambiar para LiteLLM u otros proxies compatibles.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "URL base",
"admin.webCcKey": "Clave de API",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo ne nécessite aucune clé API (solution de repli).",
"admin.webPerplexityKey": "Clé API Perplexity",
"admin.webPerplexityHint": "Obtenez votre clé API sur perplexity.ai",
"admin.webPerplexityBaseUrl": "URL de base",
"admin.webPerplexityBaseUrlHint": "Laisser vide pour api.perplexity.ai. Modifier pour LiteLLM ou d'autres proxies compatibles.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "URL de base",
"admin.webCcKey": "Clé API",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGoはAPIキー不要です(フォールバック)。",
"admin.webPerplexityKey": "Perplexity APIキー",
"admin.webPerplexityHint": "perplexity.ai でAPIキーを取得",
"admin.webPerplexityBaseUrl": "ベースURL",
"admin.webPerplexityBaseUrlHint": "api.perplexity.ai を使用する場合は空欄。LiteLLM や他の互換プロキシの場合は変更してください。",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "ベースURL",
"admin.webCcKey": "APIキー",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo는 API 키가 필요 없습니다(대체).",
"admin.webPerplexityKey": "Perplexity API 키",
"admin.webPerplexityHint": "perplexity.ai에서 API 키를 받으세요",
"admin.webPerplexityBaseUrl": "기본 URL",
"admin.webPerplexityBaseUrlHint": "api.perplexity.ai를 사용하려면 비워두세요. LiteLLM 또는 기타 호환 프록시의 경우 변경하세요.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "기본 URL",
"admin.webCcKey": "API 키",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo não exige chave de API (fallback).",
"admin.webPerplexityKey": "Chave de API do Perplexity",
"admin.webPerplexityHint": "Obtenha sua chave de API em perplexity.ai",
"admin.webPerplexityBaseUrl": "URL base",
"admin.webPerplexityBaseUrlHint": "Deixe em branco para api.perplexity.ai. Altere para LiteLLM ou outros proxies compatíveis.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "URL base",
"admin.webCcKey": "Chave de API",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo не требует API-ключа (резервный вариант).",
"admin.webPerplexityKey": "API-ключ Perplexity",
"admin.webPerplexityHint": "Получите API-ключ на perplexity.ai",
"admin.webPerplexityBaseUrl": "Базовый URL",
"admin.webPerplexityBaseUrlHint": "Оставьте пустым для api.perplexity.ai. Измените для LiteLLM или других совместимых прокси.",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "Базовый URL",
"admin.webCcKey": "API-ключ",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo 不需要 API 密钥(备用)。",
"admin.webPerplexityKey": "Perplexity API 密钥",
"admin.webPerplexityHint": "在 perplexity.ai 获取你的 API 密钥",
"admin.webPerplexityBaseUrl": "基础 URL",
"admin.webPerplexityBaseUrlHint": "留空使用 api.perplexity.ai。如使用 LiteLLM 或其他兼容代理请修改。",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "基础 URL",
"admin.webCcKey": "API 密钥",
@@ -251,6 +251,8 @@
"admin.webDuckDuckGoNote": "DuckDuckGo 不需要 API 金鑰(備用)。",
"admin.webPerplexityKey": "Perplexity API 金鑰",
"admin.webPerplexityHint": "在 perplexity.ai 取得你的 API 金鑰",
"admin.webPerplexityBaseUrl": "基礎 URL",
"admin.webPerplexityBaseUrlHint": "留空使用 api.perplexity.ai。如使用 LiteLLM 或其他相容代理請修改。",
"admin.webChatCompletions": "Chat Completions",
"admin.webCcBaseUrl": "基礎 URL",
"admin.webCcKey": "API 金鑰",