Files
msgbot/README.md
T

35 lines
944 B
Markdown
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.
# 消息问答助手 (Message Bot)
Windows 桌面工具,监控微信/QQ 新消息 → 在本地知识库中搜索答案。
## 功能
- **消息监控**:通过 Windows UI Automation 监听微信/QQ 聊天新消息
- **本地知识库**:支持 Markdown (`.md`) / 文本 (`.txt`) 文件,自动建索引
- **智能问答**:jieba 分词 + TF-IDF 余弦相似度搜索
- **GUI 控制**:开关、知识库路径、平台选择、轮询间隔
## 快速开始
```bash
# 1. 安装依赖
pip install -r requirements.txt
# 2. 准备知识库
# 在某个文件夹放 .md / .txt 文件
# 3. 启动
python main.py
```
在 GUI 中选择知识库文件夹 → 开启监控 → 微信/QQ 收到新消息时自动搜索并展示答案。
## 技术栈
- `customtkinter` — 现代化桌面 GUI
- `uiautomation` — Windows UI 自动化(消息读取)
- `jieba` — 中文分词
- `scikit-learn` — TF-IDF 向量化 + 余弦相似度