refactor(config): make config.Channel to multiple instance support
add new field type to Channel struct config.channels refactor to channel_list update config version to 3 update the docs
This commit is contained in:
1 parent
2b2bc26f8e
commit
667fc85d54
185 files changed
+6389
-4180
No files matched your search
+32
-18
@@ -40,9 +40,10 @@ Communiquez avec votre PicoClaw via Telegram, Discord, WhatsApp, Matrix, QQ, Din
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"telegram": {
|
||||
"enabled": true,
|
||||
"type": "telegram",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
@@ -90,9 +91,10 @@ Si l'enregistrement des commandes échoue (erreurs transitoires réseau/API), le
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
@@ -113,7 +115,7 @@ Par défaut, le bot répond à tous les messages dans un canal de serveur. Pour
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
@@ -125,7 +127,7 @@ Vous pouvez également déclencher par préfixes de mots-clés (par ex. `!bot`)
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
@@ -154,9 +156,10 @@ PicoClaw peut se connecter à WhatsApp de deux manières :
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
@@ -188,9 +191,10 @@ Scannez le QR code affiché avec votre application WeChat mobile. Une fois conne
|
||||
(Optionnel) Ajoutez votre identifiant utilisateur WeChat dans `allow_from` pour restreindre qui peut envoyer des messages au bot :
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"weixin": {
|
||||
"enabled": true,
|
||||
"type": "weixin",
|
||||
"token": "YOUR_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
@@ -219,9 +223,10 @@ QQ Open Platform propose une page de configuration en un clic pour les bots comp
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"qq": {
|
||||
"enabled": true,
|
||||
"type": "qq",
|
||||
"app_id": "YOUR_APP_ID",
|
||||
"app_secret": "YOUR_APP_SECRET",
|
||||
"allow_from": []
|
||||
@@ -261,9 +266,10 @@ Si vous préférez créer le bot manuellement :
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"dingtalk": {
|
||||
"enabled": true,
|
||||
"type": "dingtalk",
|
||||
"client_id": "YOUR_CLIENT_ID",
|
||||
"client_secret": "YOUR_CLIENT_SECRET",
|
||||
"allow_from": []
|
||||
@@ -294,9 +300,10 @@ picoclaw gateway
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"matrix": {
|
||||
"enabled": true,
|
||||
"type": "matrix",
|
||||
"homeserver": "https://matrix.org",
|
||||
"user_id": "@your-bot:matrix.org",
|
||||
"access_token": "YOUR_MATRIX_ACCESS_TOKEN",
|
||||
@@ -330,9 +337,10 @@ Pour toutes les options (`device_id`, `join_on_invite`, `group_trigger`, `placeh
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
@@ -388,9 +396,10 @@ Voir le [Guide de Configuration WeCom AI Bot](../channels/wecom/wecom_aibot/READ
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"wecom": {
|
||||
"enabled": true,
|
||||
"type": "wecom",
|
||||
"token": "YOUR_TOKEN",
|
||||
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
|
||||
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY",
|
||||
@@ -421,7 +430,7 @@ Voir le [Guide de Configuration WeCom AI Bot](../channels/wecom/wecom_aibot/READ
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"wecom_app": {
|
||||
"enabled": true,
|
||||
"corp_id": "wwxxxxxxxxxxxxxxxx",
|
||||
@@ -456,7 +465,7 @@ picoclaw gateway
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"wecom_aibot": {
|
||||
"enabled": true,
|
||||
"token": "YOUR_TOKEN",
|
||||
@@ -497,9 +506,10 @@ PicoClaw se connecte à Feishu via le mode WebSocket/SDK — aucune URL webhook
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"feishu": {
|
||||
"enabled": true,
|
||||
"type": "feishu",
|
||||
"app_id": "cli_xxx",
|
||||
"app_secret": "YOUR_APP_SECRET",
|
||||
"allow_from": []
|
||||
@@ -537,9 +547,10 @@ Pour toutes les options, voir le [Guide de Configuration du Canal Feishu](../cha
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"slack": {
|
||||
"enabled": true,
|
||||
"type": "slack",
|
||||
"bot_token": "xoxb-YOUR-BOT-TOKEN",
|
||||
"app_token": "xapp-YOUR-APP-TOKEN",
|
||||
"allow_from": []
|
||||
@@ -564,9 +575,10 @@ picoclaw gateway
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"irc": {
|
||||
"enabled": true,
|
||||
"type": "irc",
|
||||
"server": "irc.libera.chat:6697",
|
||||
"tls": true,
|
||||
"nick": "picoclaw-bot",
|
||||
@@ -604,9 +616,10 @@ Installez et exécutez un framework de bot QQ compatible OneBot v11. Activez son
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"onebot": {
|
||||
"enabled": true,
|
||||
"type": "onebot",
|
||||
"ws_url": "ws://127.0.0.1:8080",
|
||||
"access_token": "",
|
||||
"allow_from": []
|
||||
@@ -641,9 +654,10 @@ picoclaw gateway
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"maixcam": {
|
||||
"enabled": true,
|
||||
"type": "maixcam",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ L'ancienne configuration `providers` est **dépréciée** et a été supprimée
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 2,
|
||||
"version": 3,
|
||||
"model_list": [
|
||||
{
|
||||
"model_name": "glm-4.7",
|
||||
@@ -362,19 +362,22 @@ picoclaw agent -m "Hello"
|
||||
"api_key": "gsk_xxx"
|
||||
}
|
||||
},
|
||||
"channels": {
|
||||
"channel_list": {
|
||||
"telegram": {
|
||||
"enabled": true,
|
||||
"type": "telegram",
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
@@ -382,6 +385,7 @@ picoclaw agent -m "Hello"
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
"app_id": "cli_xxx",
|
||||
"app_secret": "xxx",
|
||||
"encrypt_key": "",
|
||||
@@ -390,6 +394,7 @@ picoclaw agent -m "Hello"
|
||||
},
|
||||
"qq": {
|
||||
"enabled": false,
|
||||
"type": "qq",
|
||||
"app_id": "",
|
||||
"app_secret": "",
|
||||
"allow_from": []
|
||||
|
||||
@@ -345,6 +345,7 @@ Au lieu de charger tous les outils, le LLM reçoit un outil de recherche léger
|
||||
},
|
||||
"slack": {
|
||||
"enabled": true,
|
||||
"type": "slack",
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"-y",
|
||||
|
||||
Reference in new issue
Block a user