{"id":50360804,"url":"https://github.com/codeweiz/ai-bidding","last_synced_at":"2026-05-30T01:21:00.017Z","repository":{"id":301917628,"uuid":"1010633329","full_name":"codeweiz/ai-bidding","owner":"codeweiz","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-12T05:01:48.000Z","size":1117,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T13:34:46.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeweiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-29T13:44:52.000Z","updated_at":"2026-01-12T05:01:51.000Z","dependencies_parsed_at":"2025-06-29T16:21:30.369Z","dependency_job_id":"1a9b73ce-86b9-430a-8c6d-2a77ca00082d","html_url":"https://github.com/codeweiz/ai-bidding","commit_stats":null,"previous_names":["codeweiz/ai-bidding"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeweiz/ai-bidding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeweiz%2Fai-bidding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeweiz%2Fai-bidding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeweiz%2Fai-bidding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeweiz%2Fai-bidding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeweiz","download_url":"https://codeload.github.com/codeweiz/ai-bidding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeweiz%2Fai-bidding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33677253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T01:20:58.969Z","updated_at":"2026-05-30T01:21:00.008Z","avatar_url":"https://github.com/codeweiz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 AI投标方案生成系统\n\n基于AI的投标方案辅助生成系统，帮助企业快速生成高质量的技术投标方案。\n\n## ✨ 功能特性\n\n- 📄 **智能文档解析**：支持Word、PDF格式招标文件的自动解析\n- 🧠 **AI需求分析**：自动提取技术需求、功能需求、性能指标等关键信息\n- 📋 **智能提纲生成**：基于需求分析自动生成方案提纲结构\n- ✍️ **内容自动生成**：分章节生成专业的技术方案内容\n- 🔄 **差异化处理**：自动改写内容，避免串标风险\n- 📊 **工作流管理**：完整的生成流程管理和状态跟踪\n- 🌐 **友好界面**：基于Gradio的直观Web界面\n\n## 🏗️ 技术架构\n\n### 核心技术栈\n- **后端框架**：FastAPI + LangChain + LangGraph\n- **AI模型**：DeepSeek Chat（可配置其他LLM）\n- **文档处理**：Unstructured\n- **前端界面**：Gradio\n- **文档生成**：python-docx\n\n### 系统架构\n```\n┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐\n│   前端界面      │    │   后端API       │    │   AI服务        │\n│   (Gradio)      │◄──►│   (FastAPI)     │◄──►│   (DeepSeek)    │\n└─────────────────┘    └─────────────────┘    └─────────────────┘\n                              │\n                              ▼\n                       ┌─────────────────┐\n                       │   工作流引擎    │\n                       │   (LangGraph)   │\n                       └─────────────────┘\n                              │\n                              ▼\n                       ┌─────────────────┐\n                       │   文档处理      │\n                       │ (Unstructured)  │\n                       └─────────────────┘\n```\n\n## 🚀 快速开始\n\n### 1. 环境要求\n- Python 3.11+\n- 8GB+ 内存\n- DeepSeek API密钥（或其他LLM API密钥）\n\n### 2. 安装依赖\n```bash\n# 克隆项目\ngit clone \u003crepository-url\u003e\ncd ai-bidding\n\n# 安装依赖\nmake install\n# 或者\npip install -e .\n```\n\n### 3. 配置设置\n编辑 `config.toml` 文件，配置API密钥：\n```toml\n[llm]\nprovider = \"deepseek\"\nmodel_name = \"deepseek-chat\"\napi_key = \"your-api-key-here\"\n```\n\n### 4. 启动系统\n```bash\n# 一键启动（推荐）\npython run.py\n\n# 或者分别启动\nmake run-backend  # 启动后端 (端口8000)\nmake run-frontend # 启动前端 (端口7860)\n```\n\n### 5. 访问系统\n- 🌐 前端界面：http://localhost:7860\n- 📊 后端API：http://localhost:8000\n- 📚 API文档：http://localhost:8000/docs\n\n## 📖 使用指南\n\n### 基本流程\n1. **创建项目**：在\"项目管理\"页面创建新项目\n2. **上传文档**：在\"文档处理\"页面上传招标文件\n3. **分析需求**：系统自动解析文档并提取需求\n4. **生成方案**：在\"方案生成\"页面启动完整生成流程\n5. **下载结果**：在\"输出管理\"页面下载生成的Word文档\n\n### 详细步骤\n\n#### 步骤1：项目管理\n- 输入项目名称和描述\n- 选择是否启用差异化处理\n- 点击\"创建项目\"\n\n#### 步骤2：文档上传\n- 选择招标文档（支持PDF、Word格式）\n- 点击\"上传文档\"\n- 点击\"分析需求\"查看需求分析结果\n\n#### 步骤3：方案生成\n- 可以先点击\"生成提纲\"预览方案结构\n- 点击\"开始完整生成\"启动完整流程\n- 使用\"检查状态\"监控生成进度\n\n#### 步骤4：结果下载\n- 在\"输出管理\"页面查看生成的文件\n- 下载Word格式的技术方案\n\n## 🛠️ 开发指南\n\n### 项目结构\n```\nai-bidding/\n├── backend/           # 后端代码\n│   ├── api/          # API路由\n│   ├── core/         # 核心配置\n│   ├── models/       # 数据模型\n│   ├── schemas/      # API模式\n│   └── services/     # 业务服务\n├── frontend/         # 前端代码\n├── docs/            # 文档\n├── tests/           # 测试\n└── config.toml      # 配置文件\n```\n\n### 核心模块\n\n#### 文档解析器 (`backend/services/document_parser.py`)\n- 使用Unstructured解析各种格式文档\n- 支持中英文文档\n- 自动分块处理长文档\n\n#### LLM服务 (`backend/services/llm_service.py`)\n- 封装AI模型调用\n- 提供需求分析、提纲生成、内容生成等功能\n- 支持差异化处理\n\n#### 工作流引擎 (`backend/services/workflow_engine.py`)\n- 基于LangGraph的状态管理\n- 支持流程中断和恢复\n- 完整的错误处理\n\n#### 内容生成器 (`backend/services/content_generator.py`)\n- 协调整个生成流程\n- Word文档生成\n- 文件管理\n\n### 扩展开发\n\n#### 添加新的LLM提供商\n1. 在 `backend/services/llm_service.py` 中添加新的LLM客户端\n2. 更新 `config.toml` 配置选项\n3. 测试新提供商的API调用\n\n#### 自定义Prompt模板\n在 `backend/services/llm_service.py` 中修改各个方法的system_prompt和user_prompt\n\n#### 添加新的文档格式支持\n在 `backend/services/document_parser.py` 中扩展UnstructuredLoader的配置\n\n## 🧪 测试\n\n```bash\n# 运行所有测试\nmake test\n\n# 运行测试并生成覆盖率报告\nmake test-cov\n\n# 运行特定测试\npython -m pytest tests/test_document_parser.py -v\n\n# 代码质量检查\nmake check\n```\n\n## 🐳 Docker 部署\n\n### 快速部署\n```bash\n# 一键部署\n./deploy.sh\n\n# 或者使用 make 命令\nmake docker-build\nmake docker-run\n```\n\n### 使用 Docker Compose\n\n#### 开发环境\n```bash\n# 启动开发环境\ndocker-compose -f docker-compose.dev.yml up -d\n\n# 查看日志\ndocker-compose -f docker-compose.dev.yml logs -f\n```\n\n#### 生产环境\n```bash\n# 启动生产环境\ndocker-compose -f docker-compose.prod.yml up -d\n\n# 启动包含监控的完整环境\ndocker-compose -f docker-compose.prod.yml --profile monitoring up -d\n\n# 查看服务状态\ndocker-compose -f docker-compose.prod.yml ps\n```\n\n### 部署脚本使用\n\n```bash\n# 查看帮助\n./deploy.sh help\n\n# 完整部署\n./deploy.sh deploy\n\n# 只构建镜像\n./deploy.sh build\n\n# 启动服务\n./deploy.sh start\n\n# 停止服务\n./deploy.sh stop\n\n# 查看日志\n./deploy.sh logs\n\n# 清理资源\n./deploy.sh clean\n```\n\n## 🔧 Makefile 使用指南\n\n### 环境管理\n```bash\nmake install      # 安装生产依赖\nmake dev-install  # 安装开发依赖\nmake setup        # 初始化项目环境\nmake clean        # 清理缓存文件\n```\n\n### 运行服务\n```bash\nmake run          # 一键启动所有服务\nmake run-backend  # 只启动后端\nmake run-frontend # 只启动前端\n```\n\n### 测试和质量\n```bash\nmake test         # 运行测试\nmake test-cov     # 测试+覆盖率报告\nmake lint         # 代码检查\nmake format       # 代码格式化\nmake check        # 完整质量检查\n```\n\n### Docker 操作\n```bash\nmake docker-build           # 构建镜像\nmake docker-run             # 运行容器\nmake docker-compose-up      # 启动compose\nmake docker-compose-down    # 停止compose\n```\n\n### 开发工具\n```bash\nmake dev-server   # 启动调试服务器\nmake logs         # 查看日志\nmake check-config # 检查配置\nmake status       # 查看项目状态\n```\n\n## 📋 TODO\n\n- [ ] 添加数据库持久化\n- [ ] 实现用户认证和权限管理\n- [ ] 支持更多文档格式\n- [ ] 添加模板管理功能\n- [ ] 实现批量处理\n- [ ] 优化生成速度\n- [ ] 添加更多LLM提供商支持\n\n## 🤝 贡献\n\n欢迎提交Issue和Pull Request！\n\n## 📄 许可证\n\nMIT License\n\n## 📞 支持\n\n如有问题，请提交Issue或联系开发团队。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeweiz%2Fai-bidding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeweiz%2Fai-bidding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeweiz%2Fai-bidding/lists"}