diff --git a/assets/hardware-banner.jpg b/assets/hardware-banner.jpg new file mode 100644 index 00000000..f9a1190b Binary files /dev/null and b/assets/hardware-banner.jpg differ diff --git a/assets/launcher-tui.jpg b/assets/launcher-tui.jpg new file mode 100644 index 00000000..cf5e8ea4 Binary files /dev/null and b/assets/launcher-tui.jpg differ diff --git a/assets/launcher-webui.jpg b/assets/launcher-webui.jpg new file mode 100644 index 00000000..9e7c699b Binary files /dev/null and b/assets/launcher-webui.jpg differ diff --git a/docs/fr/tools_configuration.md b/docs/fr/tools_configuration.md index a0e03a93..1324d49e 100644 --- a/docs/fr/tools_configuration.md +++ b/docs/fr/tools_configuration.md @@ -75,17 +75,19 @@ Paramètres généraux pour la récupération et le traitement du contenu des pa | Config | Type | Par défaut | Description | |---------------|--------|------------|--------------------------------| -| `enabled` | bool | false | Activer la recherche Perplexity | -| `api_key` | string | - | Clé API Perplexity | -| `max_results` | int | 5 | Nombre maximum de résultats | +| `enabled` | bool | false | Activer la recherche Perplexity | +| `api_key` | string | - | Clé API Perplexity | +| `api_keys` | string[] | - | Plusieurs clés API Perplexity pour la rotation (`api_key` prioritaire) | +| `max_results` | int | 5 | Nombre maximum de résultats | ### Brave | Config | Type | Par défaut | Description | |---------------|--------|------------|---------------------------| -| `enabled` | bool | false | Activer la recherche Brave | -| `api_key` | string | - | Clé API Brave Search | -| `max_results` | int | 5 | Nombre maximum de résultats | +| `enabled` | bool | false | Activer la recherche Brave | +| `api_key` | string | - | Clé API Brave Search | +| `api_keys` | string[] | - | Plusieurs clés API Brave Search pour la rotation (`api_key` prioritaire) | +| `max_results` | int | 5 | Nombre maximum de résultats | ### Tavily diff --git a/docs/ja/tools_configuration.md b/docs/ja/tools_configuration.md index 9b95d33e..c946bf08 100644 --- a/docs/ja/tools_configuration.md +++ b/docs/ja/tools_configuration.md @@ -75,17 +75,19 @@ Web ツールはウェブ検索とフェッチに使用されます。 | 設定項目 | 型 | デフォルト | 説明 | |---------------|--------|------------|---------------------------| -| `enabled` | bool | false | Perplexity 検索を有効にする | -| `api_key` | string | - | Perplexity API キー | -| `max_results` | int | 5 | 最大結果数 | +| `enabled` | bool | false | Perplexity 検索を有効にする | +| `api_key` | string | - | Perplexity API キー | +| `api_keys` | string[] | - | 複数の Perplexity API キー(ローテーション用、`api_key` より優先) | +| `max_results` | int | 5 | 最大結果数 | ### Brave | 設定項目 | 型 | デフォルト | 説明 | |---------------|--------|------------|-----------------------| -| `enabled` | bool | false | Brave 検索を有効にする | -| `api_key` | string | - | Brave Search API キー | -| `max_results` | int | 5 | 最大結果数 | +| `enabled` | bool | false | Brave 検索を有効にする | +| `api_key` | string | - | Brave Search API キー | +| `api_keys` | string[] | - | 複数の Brave Search API キー(ローテーション用、`api_key` より優先) | +| `max_results` | int | 5 | 最大結果数 | ### Tavily diff --git a/docs/pt-br/tools_configuration.md b/docs/pt-br/tools_configuration.md index 60f0ace4..feec3c3d 100644 --- a/docs/pt-br/tools_configuration.md +++ b/docs/pt-br/tools_configuration.md @@ -75,17 +75,19 @@ Configurações gerais para busca e processamento de conteúdo de páginas web. | Config | Tipo | Padrão | Descrição | |---------------|--------|--------|--------------------------------| -| `enabled` | bool | false | Habilitar pesquisa Perplexity | -| `api_key` | string | - | Chave API do Perplexity | -| `max_results` | int | 5 | Número máximo de resultados | +| `enabled` | bool | false | Habilitar pesquisa Perplexity | +| `api_key` | string | - | Chave API do Perplexity | +| `api_keys` | string[] | - | Várias chaves API do Perplexity para rotação (prioridade sobre `api_key`) | +| `max_results` | int | 5 | Número máximo de resultados | ### Brave | Config | Tipo | Padrão | Descrição | |---------------|--------|--------|----------------------------| -| `enabled` | bool | false | Habilitar pesquisa Brave | -| `api_key` | string | - | Chave API do Brave Search | -| `max_results` | int | 5 | Número máximo de resultados | +| `enabled` | bool | false | Habilitar pesquisa Brave | +| `api_key` | string | - | Chave API única do Brave Search | +| `api_keys` | string[] | - | Várias chaves API do Brave para rotação (prioridade sobre `api_key`) | +| `max_results` | int | 5 | Número máximo de resultados | ### Tavily diff --git a/docs/vi/tools_configuration.md b/docs/vi/tools_configuration.md index 737d8118..55e7699e 100644 --- a/docs/vi/tools_configuration.md +++ b/docs/vi/tools_configuration.md @@ -75,17 +75,19 @@ Cài đặt chung để tải và xử lý nội dung trang web. | Cấu hình | Kiểu | Mặc định | Mô tả | |----------------|--------|----------|-------------------------------| -| `enabled` | bool | false | Bật tìm kiếm Perplexity | -| `api_key` | string | - | Khóa API Perplexity | -| `max_results` | int | 5 | Số kết quả tối đa | +| `enabled` | bool | false | Bật tìm kiếm Perplexity | +| `api_key` | string | - | Khóa API Perplexity | +| `api_keys` | string[] | - | Nhiều khóa API Perplexity để xoay vòng (ưu tiên hơn `api_key`) | +| `max_results` | int | 5 | Số kết quả tối đa | ### Brave | Cấu hình | Kiểu | Mặc định | Mô tả | |----------------|--------|----------|----------------------------| -| `enabled` | bool | false | Bật tìm kiếm Brave | -| `api_key` | string | - | Khóa API Brave Search | -| `max_results` | int | 5 | Số kết quả tối đa | +| `enabled` | bool | false | Bật tìm kiếm Brave | +| `api_key` | string | - | Khóa API Brave Search | +| `api_keys` | string[] | - | Nhiều khóa API Brave Search để xoay vòng (ưu tiên hơn `api_key`) | +| `max_results` | int | 5 | Số kết quả tối đa | ### Tavily diff --git a/pkg/tools/web.go b/pkg/tools/web.go index 41e91f08..7ff72480 100644 --- a/pkg/tools/web.go +++ b/pkg/tools/web.go @@ -656,7 +656,7 @@ func (p *BaiduSearchProvider) Search(ctx context.Context, query string, count in } defer resp.Body.Close() - body, err := io.ReadAll(resp.Body) + body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) if err != nil { return "", fmt.Errorf("failed to read response: %w", err) } @@ -676,7 +676,11 @@ func (p *BaiduSearchProvider) Search(ctx context.Context, query string, count in return "", fmt.Errorf("failed to parse response: %w", err) } - var lines []string + if len(result.References) == 0 { + return fmt.Sprintf("No results for: %s", query), nil + } + + lines := []string{fmt.Sprintf("Results for: %s (via Baidu Search)", query)} for i, item := range result.References { if i >= count { break