feat: Enhance web search settings with blacklist and result configuration

- Update Tavily description across locales to emphasize AI agent capabilities
- Add blacklist functionality for web search results
- Introduce configurable maximum search results
- Improve localization for web search settings in multiple languages
This commit is contained in:
kangfenmao 2025-02-26 00:16:13 +08:00
parent 7e17987fa3
commit c6eb77ab8b
6 changed files with 32 additions and 12 deletions

View File

@ -825,10 +825,15 @@
"tavily": { "tavily": {
"api_key": "Tavily API Key", "api_key": "Tavily API Key",
"api_key.placeholder": "Enter Tavily API Key", "api_key.placeholder": "Enter Tavily API Key",
"description": "Tavily is a web search tool that integrates multiple search engines. It supports multiple languages and search engines.", "description": "Tavily is a search engine tailored for AI agents, delivering real-time, accurate results, intelligent query suggestions, and in-depth research capabilities.",
"title": "Tavily" "title": "Tavily"
}, },
"title": "Web Search" "title": "Web Search",
"blacklist": "Blacklist",
"blacklist_description": "Results from the following websites will not appear in search results",
"blacklist_tooltip": "Please use the following format (separated by line breaks)\nexample.com\nhttps://www.example.com\nhttps://example.com\n*://*.example.com",
"search_max_result": "Number of search results",
"search_result_default": "Default"
} }
}, },
"translate": { "translate": {

View File

@ -825,10 +825,15 @@
"tavily": { "tavily": {
"api_key": "Tavily API キー", "api_key": "Tavily API キー",
"api_key.placeholder": "Tavily API キーを入力してください", "api_key.placeholder": "Tavily API キーを入力してください",
"description": "Tavily は、複数の検索エンジンを統合したウェブ検索ツールです。多くの言語と検索エンジンをサポートしています。", "description": "Tavily は、AI エージェントのために特別に開発された検索エンジンで、最新の結果、インテリジェントな検索提案、そして深い研究能力を提供します",
"title": "Tavily" "title": "Tavily"
}, },
"title": "ウェブ検索" "title": "ウェブ検索",
"blacklist": "ブラックリスト",
"blacklist_description": "以下のウェブサイトの結果は検索結果に表示されません",
"blacklist_tooltip": "以下の形式を使用してください(改行区切り)\nexample.com\nhttps://www.example.com\nhttps://example.com\n*://*.example.com",
"search_max_result": "検索結果の数",
"search_result_default": "デフォルト"
} }
}, },
"translate": { "translate": {

View File

@ -825,10 +825,15 @@
"tavily": { "tavily": {
"api_key": "Ключ API Tavily", "api_key": "Ключ API Tavily",
"api_key.placeholder": "Введите ключ API Tavily", "api_key.placeholder": "Введите ключ API Tavily",
"description": "Tavily — это инструмент поиска в Интернете, интегрирующий несколько поисковых систем. Он поддерживает несколько языков и поисковых систем.", "description": "Tavily — это поисковая система, специально разработанная для ИИ-агентов, предоставляющая актуальные результаты, умные предложения по запросам и глубокие исследовательские возможности",
"title": "Tavily" "title": "Tavily"
}, },
"title": "Поиск в Интернете" "title": "Поиск в Интернете",
"blacklist": "Черный список",
"blacklist_description": "Результаты из следующих веб-сайтов не будут отображаться в результатах поиска",
"blacklist_tooltip": "Пожалуйста, используйте следующий формат (разделенный переносами строк)\nexample.com\nhttps://www.example.com\nhttps://example.com\n*://*.example.com",
"search_max_result": "Количество результатов поиска",
"search_result_default": "По умолчанию"
} }
}, },
"translate": { "translate": {

View File

@ -830,7 +830,7 @@
"tavily": { "tavily": {
"api_key": "Tavily API 密钥", "api_key": "Tavily API 密钥",
"api_key.placeholder": "请输入 Tavily API 密钥", "api_key.placeholder": "请输入 Tavily API 密钥",
"description": "Tavily 是一个集成了多个搜索引擎的网络搜索工具,支持多种语言和多种搜索引擎。", "description": "Tavily 是一个为 AI 代理量身定制的搜索引擎,提供实时、准确的结果、智能查询建议和深入的研究能力",
"title": "Tavily" "title": "Tavily"
}, },
"title": "网络搜索" "title": "网络搜索"

View File

@ -825,10 +825,15 @@
"tavily": { "tavily": {
"api_key": "Tavily API 密鑰", "api_key": "Tavily API 密鑰",
"api_key.placeholder": "請輸入 Tavily API 密鑰", "api_key.placeholder": "請輸入 Tavily API 密鑰",
"description": "Tavily 是一個集成了多個搜索引擎的網路搜索工具,支持多種語言和多種搜索引擎。", "description": "Tavily 是一個為 AI 代理量身定制的搜索引擎,提供即時、準確的結果、智能查詢建議和深入的研究能力",
"title": "Tavily" "title": "Tavily"
}, },
"title": "網路搜索" "title": "網路搜索",
"blacklist": "黑名單",
"blacklist_description": "以下網站不會出現在搜索結果中",
"blacklist_tooltip": "請使用以下格式(換行分隔)\nexample.com\nhttps://www.example.com\nhttps://example.com\n*://*.example.com",
"search_max_result": "搜索結果個數",
"search_result_default": "預設"
} }
}, },
"translate": { "translate": {

View File

@ -86,12 +86,12 @@ const WebSearchSettings: FC = () => {
<SettingGroup theme={theme}> <SettingGroup theme={theme}>
<SettingTitle>{t('settings.general.title')}</SettingTitle> <SettingTitle>{t('settings.general.title')}</SettingTitle>
<SettingDivider /> <SettingDivider />
<SettingRow> <SettingRow>
<SettingRowTitle>{t('settings.websearch.search_with_time')}</SettingRowTitle> <SettingRowTitle>{t('settings.websearch.search_with_time')}</SettingRowTitle>
<Switch checked={searchWithTime} onChange={(checked) => dispatch(setSearchWithTime(checked))} /> <Switch checked={searchWithTime} onChange={(checked) => dispatch(setSearchWithTime(checked))} />
</SettingRow> </SettingRow>
<SettingRow> <SettingDivider style={{ marginTop: 15, marginBottom: 5 }} />
<SettingRow style={{ marginBottom: -10 }}>
<SettingRowTitle>{t('settings.websearch.search_max_result')}</SettingRowTitle> <SettingRowTitle>{t('settings.websearch.search_max_result')}</SettingRowTitle>
<Slider <Slider
defaultValue={maxResults} defaultValue={maxResults}
@ -107,7 +107,7 @@ const WebSearchSettings: FC = () => {
<SettingGroup theme={theme}> <SettingGroup theme={theme}>
<SettingTitle>{t('settings.websearch.blacklist')}</SettingTitle> <SettingTitle>{t('settings.websearch.blacklist')}</SettingTitle>
<SettingDivider /> <SettingDivider />
<SettingRow> <SettingRow style={{ marginBottom: 10 }}>
<SettingRowTitle>{t('settings.websearch.blacklist_description')}</SettingRowTitle> <SettingRowTitle>{t('settings.websearch.blacklist_description')}</SettingRowTitle>
</SettingRow> </SettingRow>
<TextArea <TextArea