{"id":13642862,"url":"https://github.com/zhaoyingjun/chatbot","last_synced_at":"2026-10-20T20:28:42.016Z","repository":{"id":37381851,"uuid":"116697549","full_name":"zhaoyingjun/chatbot","owner":"zhaoyingjun","description":"Chatbot继续沿着LLM前进，近期更新小参数量SLM的和训练脚本，支持本地训练。新增ChatAgent,实现各种有实际场景价值的Agent实现。","archived":false,"fork":false,"pushed_at":"2025-10-09T11:20:37.000Z","size":79353,"stargazers_count":3579,"open_issues_count":96,"forks_count":1005,"subscribers_count":109,"default_branch":"master","last_synced_at":"2026-10-17T09:40:55.393Z","etag":null,"topics":["agentic-ai","ai","aiagents","chatbot","python","pytorch","seq2seq-chatbot","shopping","slm"],"latest_commit_sha":null,"homepage":"","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/zhaoyingjun.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}},"created_at":"2018-01-08T16:00:08.000Z","updated_at":"2026-10-13T08:04:40.000Z","dependencies_parsed_at":"2022-07-22T06:18:02.534Z","dependency_job_id":"dac9a0d5-2e5c-494c-9466-13de85a02ae3","html_url":"https://github.com/zhaoyingjun/chatbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhaoyingjun/chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaoyingjun%2Fchatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaoyingjun%2Fchatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaoyingjun%2Fchatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaoyingjun%2Fchatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaoyingjun","download_url":"https://codeload.github.com/zhaoyingjun/chatbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaoyingjun%2Fchatbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38341179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"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":["agentic-ai","ai","aiagents","chatbot","python","pytorch","seq2seq-chatbot","shopping","slm"],"created_at":"2024-08-02T01:01:37.382Z","updated_at":"2026-10-18T20:08:40.428Z","avatar_url":"https://github.com/zhaoyingjun.png","language":"Python","funding_links":[],"categories":["Machine Learning and AI","Chatbots","Natural Language Processing","Python","Chatbots \u0026 Virtual Companions"],"sub_categories":["LLM and Inference","Conversation \u0026 Translation"],"readme":"# 项目文档切换\n\n[查看 Shopping Agent 文档](#shopping-agent) | [查看 Chatbot 文档](#chatbot)\n\n---\n\n\u003cspan id=\"shopping-agent\"\u003e\u003c/span\u003e\n\n# Shopping Agent\n\n## 概述\n\nShoppingAgent是一个智能订单分析Agent，能够通过浏览器自动化、截图识别和大模型分析，帮助用户快速提取、汇总、生成excel，可以处理所有无法直接导出的订单后台信息。采用FastAPI作为后端服务，Streamlit作为前端界面，借助大模型的能力，实现自动化的Agent功能，提供直观的操作体验和强大的订单处理能力。\n\n## 功能特点\n\n- 自然语言交互：通过聊天界面使用自然语言指令控制订单处理流程\n- 浏览器自动化：自动打开网页并进行截图操作\n- 灵活截图：支持全屏截图、元素选择截图和手动区域选择截图\n- 批量分析：对多张订单截图进行批量处理和信息提取\n- 数据导出：将分析结果导出为Excel文件\n- 系统配置：可自定义服务器、模型和浏览器等参数\n\n## 快速开始\n\n### 前提条件\n\n- Python 3.8+\n- Google Chrome浏览器（版本140.0及以上，建议使用最新稳定版）\n- 下载Chrome驱动，下载地址见dist/resourece文件夹下\n\n### 安装步骤\n\n1. 克隆项目代码库到本地\n\n2. 安装依赖包：\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n### 启动应用\n\n1. 启动后端服务：\n   ```bash\n   python -m app.main\n   ```\n\n2. 打开新终端，启动前端界面：\n   ```bash\n   streamlit run app/frontend.py\n   ```\n\n3. 浏览器会自动打开前端界面，或手动访问 http://localhost:8501\n\n## 使用指南\n\n### 基本流程\n\n1. **打开订单页面**：在URL输入框中输入订单页面地址，点击\"打开网页\"按钮\n\n2. **截取订单截图**：\n   - 选择截图方式（默认全屏或手动选择区域）\n   - 对于手动选择区域：先获取全页截图，然后在图片上拖动鼠标选择订单区域，最后点击\"截取所选区域\"\n\n3. **分析订单**：点击\"批量分析订单\"按钮，系统会自动处理所有截图并提取订单信息\n\n4. **查看和导出结果**：在右侧面板查看分析结果，点击\"导出为Excel\"保存数据\n\n### 智能交互\n\n在左侧聊天窗口，可以使用自然语言指令控制系统\n\n## 系统配置\n\n在侧边栏选择\"系统设置\"，可以配置：\n- 服务器地址和端口\n- AI模型参数和API密钥\n- Chrome浏览器和驱动路径\n\n\u003e 注意：配置修改后需要重启应用才能生效\n\n## 目录结构\nproject-root/\n├── app/\n│   ├── __init__.py\n│   ├── main.py          # 后端服务入口\n│   ├── frontend.py      # 前端界面\n│   ├── config.py        # 配置文件\n│   └── utils/           # 工具函数\n├── screenshots/         # 截图保存目录\n├── excels/              # Excel导出目录\n├── .env                 # 环境变量\n└── requirements.txt     # 依赖清单\n## 常见问题\n\n1. **浏览器无法启动**：\n   - 检查CHROME_PATH配置是否正确\n   - 确保Chrome浏览器已安装且版本为112.0及以上\n   - 尝试更新Chrome浏览器到最新版本\n   - Windows系统需确保Chrome安装路径不含中文或特殊字符\n\n2. **截图失败**：\n   - 检查网页是否完全加载\n   - 尝试使用不同的截图方式\n   - 确认浏览器窗口没有被最小化\n   - 确保Chrome版本与chromedriver版本匹配\n\n3. **分析结果不准确**：\n   - 确保订单截图清晰可见\n   - 尝试缩小截图区域，只包含订单信息\n   - 检查API密钥和网络连接\n\n4. **前后端连接失败**：\n   - 确认后端服务已启动\n   - 检查服务器地址配置是否正确\n   - 确认端口没有被占用\n\n## 依赖说明\n\n### 基础依赖\n- python-dotenv\u003e=1.0.0    # 环境变量管理\n- fastapi\u003e=0.103.1        # 后端API框架\n- uvicorn\u003e=0.23.2         # ASGI服务器\n- streamlit\u003e=1.27.0       # 前端框架\n- requests\u003e=2.31.0        # HTTP请求\n- pandas\u003e=2.1.1           # 数据处理\n- openpyxl\u003e=3.1.2         # Excel处理\n- pillow\u003e=10.0.1          # 图像处理\n\n### 浏览器自动化\n- selenium\u003e=4.14.0        # 浏览器自动化（兼容Chrome 112+）\n- webdriver-manager\u003e=4.0.1 # WebDriver管理（自动匹配Chrome版本）\n\n### 图像处理与多模态理解\n- python-multipart\u003e=0.0.6 # 处理multipart表单数据\n\n---\n\n[切换到 Chatbot 文档](#chatbot)\n\n---\n\n\u003cspan id=\"chatbot\"\u003e\u003c/span\u003e\n\n# chatbot\nChatGPT带火了聊天机器人，主流的趋势都调整到了GPT类模式，本项目也与时俱进，会在近期更新更新GPT类版本。\n这是一个可以使用自己语料进行训练的中文聊天机器人项目，欢迎大家实践交流以及Star、Fork。\n\n## Seq2Seq版本效果参考（训练进度50%）\n![img_1.png](img_1.png) ![img_2.png](img_2.png)\n\n## RoadMap:\n### V1.1: Update: 2024-09-30\n1. 增加MindSpore版本，优先在MindSpore版本上引入GPT模型，RLHF等特性。\n2. 整体工程架构分为Seq2Seq和GPT两大分支，继续保持多AI框架版本演进。\n\n### V1.2: Update: 2024-12-30 (Maybe)\n1. 实现类似mini-GPT4的功能，可以进行图文多模态的对话，主要提升趣味性和丰富性。\n2. 增强分布式集群训练相关能力和RLHF等特性。\n\n## seq2seq版本代码执行顺序\n大家可以使用小黄鸡的语料，下载地址：\nhttps://github.com/zhaoyingjun/chatbot/blob/master/chineseChatbotWeb-tf2.0/seq2seqChatbot/train_data/xiaohuangji50w_nofenci.conv\n\n1. 在下载好代码和语料之后，将语料文件放入train_data目录下，超参配置在config/seq2seq.ini文件中配置。\n2. 按照数据预处理器（data_utls.py）→ execute.py（执行器）→ app.py（可视化对话模块）的顺序执行就可以了。\n3. 大规模分布式训练版本，参照horovod的启动方式：\n   ```bash\n   horovodrun -np n -H host1_ip:port,host2_ip:port,hostn_ip:port python3 excute.py\n   ```\n\n## 建议训练环境配置\n- ubuntu==18.04  \n- python==3.6  \n\n### TF2.X:\n- tensorflow==2.6.0\n- flask==0.11.1\n- horovod==0.24 (分布式训练)\n\n### pytorch:\n- torch==1.11.0\n- flask==0.11.1\n\n## 开源交流、联系方式\nQQ：934389697\n\n---\n\n[切换到 Shopping Agent 文档](#shopping-agent)\n    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaoyingjun%2Fchatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaoyingjun%2Fchatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaoyingjun%2Fchatbot/lists"}