Files
wechat-agent/config.example.yaml
jesxion 4e5bd2a5c7 更新 VLM 为阿里云百炼 Bailian
核心变更:
- src/vlm/qwen_vl.py: 重写为 BailianVLMClient(阿里云百炼)
  - 支持 qwen-vl-latest 等模型
  - analyze_chat_screenshot() 微信截图分析
  - 使用 OpenAI 兼容 API 格式
- config/settings.py: 更新默认配置为阿里云百炼
- src/main.py: 添加 BailianLLMClient(阿里云百炼 LLM)
- requirements.txt: 添加 openai 依赖
- README.md: 更新文档

API 配置:
- 基础 URL: https://dashscope.aliyuncs.com/compatible-mode/v1
- VLM 模型: qwen-vl-latest(推荐)
- LLM 模型: qwen-plus
2026-04-13 11:34:36 +08:00

81 lines
2.2 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-latest # 模型名称
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
# 知识库(可选,后续接入 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