This commit is contained in:
afjcjsbx 2026-03-26 21:27:35 +01:00
parent 48c04e050d
commit b7f6ab7176
2 changed files with 24 additions and 24 deletions

View file

@ -70,12 +70,12 @@ General settings for fetching and processing webpage content.
Baidu Search uses the [Qianfan AI Search API](https://cloud.baidu.com/doc/qianfan-api/s/Wmbq4z7e5), which is AI-powered and optimized for Chinese-language queries. Baidu Search uses the [Qianfan AI Search API](https://cloud.baidu.com/doc/qianfan-api/s/Wmbq4z7e5), which is AI-powered and optimized for Chinese-language queries.
| Config | Type | Default | Description | | Config | Type | Default | Description |
|---------------|--------|------------------------------------------------------------------|---------------------------| |---------------|--------|--------------------------------------------------------|---------------------------|
| `enabled` | bool | false | Enable Baidu Search | | `enabled` | bool | false | Enable Baidu Search |
| `api_key` | string | - | Qianfan API key | | `api_key` | string | - | Qianfan API key |
| `base_url` | string | `https://qianfan.baidubce.com/v2/ai_search/web_search` | Baidu Search API URL | | `base_url` | string | `https://qianfan.baidubce.com/v2/ai_search/web_search` | Baidu Search API URL |
| `max_results` | int | 10 | Maximum number of results | | `max_results` | int | 5 | Maximum number of results |
```json ```json
{ {
@ -98,7 +98,7 @@ Baidu Search uses the [Qianfan AI Search API](https://cloud.baidu.com/doc/qianfa
| `enabled` | bool | false | Enable Perplexity search | | `enabled` | bool | false | Enable Perplexity search |
| `api_key` | string | - | Perplexity API key | | `api_key` | string | - | Perplexity API key |
| `api_keys` | string[] | - | Multiple API keys for rotation (takes priority over `api_key`) | | `api_keys` | string[] | - | Multiple API keys for rotation (takes priority over `api_key`) |
| `max_results` | int | 10 | Maximum number of results | | `max_results` | int | 5 | Maximum number of results |
### Tavily ### Tavily
@ -107,25 +107,25 @@ Baidu Search uses the [Qianfan AI Search API](https://cloud.baidu.com/doc/qianfa
| `enabled` | bool | false | Enable Tavily search | | `enabled` | bool | false | Enable Tavily search |
| `api_key` | string | - | Tavily API key | | `api_key` | string | - | Tavily API key |
| `base_url` | string | - | Custom Tavily API base URL | | `base_url` | string | - | Custom Tavily API base URL |
| `max_results` | int | 10 | Maximum number of results | | `max_results` | int | 5 | Maximum number of results |
### SearXNG ### SearXNG
| Config | Type | Default | Description | | Config | Type | Default | Description |
|---------------|--------|--------------------------|---------------------------| |---------------|--------|-------------------------|---------------------------|
| `enabled` | bool | false | Enable SearXNG search | | `enabled` | bool | false | Enable SearXNG search |
| `base_url` | string | `http://localhost:8888` | SearXNG instance URL | | `base_url` | string | `http://localhost:8888` | SearXNG instance URL |
| `max_results` | int | 10 | Maximum number of results | | `max_results` | int | 5 | Maximum number of results |
### GLM Search ### GLM Search
| Config | Type | Default | Description | | Config | Type | Default | Description |
|-----------------|--------|------------------------------------------------------|---------------------------| |-----------------|--------|---------------------------------------------------|---------------------------|
| `enabled` | bool | false | Enable GLM Search | | `enabled` | bool | false | Enable GLM Search |
| `api_key` | string | - | GLM API key | | `api_key` | string | - | GLM API key |
| `base_url` | string | `https://open.bigmodel.cn/api/paas/v4/web_search` | GLM Search API URL | | `base_url` | string | `https://open.bigmodel.cn/api/paas/v4/web_search` | GLM Search API URL |
| `search_engine` | string | `search_std` | Search engine type | | `search_engine` | string | `search_std` | Search engine type |
| `max_results` | int | 10 | Maximum number of results | | `max_results` | int | 5 | Maximum number of results |
### Additional Web Settings ### Additional Web Settings

View file

@ -306,14 +306,14 @@ func TestDefaultConfig_WebTools(t *testing.T) {
cfg := DefaultConfig() cfg := DefaultConfig()
// Verify web tools defaults // Verify web tools defaults
if cfg.Tools.Web.Brave.MaxResults != 10 { if cfg.Tools.Web.Brave.MaxResults != 5 {
t.Error("Expected Brave MaxResults 10, got ", cfg.Tools.Web.Brave.MaxResults) t.Error("Expected Brave MaxResults 5, got ", cfg.Tools.Web.Brave.MaxResults)
} }
if len(cfg.Tools.Web.Brave.APIKeys()) != 0 { if len(cfg.Tools.Web.Brave.APIKeys()) != 0 {
t.Error("Brave API key should be empty by default") t.Error("Brave API key should be empty by default")
} }
if cfg.Tools.Web.DuckDuckGo.MaxResults != 10 { if cfg.Tools.Web.DuckDuckGo.MaxResults != 5 {
t.Error("Expected DuckDuckGo MaxResults 10, got ", cfg.Tools.Web.DuckDuckGo.MaxResults) t.Error("Expected DuckDuckGo MaxResults 5, got ", cfg.Tools.Web.DuckDuckGo.MaxResults)
} }
} }