feat: Add sougou web search API for backend, add config panel in for frontend.

This commit is contained in:
Youggls
2025-04-10 14:51:44 +08:00
parent 6c9a4d6ce6
commit 3e2a6df1fb
9 changed files with 129 additions and 1 deletions

View File

@@ -30,7 +30,8 @@
'jina',
'bing',
'exa',
'perplexity'
'perplexity',
'sougou'
];
let youtubeLanguage = 'en';
@@ -404,6 +405,31 @@
/>
</div>
</div>
{:else if webConfig.search.engine === 'sougou'}
<div class="mb-2.5 flex w-full flex-col">
<div>
<div class=" self-center text-xs font-medium mb-1">
{$i18n.t('Sougou Search API sID')}
</div>
<SensitiveInput
placeholder={$i18n.t('Enter Sougou Search API sID')}
bind:value={webConfig.search.sougou_api_sid}
/>
</div>
</div>
<div class="mb-2.5 flex w-full flex-col">
<div>
<div class=" self-center text-xs font-medium mb-1">
{$i18n.t('Sougou Search API SK')}
</div>
<SensitiveInput
placeholder={$i18n.t('Enter Sougou Search API SK')}
bind:value={webConfig.search.sougou_api_sk}
/>
</div>
</div>
{/if}
{/if}

View File

@@ -424,6 +424,8 @@
"Enter Mojeek Search API Key": "",
"Enter Number of Steps (e.g. 50)": "",
"Enter Perplexity API Key": "",
"Enter Sougou Search API sID": "",
"Enter Sougou Search API SK": "",
"Enter proxy URL (e.g. https://user:password@host:port)": "",
"Enter reasoning effort": "",
"Enter Sampler (e.g. Euler a)": "",
@@ -822,6 +824,8 @@
"Permission denied when accessing microphone: {{error}}": "",
"Permissions": "",
"Perplexity API Key": "",
"Sougou Search API sID": "",
"Sougou Search API SK": "",
"Personalization": "",
"Pin": "",
"Pinned": "",

View File

@@ -424,6 +424,8 @@
"Enter Mojeek Search API Key": "输入 Mojeek Search API 密钥",
"Enter Number of Steps (e.g. 50)": "输入步骤数 (Steps) (例如50)",
"Enter Perplexity API Key": "输入 Perplexity API 密钥",
"Enter Sougou Search API sID": "输入搜狗搜索 API 的 Secret ID",
"Enter Sougou Search API SK": "输入搜狗搜索 API 的 Secret Key",
"Enter proxy URL (e.g. https://user:password@host:port)": "输入代理 URL (例如https://用户名:密码@主机名:端口)",
"Enter reasoning effort": "设置推理努力",
"Enter Sampler (e.g. Euler a)": "输入 Sampler (例如Euler a)",
@@ -822,6 +824,8 @@
"Permission denied when accessing microphone: {{error}}": "申请麦克风权限被拒绝:{{error}}",
"Permissions": "权限",
"Perplexity API Key": "Perplexity API 密钥",
"Sougou Search API sID": "搜狗搜索 API 的 Secret ID",
"Sougou Search API SK": "搜狗搜索 API 的 Secret Key",
"Personalization": "个性化",
"Pin": "置顶",
"Pinned": "已置顶",