docs/channels/wecom/README.fr.md
Retour au README
PicoClaw expose WeCom en tant que canal unique channels.wecom, basé sur l'API WebSocket officielle WeCom AI Bot.
Ce canal remplace l'ancienne séparation wecom, wecom_app et wecom_aibot par un modèle de configuration unifié.
Aucune URL de callback webhook publique n'est requise. PicoClaw établit une connexion WebSocket sortante vers WeCom.
image, file, voice, video)reasoning_channel_idOuvrez l'interface Web, accédez à Channels → WeCom et cliquez sur le bouton de liaison QR. Scannez le QR code avec WeCom et confirmez dans l'application — les identifiants sont enregistrés automatiquement.
<p align="center"> </p>Exécutez :
picoclaw auth wecom
La commande :
bot_id et secret dans channels.wecom et sauvegarde la configurationLe délai d'expiration par défaut est de 5 minutes. Utilisez --timeout pour l'étendre :
picoclaw auth wecom --timeout 10m
⚠️ Scanner le QR code ne suffit pas — vous devez également appuyer sur Confirmer dans l'application WeCom, sinon la commande expirera.
Si vous disposez déjà d'un bot_id et d'un secret depuis la plateforme WeCom AI Bot, configurez directement :
{
"channel_list": {
"wecom": {
"enabled": true,
"type": "wecom",
"bot_id": "YOUR_BOT_ID",
"secret": "YOUR_SECRET",
"websocket_url": "wss://openws.work.weixin.qq.com",
"send_thinking_message": true,
"allow_from": [],
"reasoning_channel_id": ""
}
}
}
| Champ | Type | Défaut | Description |
|---|---|---|---|
enabled | bool | false | Activer le canal WeCom. |
bot_id | string | — | Identifiant WeCom AI Bot. Requis lorsque le canal est activé. |
secret | string | — | Secret WeCom AI Bot. Stocké chiffré dans .security.yml. Requis lorsque le canal est activé. |
websocket_url | string | wss://openws.work.weixin.qq.com | Point de terminaison WebSocket WeCom. |
send_thinking_message | bool | true | Envoyer un message Processing... avant le début de la réponse en streaming. |
allow_from | array | [] | Liste blanche des expéditeurs. Vide signifie autoriser tous les expéditeurs. |
reasoning_channel_id | string | "" | ID de chat optionnel pour router la sortie de raisonnement vers une conversation séparée. |
Tous les champs peuvent être remplacés par des variables d'environnement avec le préfixe PICOCLAW_CHANNELS_WECOM_ :
| Variable d'environnement | Champ correspondant |
|---|---|
PICOCLAW_CHANNELS_WECOM_ENABLED | enabled |
PICOCLAW_CHANNELS_WECOM_BOT_ID | bot_id |
PICOCLAW_CHANNELS_WECOM_SECRET | secret |
PICOCLAW_CHANNELS_WECOM_WEBSOCKET_URL | websocket_url |
PICOCLAW_CHANNELS_WECOM_SEND_THINKING_MESSAGE | send_thinking_message |
PICOCLAW_CHANNELS_WECOM_ALLOW_FROM | allow_from |
PICOCLAW_CHANNELS_WECOM_REASONING_CHANNEL_ID | reasoning_channel_id |
| Configuration précédente | Migration |
|---|---|
channels.wecom (bot webhook) | Remplacer par channels.wecom avec bot_id + secret. |
channels.wecom_app | Supprimer. Utiliser channels.wecom à la place. |
channels.wecom_aibot | Déplacer bot_id et secret vers channels.wecom. |
token, encoding_aes_key, webhook_url, webhook_path | Plus utilisés. Supprimer de la configuration. |
corp_id, corp_secret, agent_id | Plus utilisés. Supprimer de la configuration. |
welcome_message, processing_message, max_steps | Ne font plus partie de la configuration du canal WeCom. |
--timeout plus long : picoclaw auth wecom --timeout 10mpicoclaw auth wecom pour en obtenir un nouveau.bot_id et secret sont corrects.wss://openws.work.weixin.qq.com (WebSocket sortant, aucun port entrant nécessaire).allow_from bloque l'expéditeur.channels.wecom.bot_id et channels.wecom.secret sont définis et non vides.