| # Bot2 配置示例 - 启用Webhook功能 |
| # 这个Bot订阅相同的群组消息并能与Bot1通信 |
| |
| # Agent核心配置 |
| [agent] |
| default_mode = "interactive" |
| max_conversation_history = 100 |
| model = "claude-sonnet-4-5-20250929" |
| api_timeout = 30 |
| |
| # CLI界面配置 |
| [cli] |
| max_command_history = 1000 |
| prompt_style = "green" |
| show_progress = true |
| |
| # Telegram Bot配置 |
| [telegram] |
| # Bot Token - 请替换为实际的Token(不同的Bot) |
| bot_token = "0987654321:ZYXWVUTSRQPONMLKJIHGFEDCBAzyxwvuts" |
| # 允许的用户Chat ID列表 |
| allowed_users = [123456789, 987654321] |
| # 允许的群组Chat ID列表 - 与Bot1相同的群组 |
| allowed_groups = [-1001234567890, -1001987654321] |
| |
| # 消息处理配置 |
| [telegram.message] |
| stream_update_interval = 1.0 |
| max_message_length = 4096 |
| enable_markdown = true |
| context_history_limit = 50 |
| |
| # 群聊智能参与配置 |
| [telegram.group_participation] |
| bot_names = [ |
| "claude", "Claude", "CLAUDE", |
| "助手", "机器人", "bot2" |
| ] |
| random_participation_range = [8, 15] # 不同的参与频率 |
| |
| # 文件处理配置 |
| [telegram.files] |
| supported_image_formats = ["jpg", "jpeg", "png", "gif", "webp"] |
| supported_document_formats = ["pdf", "doc", "docx", "txt", "md"] |
| max_file_size_mb = 20 |
| temp_dir = "temp/telegram/bot2" |
| |
| # Webhook配置(Bot间消息广播) |
| [webhook] |
| # 启用Webhook功能 |
| enabled = true |
| # Webhook服务器地址 - 与Bot1相同 |
| server_url = "http://localhost:8080" |
| # 认证Token - 与Bot1相同 |
| auth_token = "secure-webhook-token-2024" |
| |
| # 客户端配置(Bot连接到Webhook服务器) |
| [webhook.client] |
| # 订阅的群组ID列表(与Bot1相同) |
| subscribed_groups = [-1001234567890, -1001987654321] |
| # 回调服务器端口(必须与Bot1不同) |
| callback_port = 8082 |
| # 连接超时时间(秒) |
| connection_timeout = 10.0 |
| # 请求超时时间(秒) |
| request_timeout = 5.0 |
| # 重试次数 |
| max_retries = 3 |
| # 重试延迟(秒) |
| retry_delay = 1.0 |
| |
| # 日志配置 |
| [logging] |
| level = "INFO" |
| colored = true |
| format = "[%(asctime)s] %(levelname)s %(message)s" |