一个基于对话的 AI 认知参谋,通过结构化提问引导用户自己找到答案。
CooMate 不直接给答案。它通过 5 步结构化提问,引导你自己找到答案:
- 反问成立性 - 质疑问题本身是否成立
- 深挖追问 - 暴露隐藏的假设和情绪
- 复盘与情绪标记 - 识别防御、逃避和循环模式
- 多角度思考题 - 从不同维度探索问题
- 一个微型实验 - 给出下一分钟就能执行的行动
- 5 步结构化对话流程
- 流式输出,实时显示 AI 思考过程
- 支持多种场景:研究思考、创意发散、情感分析、决策分析
- 会话保存与历史查看
- 支持多种 LLM 提供商(MiniMax、OpenAI 兼容等)
- 响应式设计,支持移动端
前端:
- Vue 3 + TypeScript
- Vite
- TailwindCSS
- Pinia 状态管理
后端:
- Python FastAPI
- SQLAlchemy ORM
- PostgreSQL
- httpx 异步客户端
- Python 3.9+
- Node.js 18+
- PostgreSQL
- 克隆项目
git clone <your-repo-url>
cd CooMate- 安装后端依赖
pip install -r requirements.txt- 安装前端依赖
cd apps/frontend
npm install- 配置环境变量
cp .env.example .env
# 编辑 .env 文件,配置你的 API 密钥和数据库连接- 初始化数据库
cd apps/backend
python -c "from database import init_db; init_db()"- 启动服务
方式一:使用启动脚本(Windows)
start-dev.bat方式二:手动启动
# 终端 1 - 后端
cd apps/backend
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8266
# 终端 2 - 前端
cd apps/frontend
npm run dev- 访问应用
- 前端:http://localhost:5066
- 后端 API:http://localhost:8266
CooMate/
├── .env # 环境变量配置
├── .env.example # 环境变量示例
├── .gitignore # Git 忽略配置
├── start-dev.bat # Windows 启动脚本
├── requirements.txt # Python 依赖
├── package.json # 根目录依赖
├── docs/ # 文档
│ ├── DESIGN.md # 设计文档
│ └── system_prompt.txt # AI 系统提示词
├── apps/
│ ├── backend/ # 后端服务
│ │ ├── main.py # FastAPI 入口
│ │ ├── config.py # 配置管理
│ │ ├── llm_client.py # LLM 调用客户端
│ │ ├── database.py # 数据库管理
│ │ ├── auth.py # 认证模块
│ │ ├── routers/ # API 路由
│ │ └── models/ # 数据模型
│ └── frontend/ # 前端应用
│ ├── src/
│ │ ├── components/ # Vue 组件
│ │ ├── stores/ # Pinia 状态管理
│ │ ├── services/ # API 服务
│ │ └── types/ # TypeScript 类型
│ └── index.html # 入口文件
├── reference/ # 参考代码
└── sample/ # 示例代码
POST /api/chat- 发送消息(流式响应)GET /api/conversations- 获取会话列表GET /api/conversations/{id}- 获取会话详情DELETE /api/conversations/{id}- 删除会话
POST /api/auth/register- 用户注册POST /api/auth/login- 用户登录POST /api/auth/guest- 游客登录POST /api/auth/logout- 退出登录
在 .env 文件中配置以下变量:
# LLM Provider
LLM_BASE_URL=https://api.minimaxi.com/anthropic
LLM_API_KEY=your-api-key
LLM_MODEL=MiniMax-M2.7
LLM_PROVIDER=minimax_anthropic
# Server
HOST=0.0.0.0
PORT=8266
DEBUG=true
# Database
DATABASE_URL=postgresql+psycopg://user:password@localhost:5432/coomate欢迎提交 Issue 和 Pull Request!
- Fork 项目
- 创建功能分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 开启 Pull Request
MIT License
如有问题,请提交 Issue。