mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-05-25 16:00:35 +00:00
fix: restore missing assets and address Copilot review comments
- Add hardware-banner.jpg, launcher-webui.jpg, launcher-tui.jpg (lost in previous force push) - Add io.LimitReader (1MB) to BaiduSearchProvider response body read - Add no-results fallback and "Results for: ... (via Baidu Search)" header - Add api_keys field to Brave and Perplexity tables in fr/ja/pt-br/vi tools_configuration.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 208 KiB |
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+6
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user