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>
2.7 KiB
2.7 KiB
Quay lại README
Hướng dẫn Cấu hình Kênh Matrix
1. Cấu hình Mẫu
Thêm vào config.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. Tham chiếu Trường
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
| enabled | bool | Có | Bật hoặc tắt kênh Matrix |
| homeserver | string | Có | URL homeserver Matrix (ví dụ https://matrix.org) |
| user_id | string | Có | ID người dùng Matrix của bot (ví dụ @bot:matrix.org) |
| access_token | string | Có | Token truy cập của bot |
| device_id | string | Không | ID thiết bị Matrix tùy chọn |
| join_on_invite | bool | Không | Tự động tham gia phòng được mời |
| allow_from | []string | Không | Danh sách trắng người dùng (ID Matrix) |
| group_trigger | object | Không | Chiến lược kích hoạt nhóm (mention_only / prefixes) |
| placeholder | object | Không | Cấu hình tin nhắn giữ chỗ |
| reasoning_channel_id | string | Không | Kênh đích cho đầu ra suy luận |
| message_format | string | Không | Định dạng đầu ra: "richtext" (mặc định) render markdown thành HTML; "plain" chỉ gửi văn bản thuần |
3. Tính năng Hiện tại
- Gửi/nhận tin nhắn văn bản với render markdown (đậm, nghiêng, tiêu đề, khối code, v.v.)
- Định dạng tin nhắn có thể cấu hình (
richtext/plain) - Tải xuống hình ảnh/âm thanh/video/tệp đến (MediaStore trước, fallback đường dẫn cục bộ)
- Chuẩn hóa âm thanh đến vào luồng phiên âm hiện có (
[audio: ...]) - Tải lên và gửi hình ảnh/âm thanh/video/tệp đi
- Quy tắc kích hoạt nhóm (bao gồm chế độ chỉ đề cập)
- Trạng thái đang gõ (
m.typing) - Tin nhắn giữ chỗ + thay thế phản hồi cuối cùng
- Tự động tham gia phòng được mời (có thể tắt)
4. TODO
- Cải thiện metadata phương tiện phong phú (ví dụ kích thước và hình thu nhỏ hình ảnh/video)