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:
parent
4bc64497e3
commit
48cba906cd
8 changed files with 38 additions and 26 deletions
BIN
assets/hardware-banner.jpg
Normal file
BIN
assets/hardware-banner.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
BIN
assets/launcher-tui.jpg
Normal file
BIN
assets/launcher-tui.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
assets/launcher-webui.jpg
Normal file
BIN
assets/launcher-webui.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 208 KiB |
|
|
@ -77,6 +77,7 @@ Paramètres généraux pour la récupération et le traitement du contenu des pa
|
||||||
|---------------|--------|------------|--------------------------------|
|
|---------------|--------|------------|--------------------------------|
|
||||||
| `enabled` | bool | false | Activer la recherche Perplexity |
|
| `enabled` | bool | false | Activer la recherche Perplexity |
|
||||||
| `api_key` | string | - | Clé API 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 |
|
| `max_results` | int | 5 | Nombre maximum de résultats |
|
||||||
|
|
||||||
### Brave
|
### Brave
|
||||||
|
|
@ -85,6 +86,7 @@ Paramètres généraux pour la récupération et le traitement du contenu des pa
|
||||||
|---------------|--------|------------|---------------------------|
|
|---------------|--------|------------|---------------------------|
|
||||||
| `enabled` | bool | false | Activer la recherche Brave |
|
| `enabled` | bool | false | Activer la recherche Brave |
|
||||||
| `api_key` | string | - | Clé API Brave Search |
|
| `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 |
|
| `max_results` | int | 5 | Nombre maximum de résultats |
|
||||||
|
|
||||||
### Tavily
|
### Tavily
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ Web ツールはウェブ検索とフェッチに使用されます。
|
||||||
|---------------|--------|------------|---------------------------|
|
|---------------|--------|------------|---------------------------|
|
||||||
| `enabled` | bool | false | Perplexity 検索を有効にする |
|
| `enabled` | bool | false | Perplexity 検索を有効にする |
|
||||||
| `api_key` | string | - | Perplexity API キー |
|
| `api_key` | string | - | Perplexity API キー |
|
||||||
|
| `api_keys` | string[] | - | 複数の Perplexity API キー(ローテーション用、`api_key` より優先) |
|
||||||
| `max_results` | int | 5 | 最大結果数 |
|
| `max_results` | int | 5 | 最大結果数 |
|
||||||
|
|
||||||
### Brave
|
### Brave
|
||||||
|
|
@ -85,6 +86,7 @@ Web ツールはウェブ検索とフェッチに使用されます。
|
||||||
|---------------|--------|------------|-----------------------|
|
|---------------|--------|------------|-----------------------|
|
||||||
| `enabled` | bool | false | Brave 検索を有効にする |
|
| `enabled` | bool | false | Brave 検索を有効にする |
|
||||||
| `api_key` | string | - | Brave Search API キー |
|
| `api_key` | string | - | Brave Search API キー |
|
||||||
|
| `api_keys` | string[] | - | 複数の Brave Search API キー(ローテーション用、`api_key` より優先) |
|
||||||
| `max_results` | int | 5 | 最大結果数 |
|
| `max_results` | int | 5 | 最大結果数 |
|
||||||
|
|
||||||
### Tavily
|
### Tavily
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ Configurações gerais para busca e processamento de conteúdo de páginas web.
|
||||||
|---------------|--------|--------|--------------------------------|
|
|---------------|--------|--------|--------------------------------|
|
||||||
| `enabled` | bool | false | Habilitar pesquisa Perplexity |
|
| `enabled` | bool | false | Habilitar pesquisa Perplexity |
|
||||||
| `api_key` | string | - | Chave API do 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 |
|
| `max_results` | int | 5 | Número máximo de resultados |
|
||||||
|
|
||||||
### Brave
|
### Brave
|
||||||
|
|
@ -84,7 +85,8 @@ Configurações gerais para busca e processamento de conteúdo de páginas web.
|
||||||
| Config | Tipo | Padrão | Descrição |
|
| Config | Tipo | Padrão | Descrição |
|
||||||
|---------------|--------|--------|----------------------------|
|
|---------------|--------|--------|----------------------------|
|
||||||
| `enabled` | bool | false | Habilitar pesquisa Brave |
|
| `enabled` | bool | false | Habilitar pesquisa Brave |
|
||||||
| `api_key` | string | - | Chave API do Brave Search |
|
| `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 |
|
| `max_results` | int | 5 | Número máximo de resultados |
|
||||||
|
|
||||||
### Tavily
|
### Tavily
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ Cài đặt chung để tải và xử lý nội dung trang web.
|
||||||
|----------------|--------|----------|-------------------------------|
|
|----------------|--------|----------|-------------------------------|
|
||||||
| `enabled` | bool | false | Bật tìm kiếm Perplexity |
|
| `enabled` | bool | false | Bật tìm kiếm Perplexity |
|
||||||
| `api_key` | string | - | Khóa API 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 |
|
| `max_results` | int | 5 | Số kết quả tối đa |
|
||||||
|
|
||||||
### Brave
|
### Brave
|
||||||
|
|
@ -85,6 +86,7 @@ Cài đặt chung để tải và xử lý nội dung trang web.
|
||||||
|----------------|--------|----------|----------------------------|
|
|----------------|--------|----------|----------------------------|
|
||||||
| `enabled` | bool | false | Bật tìm kiếm Brave |
|
| `enabled` | bool | false | Bật tìm kiếm Brave |
|
||||||
| `api_key` | string | - | Khóa API Brave Search |
|
| `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 |
|
| `max_results` | int | 5 | Số kết quả tối đa |
|
||||||
|
|
||||||
### Tavily
|
### Tavily
|
||||||
|
|
|
||||||
|
|
@ -656,7 +656,7 @@ func (p *BaiduSearchProvider) Search(ctx context.Context, query string, count in
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
body, err := io.ReadAll(resp.Body)
|
body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to read response: %w", err)
|
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)
|
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 {
|
for i, item := range result.References {
|
||||||
if i >= count {
|
if i >= count {
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue