tech-bid-manage/README.md
2026-04-20 16:21:06 +08:00

114 lines
3.4 KiB
Markdown
Raw Permalink 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.

# 标伙伴 · AI 标书助手
基于大模型的智能标书生成工具(单机版),支持解析招标文件、自动生成技术标书、导出 Word 文档。
## 快速开始
### 方式一双击启动Windows
直接双击 `start.bat`,首次运行会自动安装依赖。
### 方式二:命令行启动
```bash
# 1. 安装依赖
pip install -r requirements.txt
# 2. 启动应用
python app.py
```
浏览器访问 **http://localhost:5000**
---
## 配置 API Key
首次使用前,点击右上角 ⚙️ 设置图标,选择模型提供商并填入 API Key
| 提供商 | 推荐模型 | 申请地址 |
|--------|---------|---------|
| 通义千问 | qwen-max | https://dashscope.aliyun.com/ |
| DeepSeek | deepseek-chat (V3) | https://platform.deepseek.com/ |
| OpenAI | gpt-4o | https://platform.openai.com/ |
> **DeepSeek 说明**deepseek-chat (V3) 性价比极高,推荐用于生产环境。
> 由于 DeepSeek 暂不提供 Embedding API使用知识库功能时会自动回退到本地 sentence-transformers 模型(首次使用需下载约 90MB
也可通过环境变量配置:
```bash
# 通义千问
set QWEN_API_KEY=sk-xxxxxxxx
set MODEL_PROVIDER=qwen
# DeepSeek
set DEEPSEEK_API_KEY=sk-xxxxxxxx
set MODEL_PROVIDER=deepseek
python app.py
```
---
## 使用流程
1. **新建项目** → 输入项目名称
2. **上传招标文件** → 支持 PDF / DOC / DOCX
3. **AI 解析** → 自动提取评分要求、资质条件、商务条款
4. **生成大纲** → 按评分权重生成四级章节目录
5. **生成内容** → 逐章节或一键全部生成
6. **合规检查** → 对照招标要求检验覆盖情况
7. **导出 Word** → 专业排版,直接使用
---
## 目录结构
```
autorfp/
├── app.py # Flask 主程序
├── config.py # 配置文件
├── requirements.txt # Python 依赖
├── start.bat # Windows 一键启动
├── prompts/ # AI 提示词模板
├── modules/ # 功能模块
│ ├── parser.py # 招标文件解析
│ ├── generator.py # 标书内容生成
│ ├── checker.py # 合规检查
│ ├── exporter.py # Word 导出
│ └── knowledge.py # 企业知识库
├── utils/ # 工具函数
│ ├── ai_client.py # AI API 封装
│ ├── file_utils.py # 文件处理
│ └── prompts.py # 提示词加载
├── templates/ # HTML 模板
├── static/ # 静态资源
└── data/ # 数据目录(自动创建)
├── projects.db # SQLite 数据库
├── uploads/ # 上传的招标文件
├── exports/ # 导出的标书
├── knowledge/ # 知识库文件
└── chroma/ # 向量数据库
```
---
## 企业知识库
在项目页面切换到「知识库」标签,上传历史标书文件。
系统会自动将文件分块存入向量数据库,生成内容时自动检索相关片段,让 AI 更好地体现企业优势。
---
## 常见问题
**Q: 解析速度很慢?**
A: 招标文件越长耗时越长,通常 30-120 秒。建议使用 qwen-max 或 gpt-4o。
**Q: 内容生成失败?**
A: 检查 API Key 是否正确,以及账户余额是否充足。
**Q: 导出的 Word 文件乱码?**
A: 请使用 Microsoft Word 2016 及以上版本打开。