mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
60a7098fd3
- Add BaiduSearchConfig struct and register in WebToolsConfig/defaults - Insert Baidu Search in priority chain: DuckDuckGo > Baidu > GLM Search - Use perplexityTimeout (30s) — Qianfan is LLM-based - Fix response parsing: use references[] field per API spec - Add baidu_search block to config.example.json docs: sync configuration.md and README Documentation table across all languages - Complete truncated configuration.md for fr/ja/pt-br/vi/zh: add Spawn async flow diagram, Providers table, Model Configuration (all vendors, examples, load balancing, migration), Provider Architecture, Scheduled Tasks, and Advanced Topics links - Add Hooks/Steering/SubTurn entries to Documentation table in all 8 READMEs (en/zh/fr/id/it/ja/pt-br/vi), ordered before Troubleshooting - Add Baidu Search row to web search table in all 8 READMEs and tools_configuration.md (en + 5 i18n); zh README reorders search engines with China-friendly options first - Add Matrix channel docs translations (fr/ja/pt-br/vi) - Add Weixin channel to chat-apps.md and all README Channels tables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65 lines
2.7 KiB
Markdown
65 lines
2.7 KiB
Markdown
> Voltar ao [README](../../../README.pt-br.md)
|
|
|
|
# Guia de Configuração do Canal Matrix
|
|
|
|
## 1. Exemplo de Configuração
|
|
|
|
Adicione isto ao `config.json`:
|
|
|
|
```json
|
|
{
|
|
"channels": {
|
|
"matrix": {
|
|
"enabled": true,
|
|
"homeserver": "https://matrix.org",
|
|
"user_id": "@your-bot:matrix.org",
|
|
"access_token": "YOUR_MATRIX_ACCESS_TOKEN",
|
|
"device_id": "",
|
|
"join_on_invite": true,
|
|
"allow_from": [],
|
|
"group_trigger": {
|
|
"mention_only": true
|
|
},
|
|
"placeholder": {
|
|
"enabled": true,
|
|
"text": "Thinking..."
|
|
},
|
|
"reasoning_channel_id": "",
|
|
"message_format": "richtext"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## 2. Referência de Campos
|
|
|
|
| Campo | Tipo | Obrigatório | Descrição |
|
|
|----------------------|----------|-------------|-----------|
|
|
| enabled | bool | Sim | Habilitar ou desabilitar o canal Matrix |
|
|
| homeserver | string | Sim | URL do homeserver Matrix (por exemplo `https://matrix.org`) |
|
|
| user_id | string | Sim | ID de usuário Matrix do bot (por exemplo `@bot:matrix.org`) |
|
|
| access_token | string | Sim | Token de acesso do bot |
|
|
| device_id | string | Não | ID de dispositivo Matrix opcional |
|
|
| join_on_invite | bool | Não | Entrar automaticamente em salas convidadas |
|
|
| allow_from | []string | Não | Lista branca de usuários (IDs Matrix) |
|
|
| group_trigger | object | Não | Estratégia de gatilho de grupo (`mention_only` / `prefixes`) |
|
|
| placeholder | object | Não | Configuração de mensagem de espaço reservado |
|
|
| reasoning_channel_id | string | Não | Canal alvo para saída de raciocínio |
|
|
| message_format | string | Não | Formato de saída: `"richtext"` (padrão) renderiza markdown como HTML; `"plain"` envia apenas texto simples |
|
|
|
|
## 3. Suporte Atual
|
|
|
|
- Envio/recebimento de mensagens de texto com renderização markdown (negrito, itálico, cabeçalhos, blocos de código, etc.)
|
|
- Formato de mensagem configurável (`richtext` / `plain`)
|
|
- Download de imagens/áudio/vídeo/arquivos recebidos (MediaStore primeiro, fallback para caminho local)
|
|
- Normalização de áudio recebido no fluxo de transcrição existente (`[audio: ...]`)
|
|
- Upload e envio de imagens/áudio/vídeo/arquivos de saída
|
|
- Regras de gatilho de grupo (incluindo modo somente menção)
|
|
- Estado de digitação (`m.typing`)
|
|
- Mensagem de espaço reservado + substituição de resposta final
|
|
- Entrada automática em salas convidadas (pode ser desabilitado)
|
|
|
|
## 4. TODO
|
|
|
|
- Melhorias nos metadados de mídia rica (por exemplo tamanho e miniaturas de imagens/vídeos)
|