Files
wechat-agent/config.example.yaml
jesxion e2b7987c7e Phase 1: 联系人分类管理
新增文件:
- config.contacts.yaml: 联系人配置示例
- src/core/contact_manager.py: 联系人管理器

功能:
- priority: 重点用户,自动回复
- ignore: 忽略列表,不回复
- normal: 普通用户,默认不回复

engine.py 改动:
- 集成 ContactManager
- 消息处理流程增加联系人分类决策
- 日志显示 contact_type (priority/ignore/normal)
2026-04-13 12:38:58 +08:00

108 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# WeChat Agent 配置文件示例
# ============================================
# VLM 视觉模型配置(阿里云百炼)
# ============================================
# 阿里云百炼平台: https://bailian.console.aliyun.com/
# API Key 获取: https://bailian.console.aliyun.com/cn-beijing#/APIKey
#
# 支持的模型:
# - qwen-vl-latest (推荐VL 理解)
# - qwen-vl2-7b
# - qwen-vl2-72b
# - qwen2-vl-72b-instruct
# - qwen2.5-vl-72b-instruct
# - qwen-omni-series (全模态)
# ============================================
vlm:
model_type: bailian # bailian / qwen-vl / gpt-4v
# 阿里云百炼 API (OpenAI 兼容格式)
api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
# API Key: 设置环境变量 ALIBABA_CLOUD_API_KEY 或 DASHSCOPE_API_KEY
# 或直接在这里填写:
# api_key: your-api-key-here
api_key: ""
model_name: qwen-vl-plus # qwen-vl-plus / qwen-vl-max
max_tokens: 2048
temperature: 0.7
llm:
api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
# LLM API Key (同上,可以使用相同的 API Key)
api_key: ""
model_name: qwen-plus # 或 qwen-max, qwen-turbo 等
max_tokens: 2048
temperature: 0.7
wechat:
client_version: "3.8.x" # 推荐微信版本
poll_interval: 2.0 # 轮询间隔(秒)
screenshot_interval: 1.0 # 截图间隔(秒)
window_title: "微信" # 微信窗口标题
# 回复规则
rules:
# 关键词回复示例(优先匹配)
- keywords:
- 你好
- hi
- hello
reply_type: keyword
reply_content: "您好,有什么可以帮您的?"
enabled: true
# AI 回复模式(无匹配关键词时,使用 LLM 生成回复)
# 这是默认模式,会根据对话上下文生成自然回复
- keywords: []
reply_type: AI
reply_content: ""
enabled: true
# ============================================
# 联系人分类配置Phase 1
# ============================================
# 用于控制哪些联系人需要自动回复,哪些需要忽略
contacts:
# 重点用户:开启自动回复(关键词 + AI
priority:
enabled: true
users:
- "尾巴~"
# - "张三"
# 支持模糊匹配TODO
# 忽略列表:不自动回复,手动处理
ignore:
enabled: true
users:
- "相亲相爱一家人"
- "工作通知群"
- "文件传输助手"
- "公众号:" # 所有公众号
# 普通用户:默认不自动回复
normal:
auto_reply: false # true = AI 回复false = 不回复
# 知识库(可选,后续接入 OpenViking
knowledge_base:
url: http://192.168.5.5:1933
# 日志级别
log_level: INFO
# ============================================
# 环境变量
# ============================================
# 推荐将敏感信息放在环境变量中:
#
# Linux/macOS:
# export ALIBABA_CLOUD_API_KEY=your-api-key
# export DASHSCOPE_API_KEY=your-api-key
#
# Windows:
# set ALIBABA_CLOUD_API_KEY=your-api-key
#
# 或使用 .env 文件 (需要 python-dotenv):
# ALIBABA_CLOUD_API_KEY=your-api-key