[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-InternLM--HuixiangDou":3,"tool-InternLM--HuixiangDou":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":75,"owner_location":75,"owner_email":76,"owner_twitter":77,"owner_website":78,"owner_url":79,"languages":80,"stars":109,"forks":110,"last_commit_at":111,"license":112,"difficulty_score":113,"env_os":114,"env_gpu":115,"env_ram":116,"env_deps":117,"category_tags":131,"github_topics":133,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":148,"updated_at":149,"faqs":150,"releases":181},8900,"InternLM\u002FHuixiangDou","HuixiangDou","HuixiangDou: Overcoming Group Chat Scenarios with LLM-based Technical Assistance","HuixiangDou 是一款基于大语言模型的专业知识助手，专为解决微信群等群组聊天场景中的技术咨询难题而设计。在热闹的群聊中，它不仅能精准识别并回答用户的专业问题，还能有效避免无关消息泛滥，确保交流高效有序。除了群聊模式，它还支持针对代码仓库的实时流式对话，帮助用户快速查阅文档或调试代码。\n\n该工具最大的亮点在于其“零训练”部署方案，仅需普通 CPU 甚至低配置显卡即可运行，极大地降低了使用门槛。其核心采用独特的三阶段处理流水线（预处理、拒答判断、响应生成），结合混合检索技术，显著提升了回答的准确率与相关性。此外，HuixiangDou 提供了完整的 Web 端、Android API 及后端源码，具备工业级的稳定性，已实际应用于植物科学等前沿领域并助力顶级期刊论文发表。\n\n无论是希望为社群引入智能助力的运营者、需要构建私有知识库的企业开发者，还是寻求低成本落地方案的科研人员，都能通过 HuixiangDou 轻松搭建属于自己的 AI 专家系统。它不仅支持集成到微信、飞书等主流平台，还允许用户自定义正负样本以优化效果，是让大模型真正融入日常协作流程的实用利器。","\n# 🎚️ Upgrade\n\n[HuixiangDou2](https:\u002F\u002Fgithub.com\u002Ftpoisonooo\u002FHuixiangDou2)(ACL25) is a GraphRAG solution whose effectiveness has been demonstrated in the plant-science domain and that contributed to the [**cover paper in Cell**](https:\u002F\u002Fwww.cell.com\u002Fmolecular-plant\u002Fissue?pii=S1674-2052(24)X0008-8) Molecular Plant. If you work outside computer science, give the new release a try.\n\n---\n\nEnglish | [简体中文](README_zh.md)\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"resource\u002Flogo_black.svg\" width=\"555px\"\u002F>\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcdn.vansin.top\u002Finternlm\u002Fdou.jpg\" target=\"_blank\">\n    \u003Cimg alt=\"Wechat\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fwechat-robot%20inside-brightgreen?logo=wechat&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fen\u002Flatest\u002F\" target=\"_blank\">\n    \u003Cimg alt=\"Readthedocs\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Freadthedocs-chat%20with%20AI-brightgreen?logo=readthedocs&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FylXrT-Tei-Y\" target=\"_blank\">\n    \u003Cimg alt=\"YouTube\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-black?logo=youtube&logoColor=red\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1S2421N7mn\" target=\"_blank\">\n    \u003Cimg alt=\"BiliBili\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBiliBili-pink?logo=bilibili&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FTW4ZBpZZ\" target=\"_blank\">\n    \u003Cimg alt=\"discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdiscord-red?logo=discord&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2401.08772\" target=\"_blank\">\n    \u003Cimg alt=\"Arxiv\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Farxiv-2401.08772%20-darkred?logo=arxiv&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817\" target=\"_blank\">\n    \u003Cimg alt=\"Arxiv\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Farxiv-2405.02817%20-darkred?logo=arxiv&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003C\u002Fdiv>\n\nHuixiangDou1 is a **professional knowledge assistant** based on LLM.\n\nAdvantages:\n\n1. Design three-stage pipelines of preprocess, rejection and response\n    * `chat_in_group` copes with **group chat** scenario, answer user questions without message flooding, see [2401.08772](https:\u002F\u002Farxiv.org\u002Fabs\u002F2401.08772), [2405.02817](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817), [Hybrid Retrieval](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md) and [Precision Report](.\u002Fevaluation\u002F)\n    * `chat_with_repo` for **real-time streaming** chat\n2. No training required, with CPU-only, 2G, 10G   configuration\n3. Offers a complete suite of Web, Android, and pipeline source code, industrial-grade and commercially viable\n\nCheck out the [scenes in which HuixiangDou are running](.\u002Fhuixiangdou-inside.md) and current public service status:\n- [readthedocs ChatWithAI](https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fzh-cn\u002Flatest\u002F) (cpu-only) is available\n- [OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web) is using GPU and under continuous maintenance\n- [WeChat bot](https:\u002F\u002Fcdn.vansin.top\u002Finternlm\u002Fdou.jpg) has a cost associated with WeChat integration. All code has been verified to be functional for one year. Please deploy it on your own for either the [free](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fblob\u002Fmain\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md) or [commercial](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fblob\u002Fmain\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md) version.\n\nIf this helps you, please give it a star ⭐\n\n# 🔆 New Features\n\nOur Web version has been released to [OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web), where you can create knowledge base, update positive and negative examples, turn on web search, test chat, and integrate into Feishu\u002FWeChat groups. See [BiliBili](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1S2421N7mn) and [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ylXrT-Tei-Y) !\n\nThe Web version's API for Android also supports other devices. See [Python sample code](.\u002Ftests\u002Ftest_openxlab_android_api.py).\n\n- \\[2025\u002F03\\] Simplify deployment and removing `--standalone`\n- \\[2025\u002F03\\] [Forwarding multiple wechat group message](.\u002Fdocs\u002Fzh\u002Fdoc_merge_wechat_group.md)\n- \\[2024\u002F09\\] [Inverted indexer](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F387) makes LLM prefer knowledge base🎯\n- \\[2024\u002F09\\] [Code retrieval](.\u002Fhuixiangdou\u002Fservices\u002Fparallel_pipeline.py)\n- \\[2024\u002F08\\] [chat_with_readthedocs](https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fen\u002Flatest\u002F), see [how to integrate](.\u002Fdocs\u002Fzh\u002Fdoc_add_readthedocs.md) 👍\n- \\[2024\u002F07\\] Image and text retrieval & Removal of `langchain` 👍\n- \\[2024\u002F07\\] [Hybrid Knowledge Graph and Dense Retrieval](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md) improve 1.7% F1 score 🎯\n- \\[2024\u002F06\\] [Evaluation of chunksize, splitter, and text2vec model](.\u002Fevaluation) 🎯\n- \\[2024\u002F05\\] [wkteam WeChat access](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md), parsing image & URL, support coreference resolution\n- \\[2024\u002F05\\] [SFT LLM on NLP task, F1 increased by 29%](.\u002Fsft\u002F) 🎯\n  \u003Ctable>\n      \u003Ctr>\n          \u003Ctd>🤗\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Ftpoisonooo\u002FHuixiangDou-CR-LoRA-Qwen-14B\">LoRA-Qwen1.5-14B\u003C\u002Fa>\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Ftpoisonooo\u002FHuixiangDou-CR-LoRA-Qwen-32B\">LoRA-Qwen1.5-32B\u003C\u002Fa>\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Ftpoisonooo\u002FHuixiangDou-CR\u002Ftree\u002Fmain\">alpaca data\u003C\u002Fa>\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817\">arXiv\u003C\u002Fa>\u003C\u002Ftd>\n      \u003C\u002Ftr>\n  \u003C\u002Ftable>\n- \\[2024\u002F04\\] [RAG Annotation SFT Q&A Data and Examples](.\u002Fdocs\u002Fzh\u002Fdoc_rag_annotate_sft_data.md)\n- \\[2024\u002F04\\] Release [Web Front and Back End Service Source Code](.\u002Fweb) 👍\n- \\[2024\u002F03\\] New [Personal WeChat Integration](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md) and [**Prebuilt APK**](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Freleases\u002Fdownload\u002Fv0.1.0rc1\u002Fhuixiangdou-20240508.apk) !\n- \\[2024\u002F02\\] \\[Experimental Feature\\] [WeChat Group](https:\u002F\u002Fcdn.vansin.top\u002Finternlm\u002Fdou.jpg) Integration of multimodal to achieve OCR\n\n# 📖 Support Status\n\n\u003Ctable align=\"center\">\n  \u003Ctbody>\n    \u003Ctr align=\"center\" valign=\"bottom\">\n      \u003Ctd>\n        \u003Cb>LLM\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>File Format\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>Retrieval Method\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>Integration\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>Preprocessing\u003C\u002Fb>\n      \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr valign=\"top\">\n      \u003Ctd>\n\n- [DeepSeek](https:\u002F\u002Fwww.deepseek.com)\n- [InternLM](https:\u002F\u002Finternlm.intern-ai.org.cn)\n- [GLM](https:\u002F\u002Fwww.zhipuai.cn)\n- [KIMI](https:\u002F\u002Fkimi.moonshot.cn)\n- [StepFun](https:\u002F\u002Fplatform.stepfun.com)\n- [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)\n- [Silicon🏷️](https:\u002F\u002Fcloud.siliconflow.cn\u002Fs\u002Ftpoisonooo)\n- [PPIO🏷️](https:\u002F\u002Fppinfra.com\u002Fuser\u002Fregister?invited_by=7GF8QS) \n- [Xi-Api](https:\u002F\u002Fapi.xi-ai.cn)\n\n\u003C\u002Ftd>\n\u003Ctd>\n\n- excel\n- html\n- markdown\n- pdf\n- ppt\n- txt\n- word\n\n\u003C\u002Ftd>\n\n\u003Ctd>\n\n- Dense for Document\n- Sparse for Code \n- [Knowledge Graph](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md)\n- [Internet Search](.\u002Fhuixiangdou\u002Fservices\u002Fweb_search.py)\n- [SourceGraph](https:\u002F\u002Fsourcegraph.com)\n- Image and Text\n\n\u003C\u002Ftd>\n\n\u003Ctd>\n\n- WeChat([android](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md)\u002F[wkteam](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md))\n- Lark\n- [OpenXLab Web](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web)\n- [Gradio Demo](.\u002Fhuixiangdou\u002Fgradio_ui.py)\n- [HTTP Server](.\u002Fhuixiangdou\u002Fapi_server.py)\n- [Read the Docs](.\u002Fdocs\u002Fzh\u002Fdoc_add_readthedocs.md)\n\n\u003C\u002Ftd>\n\n\u003Ctd>\n\n- [Coreference Resolution](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817)\n\n\u003C\u002Ftd>\n\n\u003C\u002Ftr>\n\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n# 📦 Hardware Requirements\n\nThe following are the GPU memory requirements for different features, the difference lies only in whether the **options are turned on**.\n\n|              Configuration Example               | GPU mem Requirements |                                                                                   Description                                                                                   |                       Verified on Linux                        |\n| :----------------------------------------------: | :------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------: |\n|         [config-cpu.ini](.\u002Fconfig-cpu.ini)         |   -    | Use [siliconcloud](https:\u002F\u002Fsiliconflow.cn\u002F) API \u003Cbr\u002F> for text only | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fx86-passed-blue?style=for-the-badge) |\n|   \\[Standard Edition\\][config.ini](.\u002Fconfig.ini)         |         2GB          | Use openai API (such as [kimi](https:\u002F\u002Fkimi.moonshot.cn), [deepseek](https:\u002F\u002Fplatform.deepseek.com\u002Fusage) and [stepfun](https:\u002F\u002Fplatform.stepfun.com\u002F) to search for text only | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F1660ti%206G-passed-blue?style=for-the-badge) |\n| [config-multimodal.ini](.\u002Fconfig-multimodal.ini) |         10GB         |                                                                Use openai API for LLM, image and text retrieval                                                                 | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F3090%2024G-passed-blue?style=for-the-badge)  |\n\n# 🔥 Running the Standard Edition\n\nWe take the standard edition (local running LLM, text retrieval) as an introduction example. Other versions are just different in configuration options.\n\n## I. Download and install dependencies\n\n[Click to agree to the BCE model agreement](https:\u002F\u002Fhuggingface.co\u002Fmaidalun1020\u002Fbce-embedding-base_v1), log in huggingface\n\n```shell\nhuggingface-cli login\n```\n\nInstall dependencies\n\n```bash\n# parsing `word` format requirements\napt update\napt install python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig libpulse-dev\n# python requirements\npip install -r requirements.txt\n# For python3.8, install faiss-gpu instead of faiss\n```\n\n## II. Create knowledge base\n\nWe use some novels to build knowledge base and filtering questions. If you have your own documents, just put them under `repodir`.\n\nCopy and execute all the following commands (including the '#' symbol).\n\n```shell\n# Download the knowledge base, we only take the some documents as example. You can put any of your own documents under `repodir`\ncd HuixiangDou\nmkdir repodir\ncp -rf resource\u002Fdata* repodir\u002F\n\n# Build knowledge base, this will save the features of repodir to workdir, and update the positive and negative example thresholds into `config.ini`\nmkdir workdir\npython3 -m huixiangdou.services.store\n\n# You can also build knowledge base from QA pairs (CSV or JSON format)\n# CSV: First column is key (question), second column is value (answer)\n# JSON: {\"question1\": \"answer1\", \"question2\": \"answer2\", ...}\n# python3 -m huixiangdou.services.store --qa-pair resource\u002Fdata\u002Fqa_pair.csv\n```\n\n## III. Setup LLM API and test\nSet the model and `api-key` in `config.ini`. If running LLM locally, we recommend using `vllm`.\n\n```text\nvllm serve \u002Fpath\u002Fto\u002FQwen-2.5-7B-Instruct --served-model-name vllm --enable-prefix-caching --served-model-name Qwen-2.5-7B-Instruct\n```\n\nHere is an example of the configured `config.ini`:\n\n```ini\n[llm.server]\nremote_type = \"kimi\"\nremote_api_key = \"sk-dp3GriuhhLXnYo0KUuWbFUWWKOXXXXXXXXXX\"\nremote_llm_model = \"auto\"\n\n# remote_type = \"step\"\n# remote_api_key = \"5CpPyYNPhQMkIzs5SYfcdbTHXq3a72H5XXXXXXXXXXXXX\"\n# remote_llm_model = \"auto\"\n\n# remote_type = \"deepseek\"\n# remote_api_key = \"sk-86db9a205aa9422XXXXXXXXXXXXXX\"\n# remote_llm_model = \"deepseek-chat\"\n\n# remote_type = \"vllm\"\n# remote_api_key = \"EMPTY\"\n# remote_llm_model = \"Qwen2.5-7B-Instruct\"\n\n# remote_type = \"siliconcloud\"\n# remote_api_key = \"sk-xxxxxxxxxxxxx\"\n# remote_llm_model = \"alibaba\u002FQwen1.5-110B-Chat\"\n\n# remote_type = \"ppio\"\n# remote_api_key = \"sk-xxxxxxxxxxxxx\"\n# remote_llm_model = \"thudm\u002Fglm-4-9b-chat\"\n```\n\nThen run the test:\n\n```text\n# Respond to questions related to the Hundred-Plant Garden (related to the knowledge base), but do not respond to weather questions.\npython3 -m huixiangdou.main\n\n+-----------------------+---------+--------------------------------+-----------------+\n|         Query         |  State  |         Reply                  |   References    |\n+=======================+=========+================================+=================+\n| What is in the Hundred-Plant Garden? | success | The Hundred-Plant Garden has a rich variety of natural landscapes and life... | installation.md |\n--------------------------------------------------------------------------------------\n| How is the weather today?         | Init state| ..                           |                 |\n+-----------------------+---------+--------------------------------+-----------------+\n🔆 Input your question here, type `bye` for exit:\n..\n```\n\n💡 Also run a simple Web UI with `gradio`:\n\n```bash\npython3 -m huixiangdou.gradio_ui\n```\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F9e5dbb30-1dc1-42ad-a7d4-dc7380676554\" >\u003C\u002Fvideo>\n\nOr run a server to listen 23333, default pipeline is `chat_with_repo`:\n```bash\npython3 -m huixiangdou.api_server\n\n# test async API \ncurl -X POST http:\u002F\u002F127.0.0.1:23333\u002Fhuixiangdou_stream  -H \"Content-Type: application\u002Fjson\" -d '{\"text\": \"how to install mmpose\",\"image\": \"\"}'\n# cURL sync API\ncurl -X POST http:\u002F\u002F127.0.0.1:23333\u002Fhuixiangdou_inference  -H \"Content-Type: application\u002Fjson\" -d '{\"text\": \"how to install mmpose\",\"image\": \"\"}'\n```\n\n\nPlease update the `repodir` documents, [good_questions](.\u002Fresource\u002Fgood_questions.json) and [bad_questions](.\u002Fresource\u002Fbad_questions.json), and try your own domain knowledge (medical, financial, power, etc.).\n\n## IV. Integration\n\n### To Feishu, WeChat group\n\n- [**One-way** sending to Feishu group](.\u002Fdocs\u002Fzh\u002Fdoc_send_only_lark_group.md)\n- [**Two-way** Feishu group receiving and sending, recalling](.\u002Fdocs\u002Fzh\u002Fdoc_add_lark_group.md)\n- [Personal WeChat Android access](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md) and [Android tool](.\u002Fandroid)\n- [Personal WeChat wkteam access](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md)\n\n### To web front and backend\n\nWe provide `typescript` front-end and `python` back-end source code:\n\n- Multi-tenant management supported\n- Zero programming access to Feishu and WeChat\n- k8s friendly\n\nSame as [OpenXlab APP](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web), please read the [web deployment document](.\u002Fweb\u002FREADME.md).\n\n### To readthedocs.io\n\n[Try right-bottom button on the page](https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fzh-cn\u002Flatest\u002F) and [document](.\u002Fdocs\u002Fzh\u002Fdoc_add_readthedocs.md).\n\n# 🍴 Other Configurations\n\n## **CPU-only Edition**\n\nIf there is no GPU available, model inference can be completed using the [siliconcloud](https:\u002F\u002Fsiliconflow.cn\u002F) API.\n\nTaking docker miniconda+Python3.11 as an example, install CPU dependencies and run:\n\n```bash\n# Start container\ndocker run -v \u002Fpath\u002Fto\u002Fhuixiangdou:\u002Fhuixiangdou -p 7860:7860 -p 23333:23333 -it continuumio\u002Fminiconda3 \u002Fbin\u002Fbash\n# Install dependencies\napt update\napt install python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig libpulse-dev\npython3 -m pip install -r requirements-cpu.txt\n# Establish knowledge base\npython3 -m huixiangdou.services.store --config_path config-cpu.ini\n# Q&A test\npython3 -m huixiangdou.main --config_path config-cpu.ini\n# gradio UI\npython3 -m huixiangdou.gradio_ui --config_path config-cpu.ini\n```\n\nIf you find the installation too slow, a pre-installed image is provided in [Docker Hub](https:\u002F\u002Fhub.docker.com\u002Frepository\u002Fdocker\u002Ftpoisonooo\u002Fhuixiangdou\u002Ftags). Simply replace it when starting the docker.\n\n## **10G Multimodal Edition**\n\nIf you have 10G GPU mem, you can further support image and text retrieval. Just modify the model used in config.ini.\n\n```toml\n# config-multimodal.ini\n# !!! Download `https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fbge-visualized\u002Fblob\u002Fmain\u002FVisualized_m3.pth`    to `bge-m3` folder !!!\nembedding_model_path = \"BAAI\u002Fbge-m3\"\nreranker_model_path = \"BAAI\u002Fbge-reranker-v2-minicpm-layerwise\"\n```\n\nNote:\n\n- You need to manually download [Visualized_m3.pth](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fbge-visualized\u002Fblob\u002Fmain\u002FVisualized_m3.pth) to the [bge-m3](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fbge-m3) directory\n- Install FlagEmbedding on main branch, we have made [bugfix](https:\u002F\u002Fgithub.com\u002FFlagOpen\u002FFlagEmbedding\u002Fcommit\u002F3f84da0796d5badc3ad519870612f1f18ff0d1d3). [Here](https:\u002F\u002Fgithub.com\u002FFlagOpen\u002FFlagEmbedding\u002Fblob\u002Fmaster\u002FFlagEmbedding\u002Fvisual\u002Feva_clip\u002Fbpe_simple_vocab_16e6.txt.gz) you can download `bpe_simple_vocab_16e6.txt.gz` \n- Install [requirements\u002Fmultimodal.txt](.\u002Frequirements\u002Fmultimodal.txt)\n\nRun gradio to test, see the image and text retrieval result [here](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F326).\n\n```bash\npython3 tests\u002Ftest_query_gradio.py\n```\n\n## **Furthermore**\n\nPlease read the following topics:\n\n- [Hybrid knowledge graph and dense retrieval](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md)\n- [Refer to config-advanced.ini configuration to improve effects](.\u002Fdocs\u002Fen\u002Fdoc_full_dev.md)\n- [Group chat scenario anaphora resolution training](.\u002Fsft)\n- [Use wkteam WeChat access, integrate images, public account parsing, and anaphora resolution](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md)\n- [Use rag.py to annotate SFT training data](.\u002Fdocs\u002Fzh\u002Fdoc_rag_annotate_sft_data.md)\n\n# 🛠️ FAQ\n\n1. What if the robot is too cold\u002Ftoo chatty?\n\n   - Fill in the questions that should be answered in the real scenario into `resource\u002Fgood_questions.json`, and fill the ones that should be rejected into `resource\u002Fbad_questions.json`.\n   - Adjust the theme content in `repodir` to ensure that the markdown documents in the main library do not contain irrelevant content.\n\n   Re-run `feature_store` to update thresholds and feature libraries.\n\n   ⚠️ You can directly modify `reject_throttle` in config.ini. Generally speaking, 0.5 is a high value; 0.2 is too low.\n\n2. Launch is normal, but out of memory during runtime?\n\n   LLM long text based on transformers structure requires more memory. At this time, kv cache quantization needs to be done on the model, such as [lmdeploy quantization description](https:\u002F\u002Fgithub.com\u002FInternLM\u002Flmdeploy\u002Fblob\u002Fmain\u002Fdocs\u002Fen\u002Fquantization). Then use docker to independently deploy Hybrid LLM Service.\n\n7. `No module named 'faiss.swigfaiss_avx2'` \n\n   locate installed `faiss` package\n   \n   ```python\n   import faiss\n   print(faiss.__file__)\n   # \u002Froot\u002F.conda\u002Fenvs\u002FInternLM2_Huixiangdou\u002Flib\u002Fpython3.10\u002Fsite-packages\u002Ffaiss\u002F__init__.py\n   ```\n\n   add soft link\n\n   ```Bash\n   # cd your_python_path\u002Fsite-packages\u002Ffaiss\n   cd \u002Froot\u002F.conda\u002Fenvs\u002FInternLM2_Huixiangdou\u002Flib\u002Fpython3.10\u002Fsite-packages\u002Ffaiss\u002F\n   ln -s swigfaiss.py swigfaiss_avx2.py\n   ```\n\n# 🍀 Acknowledgements\n\n- [KIMI](https:\u002F\u002Fkimi.moonshot.cn\u002F): Long text LLM, supports direct file upload\n- [FlagEmbedding](https:\u002F\u002Fgithub.com\u002FFlagOpen\u002FFlagEmbedding): BAAI RAG group\n- [BCEmbedding](https:\u002F\u002Fgithub.com\u002Fnetease-youdao\u002FBCEmbedding): Chinese-English bilingual feature model\n- [Langchain-ChatChat](https:\u002F\u002Fgithub.com\u002Fchatchat-space\u002FLangchain-Chatchat): Application of Langchain and ChatGLM\n- [GrabRedEnvelope](https:\u002F\u002Fgithub.com\u002Fxbdcc\u002FGrabRedEnvelope): WeChat red packet grab\n\n# 📝 Citation\n\n```shell\n@misc{kong2024huixiangdou,\n      title={HuiXiangDou: Overcoming Group Chat Scenarios with LLM-based Technical Assistance},\n      author={Huanjun Kong and Songyang Zhang and Jiaying Li and Min Xiao and Jun Xu and Kai Chen},\n      year={2024},\n      eprint={2401.08772},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n\n@misc{kong2024labelingsupervisedfinetuningdata,\n      title={Labeling supervised fine-tuning data with the scaling law}, \n      author={Huanjun Kong},\n      year={2024},\n      eprint={2405.02817},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817}, \n}\n\n@misc{kong2025huixiangdou2robustlyoptimizedgraphrag,\n      title={HuixiangDou2: A Robustly Optimized GraphRAG Approach}, \n      author={Huanjun Kong and Zhefan Wang and Chenyang Wang and Zhe Ma and Nanqing Dong},\n      year={2025},\n      eprint={2503.06474},\n      archivePrefix={arXiv},\n      primaryClass={cs.IR},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.06474}, \n}\n```\n","# 🎚️ 升级\n\n[HuixiangDou2](https:\u002F\u002Fgithub.com\u002Ftpoisonooo\u002FHuixiangDou2)(ACL25) 是一种 GraphRAG 解决方案，在植物科学领域已证明其有效性，并为《Molecular Plant》杂志的[**封面论文**](https:\u002F\u002Fwww.cell.com\u002Fmolecular-plant\u002Fissue?pii=S1674-2052(24)X0008-8) 做出了贡献。如果您从事计算机科学以外的工作，不妨试用一下这个新版本。\n\n---\n\n英语 | [简体中文](README_zh.md)\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"resource\u002Flogo_black.svg\" width=\"555px\"\u002F>\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcdn.vansin.top\u002Finternlm\u002Fdou.jpg\" target=\"_blank\">\n    \u003Cimg alt=\"Wechat\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fwechat-robot%20inside-brightgreen?logo=wechat&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fen\u002Flatest\u002F\" target=\"_blank\">\n    \u003Cimg alt=\"Readthedocs\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Freadthedocs-chat%20with%20AI-brightgreen?logo=readthedocs&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FylXrT-Tei-Y\" target=\"_blank\">\n    \u003Cimg alt=\"YouTube\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-black?logo=youtube&logoColor=red\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1S2421N7mn\" target=\"_blank\">\n    \u003Cimg alt=\"BiliBili\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBiliBili-pink?logo=bilibili&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FTW4ZBpZZ\" target=\"_blank\">\n    \u003Cimg alt=\"discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdiscord-red?logo=discord&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2401.08772\" target=\"_blank\">\n    \u003Cimg alt=\"Arxiv\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Farxiv-2401.08772%20-darkred?logo=arxiv&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817\" target=\"_blank\">\n    \u003Cimg alt=\"Arxiv\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Farxiv-2405.02817%20-darkred?logo=arxiv&logoColor=white\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003C\u002Fdiv>\n\nHuixiangDou1 是一款基于 LLM 的**专业知识助手**。\n\n优势：\n\n1. 设计了预处理、拒绝和响应三阶段流水线\n    * `chat_in_group` 适用于**群聊**场景，在不造成消息刷屏的情况下回答用户问题，详见 [2401.08772](https:\u002F\u002Farxiv.org\u002Fabs\u002F2401.08772)、[2405.02817](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817)、[混合检索](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md) 和 [精确度报告](.\u002Fevaluation\u002F)\n    * `chat_with_repo` 用于**实时流式**聊天\n2. 无需训练，支持仅 CPU、2G、10G 等配置\n3. 提供完整的 Web、Android 和流水线源代码套件，具备工业级标准且可商业化\n\n请查看 [HuixiangDou 运行的场景](.\u002Fhuixiangdou-inside.md) 以及当前的公共服务状态：\n- [readthedocs ChatWithAI](https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fzh-cn\u002Flatest\u002F)（仅 CPU）现已可用\n- [OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web) 使用 GPU 并持续维护中\n- [微信机器人](https:\u002F\u002Fcdn.vansin.top\u002Finternlm\u002Fdou.jpg) 需要支付微信接入的相关费用。所有代码均已验证一年内功能正常。请根据您的需求自行部署[免费版](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fblob\u002Fmain\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md)或[商业版](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fblob\u002Fmain\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md)。\n\n如果对您有所帮助，请给它点个赞 ⭐\n\n# 🔆 新特性\n\n我们的 Web 版本已发布至 [OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web)，您可以在其中创建知识库、更新正负样本、开启网页搜索、测试聊天功能，并将其集成到飞书\u002F微信群中。详情请参见 [BiliBili](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1S2421N7mn) 和 [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ylXrT-Tei-Y)！\n\nWeb 版本的 Android API 也支持其他设备。详情请参阅 [Python 示例代码](.\u002Ftests\u002Ftest_openxlab_android_api.py)。\n\n- \\[2025\u002F03\\] 简化部署并移除 `--standalone`\n- \\[2025\u002F03\\] [转发多条微信群消息](.\u002Fdocs\u002Fzh\u002Fdoc_merge_wechat_group.md)\n- \\[2024\u002F09\\] [倒排索引](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F387) 让 LLM 更倾向于使用知识库🎯\n- \\[2024\u002F09\\] [代码检索](.\u002Fhuixiangdou\u002Fservices\u002Fparallel_pipeline.py)\n- \\[2024\u002F08\\] [chat_with_readthedocs](https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fen\u002Flatest\u002F)，详情请参阅 [如何集成](.\u002Fdocs\u002Fzh\u002Fdoc_add_readthedocs.md) 👍\n- \\[2024\u002F07\\] 图像与文本检索及移除 `langchain` 👍\n- \\[2024\u002F07\\] [混合知识图谱与密集检索](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md)，将 F1 分数提升了 1.7% 🎯\n- \\[2024\u002F06\\] [评估 chunksize、分词器和 text2vec 模型](.\u002Fevaluation) 🎯\n- \\[2024\u002F05\\] [wkteam 微信接入](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md)，支持解析图片与 URL，并实现共指消解\n- \\[2024\u002F05\\] [针对 NLP 任务的 SFT LLM，F1 提升 29%](.\u002Fsft\u002F) 🎯\n  \u003Ctable>\n      \u003Ctr>\n          \u003Ctd>🤗\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Ftpoisonooo\u002FHuixiangDou-CR-LoRA-Qwen-14B\">LoRA-Qwen1.5-14B\u003C\u002Fa>\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Ftpoisonooo\u002FHuixiangDou-CR-LoRA-Qwen-32B\">LoRA-Qwen1.5-32B\u003C\u002Fa>\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Ftpoisonooo\u002FHuixiangDou-CR\u002Ftree\u002Fmain\">alpaca 数据\u003C\u002Fa>\u003C\u002Ftd>\n          \u003Ctd>\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817\">arXiv\u003C\u002Fa>\u003C\u002Ftd>\n      \u003C\u002Ftr>\n  \u003C\u002Ftable>\n- \\[2024\u002F04\\] [RAG 注释 SFT Q&A 数据和示例](.\u002Fdocs\u002Fzh\u002Fdoc_rag_annotate_sft_data.md)\n- \\[2024\u002F04\\] 发布 [Web 前后端服务源代码](.\u002Fweb) 👍\n- \\[2024\u002F03\\] 新增 [个人微信集成](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md) 和 [**预编译 APK**](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Freleases\u002Fdownload\u002Fv0.1.0rc1\u002Fhuixiangdou-20240508.apk)！\n- \\[2024\u002F02\\] [实验性功能] [微信群](https:\u002F\u002Fcdn.vansin.top\u002Finternlm\u002Fdou.jpg) 集成多模态技术以实现 OCR\n\n# 📖 支持状态\n\n\u003Ctable align=\"center\">\n  \u003Ctbody>\n    \u003Ctr align=\"center\" valign=\"bottom\">\n      \u003Ctd>\n        \u003Cb>LLM\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>文件格式\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>检索方法\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>集成\u003C\u002Fb>\n      \u003C\u002Ftd>\n      \u003Ctd>\n        \u003Cb>预处理\u003C\u002Fb>\n      \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr valign=\"top\">\n      \u003Ctd>\n\n- [DeepSeek](https:\u002F\u002Fwww.deepseek.com)\n- [InternLM](https:\u002F\u002Finternlm.intern-ai.org.cn)\n- [GLM](https:\u002F\u002Fwww.zhipuai.cn)\n- [KIMI](https:\u002F\u002Fkimi.moonshot.cn)\n- [StepFun](https:\u002F\u002Fplatform.stepfun.com)\n- [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)\n- [Silicon🏷️](https:\u002F\u002Fcloud.siliconflow.cn\u002Fs\u002Ftpoisonooo)\n- [PPIO🏷️](https:\u002F\u002Fppinfra.com\u002Fuser\u002Fregister?invited_by=7GF8QS) \n- [Xi-Api](https:\u002F\u002Fapi.xi-ai.cn)\n\n\u003C\u002Ftd>\n\u003Ctd>\n\n- excel\n- html\n- markdown\n- pdf\n- ppt\n- txt\n- word\n\n\u003C\u002Ftd>\n\n\u003Ctd>\n\n- 针对文档的密集向量检索\n- 针对代码的稀疏向量检索\n- [知识图谱](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md)\n- [互联网搜索](.\u002Fhuixiangdou\u002Fservices\u002Fweb_search.py)\n- [SourceGraph](https:\u002F\u002Fsourcegraph.com)\n- 图像与文本\n\n\u003C\u002Ftd>\n\n\u003Ctd>\n\n- 微信（[安卓](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md)\u002F[wkteam](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md))\n- Lark\n- [OpenXLab Web](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web)\n- [Gradio Demo](.\u002Fhuixiangdou\u002Fgradio_ui.py)\n- [HTTP 服务器](.\u002Fhuixiangdou\u002Fapi_server.py)\n- [Read the Docs](.\u002Fdocs\u002Fzh\u002Fdoc_add_readthedocs.md)\n\n\u003C\u002Ftd>\n\n\u003Ctd>\n\n- [指代消解](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817)\n\n\u003C\u002Ftd>\n\n\u003C\u002Ftr>\n\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n# 📦 硬件要求\n\n以下是不同功能所需的显存要求，区别仅在于是否**启用了相关选项**。\n\n|              配置示例               | 显存需求 |                                                                                   描述                                                                                   |                       在 Linux 上验证过                        |\n| :----------------------------------------------: | :------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------: |\n|         [config-cpu.ini](.\u002Fconfig-cpu.ini)         |   -    | 仅使用 [siliconcloud](https:\u002F\u002Fsiliconflow.cn\u002F) API 处理文本 | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fx86-passed-blue?style=for-the-badge) |\n|   \\[标准版\\][config.ini](.\u002Fconfig.ini)         |         2GB          | 使用 OpenAI API（如 [kimi](https:\u002F\u002Fkimi.moonshot.cn)、[deepseek](https:\u002F\u002Fplatform.deepseek.com\u002Fusage) 和 [stepfun](https:\u002F\u002Fplatform.stepfun.com\u002F)）进行纯文本检索 | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F1660ti%206G-passed-blue?style=for-the-badge) |\n| [config-multimodal.ini](.\u002Fconfig-multimodal.ini) |         10GB         |                                                                使用 OpenAI API 进行 LLM、图像和文本检索                                                                 | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F3090%2024G-passed-blue?style=for-the-badge)  |\n\n# 🔥 运行标准版\n\n我们以标准版（本地运行 LLM，文本检索）为例进行介绍。其他版本只是配置选项有所不同。\n\n## I. 下载并安装依赖项\n\n[点击同意 BCE 模型协议](https:\u002F\u002Fhuggingface.co\u002Fmaidalun1020\u002Fbce-embedding-base_v1)，登录 Hugging Face：\n\n```shell\nhuggingface-cli login\n```\n\n安装依赖项：\n\n```bash\n# 解析 `word` 格式所需软件\napt update\napt install python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig libpulse-dev\n# Python 所需库\npip install -r requirements.txt\n# 对于 Python 3.8，请安装 faiss-gpu 而不是 faiss\n```\n\n## II. 创建知识库\n\n我们使用一些小说来构建知识库，并筛选问题。如果你有自己的文档，只需将其放入 `repodir` 目录下即可。\n\n复制并执行以下所有命令（包括 `#` 符号）：\n\n```shell\n# 下载知识库，这里仅以部分文档为例。你可以将任何自己的文档放入 `repodir` 目录中。\ncd HuixiangDou\nmkdir repodir\ncp -rf resource\u002Fdata* repodir\u002F\n\n# 构建知识库，这会将 `repodir` 中的内容特征保存到 `workdir`，并将正负样本阈值更新到 `config.ini` 文件中。\nmkdir workdir\npython3 -m huixiangdou.services.store\n\n# 你也可以从 QA 对（CSV 或 JSON 格式）构建知识库。\n# CSV：第一列是问题，第二列是答案。\n# JSON：{\"question1\": \"answer1\", \"question2\": \"answer2\", ...}\n# python3 -m huixiangdou.services.store --qa-pair resource\u002Fdata\u002Fqa_pair.csv\n```\n\n## III. 设置 LLM API 并测试\n在 `config.ini` 文件中设置模型和 `api-key`。如果要在本地运行 LLM，建议使用 `vllm`。\n\n```text\nvllm serve \u002Fpath\u002Fto\u002FQwen-2.5-7B-Instruct --served-model-name vllm --enable-prefix-caching --served-model-name Qwen-2.5-7B-Instruct\n```\n\n以下是已配置的 `config.ini` 示例：\n\n```ini\n[llm.server]\nremote_type = \"kimi\"\nremote_api_key = \"sk-dp3GriuhhLXnYo0KUuWbFUWWKOXXXXXXXXXX\"\nremote_llm_model = \"auto\"\n\n# remote_type = \"step\"\n# remote_api_key = \"5CpPyYNPhQMkIzs5SYfcdbTHXq3a72H5XXXXXXXXXXXXX\"\n# remote_llm_model = \"auto\"\n\n# remote_type = \"deepseek\"\n# remote_api_key = \"sk-86db9a205aa9422XXXXXXXXXXXXXX\"\n# remote_llm_model = \"deepseek-chat\"\n\n# remote_type = \"vllm\"\n# remote_api_key = \"EMPTY\"\n# remote_llm_model = \"Qwen2.5-7B-Instruct\"\n\n# remote_type = \"siliconcloud\"\n# remote_api_key = \"sk-xxxxxxxxxxxxx\"\n# remote_llm_model = \"alibaba\u002FQwen1.5-110B-Chat\"\n\n# remote_type = \"ppio\"\n# remote_api_key = \"sk-xxxxxxxxxxxxx\"\n# remote_llm_model = \"thudm\u002Fglm-4-9b-chat\"\n```\n\n然后运行测试：\n\n```text\n\n# 回答与百草园相关的问题（基于知识库），但不回答天气问题。\npython3 -m huixiangdou.main\n\n+-----------------------+---------+--------------------------------+-----------------+\n|         Query         |  State  |         Reply                  |   References    |\n+=======================+=========+================================+=================+\n| 百草园里有什么？ | success | 百草园拥有丰富多样的自然景观和生物…… | installation.md |\n--------------------------------------------------------------------------------------\n| 今天天气怎么样？         | Init state| ..                           |                 |\n+-----------------------+---------+--------------------------------+-----------------+\n🔆 在这里输入你的问题，输入 `bye` 退出：\n..\n```\n\n💡 同时也可以使用 `gradio` 运行一个简单的 Web UI：\n\n```bash\npython3 -m huixiangdou.gradio_ui\n```\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F9e5dbb30-1dc1-42ad-a7d4-dc7380676554\" >\u003C\u002Fvideo>\n\n或者启动一个监听 23333 端口的服务器，默认管道为 `chat_with_repo`：\n```bash\npython3 -m huixiangdou.api_server\n\n# 测试异步 API \ncurl -X POST http:\u002F\u002F127.0.0.1:23333\u002Fhuixiangdou_stream  -H \"Content-Type: application\u002Fjson\" -d '{\"text\": \"如何安装 mmpose\",\"image\": \"\"}'\n# cURL 同步 API\ncurl -X POST http:\u002F\u002F127.0.0.1:23333\u002Fhuixiangdou_inference  -H \"Content-Type: application\u002Fjson\" -d '{\"text\": \"如何安装 mmpose\",\"image\": \"\"}'\n```\n\n\n请更新 `repodir` 文档、[good_questions](.\u002Fresource\u002Fgood_questions.json) 和 [bad_questions](.\u002Fresource\u002Fbad_questions.json)，并尝试应用到你自己的领域知识中（如医疗、金融、电力等）。\n\n## IV. 集成\n\n### 至飞书、微信群\n\n- [**单向** 发送至飞书群](.\u002Fdocs\u002Fzh\u002Fdoc_send_only_lark_group.md)\n- [**双向** 飞书群收发消息、召回](.\u002Fdocs\u002Fzh\u002Fdoc_add_lark_group.md)\n- [个人微信 Android 接入](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_accessibility.md) 和 [Android 工具](.\u002Fandroid)\n- [个人微信 wkteam 接入](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md)\n\n### 至 Web 前后端\n\n我们提供了 `typescript` 前端和 `python` 后端源代码：\n\n- 支持多租户管理\n- 无需编程即可接入飞书和微信\n- 对 k8s 友好\n\n与 [OpenXlab APP](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web) 类似，请阅读 [Web 部署文档](.\u002Fweb\u002FREADME.md)。\n\n### 至 readthedocs.io\n\n[尝试页面右下角按钮](https:\u002F\u002Fhuixiangdou.readthedocs.io\u002Fzh-cn\u002Flatest\u002F) 和 [文档](.\u002Fdocs\u002Fzh\u002Fdoc_add_readthedocs.md)。\n\n# 🍴 其他配置\n\n## **仅 CPU 版本**\n\n如果没有 GPU，可以使用 [siliconcloud](https:\u002F\u002Fsiliconflow.cn\u002F) 的 API 完成模型推理。\n\n以 docker miniconda+Python3.11 为例，安装 CPU 依赖并运行：\n\n```bash\n# 启动容器\ndocker run -v \u002Fpath\u002Fto\u002Fhuixiangdou:\u002Fhuixiangdou -p 7860:7860 -p 23333:23333 -it continuumio\u002Fminiconda3 \u002Fbin\u002Fbash\n# 安装依赖\napt update\napt install python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig libpulse-dev\npython3 -m pip install -r requirements-cpu.txt\n# 构建知识库\npython3 -m huixiangdou.services.store --config_path config-cpu.ini\n# 问答测试\npython3 -m huixiangdou.main --config_path config-cpu.ini\n# gradio UI\npython3 -m huixiangdou.gradio_ui --config_path config-cpu.ini\n```\n\n如果觉得安装太慢，可以在 [Docker Hub](https:\u002F\u002Fhub.docker.com\u002Frepository\u002Fdocker\u002Ftpoisonooo\u002Fhuixiangdou\u002Ftags) 上找到预装镜像，启动时直接替换即可。\n\n## **10G 多模态版本**\n\n如果你有 10G 显存的 GPU，可以进一步支持图像和文本检索。只需修改 config.ini 中使用的模型。\n\n```toml\n# config-multimodal.ini\n# !!! 下载 `https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fbge-visualized\u002Fblob\u002Fmain\u002FVisualized_m3.pth`    到 `bge-m3` 文件夹 !!!\nembedding_model_path = \"BAAI\u002Fbge-m3\"\nreranker_model_path = \"BAAI\u002Fbge-reranker-v2-minicpm-layerwise\"\n```\n\n注意：\n\n- 需要手动下载 [Visualized_m3.pth](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fbge-visualized\u002Fblob\u002Fmain\u002FVisualized_m3.pth) 到 [bge-m3](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fbge-m3) 目录\n- 安装主分支上的 FlagEmbedding，我们已经修复了 [bugfix](https:\u002F\u002Fgithub.com\u002FFlagOpen\u002FFlagEmbedding\u002Fcommit\u002F3f84da0796d5badc3ad519870612f1f18ff0d1d3)。[这里](https:\u002F\u002Fgithub.com\u002FFlagOpen\u002FFlagEmbedding\u002Fblob\u002Fmaster\u002FFlagEmbedding\u002Fvisual\u002Feva_clip\u002Fbpe_simple_vocab_16e6.txt.gz)可以下载 `bpe_simple_vocab_16e6.txt.gz` \n- 安装 [requirements\u002Fmultimodal.txt](.\u002Frequirements\u002Fmultimodal.txt)\n\n运行 gradio 测试，查看图像和文本检索结果 [这里](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F326)。\n\n```bash\npython3 tests\u002Ftest_query_gradio.py\n```\n\n## **进一步说明**\n\n请阅读以下主题：\n\n- [混合知识图谱与密集检索](.\u002Fdocs\u002Fen\u002Fdoc_knowledge_graph.md)\n- [参考 config-advanced.ini 配置以提升效果](.\u002Fdocs\u002Fen\u002Fdoc_full_dev.md)\n- [群聊场景中的指代消解训练](.\u002Fsft)\n- [使用 wkteam 微信接入，集成图片、公众号解析和指代消解](.\u002Fdocs\u002Fzh\u002Fdoc_add_wechat_commercial.md)\n- [使用 rag.py 标注 SFT 训练数据](.\u002Fdocs\u002Fzh\u002Fdoc_rag_annotate_sft_data.md)\n\n# 🛠️ 常见问题解答\n\n1. 如果机器人过于冷淡\u002F过于健谈怎么办？\n\n   - 将实际场景中需要回答的问题填入 `resource\u002Fgood_questions.json`，将应被拒绝的问题填入 `resource\u002Fbad_questions.json`。\n   - 调整 `repodir` 中的主题内容，确保主库中的 markdown 文档不包含无关内容。\n\n   重新运行 `feature_store` 更新阈值和特征库。\n\n   ⚠️ 你也可以直接修改 config.ini 中的 `reject_throttle`。一般来说，0.5 是较高的值；0.2 则过低。\n\n2. 启动正常，但在运行时出现内存不足？\n\n   基于 transformer 结构的 LLM 长文本处理需要更多内存。此时需要对模型进行 kv 缓存量化，例如 [lmdeploy 量化说明](https:\u002F\u002Fgithub.com\u002FInternLM\u002Flmdeploy\u002Fblob\u002Fmain\u002Fdocs\u002Fen\u002Fquantization)。然后使用 docker 独立部署 Hybrid LLM Service。\n\n7. `No module named 'faiss.swigfaiss_avx2'` \n\n   找到已安装的 `faiss` 包\n   \n   ```python\n   import faiss\n   print(faiss.__file__)\n   # \u002Froot\u002F.conda\u002Fenvs\u002FInternLM2_Huixiangdou\u002Flib\u002Fpython3.10\u002Fsite-packages\u002Ffaiss\u002F__init__.py\n   ```\n\n   添加软链接\n\n   ```Bash\n   # cd your_python_path\u002Fsite-packages\u002Ffaiss\n   cd \u002Froot\u002F.conda\u002Fenvs\u002FInternLM2_Huixiangdou\u002Flib\u002Fpython3.10\u002Fsite-packages\u002Ffaiss\u002F\n   ln -s swigfaiss.py swigfaiss_avx2.py\n   ```\n\n# 🍀 致谢\n\n- [KIMI](https:\u002F\u002Fkimi.moonshot.cn\u002F)：长文本大模型，支持直接上传文件\n- [FlagEmbedding](https:\u002F\u002Fgithub.com\u002FFlagOpen\u002FFlagEmbedding)：BAAI RAG 团队\n- [BCEmbedding](https:\u002F\u002Fgithub.com\u002Fnetease-youdao\u002FBCEmbedding)：中英双语特征模型\n- [Langchain-ChatChat](https:\u002F\u002Fgithub.com\u002Fchatchat-space\u002FLangchain-Chatchat)：Langchain 与 ChatGLM 的应用\n- [GrabRedEnvelope](https:\u002F\u002Fgithub.com\u002Fxbdcc\u002FGrabRedEnvelope)：微信红包领取工具\n\n# 📝 引用\n\n```shell\n@misc{kong2024huixiangdou,\n      title={HuiXiangDou：基于 LLM 的技术辅助克服群聊场景},\n      author={孔焕钧、张松阳、李佳颖、肖敏、徐俊、陈凯},\n      year={2024},\n      eprint={2401.08772},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n\n@misc{kong2024labelingsupervisedfinetuningdata,\n      title={利用规模定律标注监督微调数据}, \n      author={孔焕钧},\n      year={2024},\n      eprint={2405.02817},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817}, \n}\n\n@misc{kong2025huixiangdou2robustlyoptimizedgraphrag,\n      title={HuixiangDou2：一种鲁棒优化的 GraphRAG 方法}, \n      author={孔焕钧、王哲凡、王晨阳、马哲、董南青},\n      year={2025},\n      eprint={2503.06474},\n      archivePrefix={arXiv},\n      primaryClass={cs.IR},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.06474}, \n}\n```","# HuixiangDou 快速上手指南\n\nHuixiangDou 是一款基于大语言模型（LLM）的专业知识助手，专为群聊场景和实时流式对话设计。它无需训练，支持纯 CPU 或低显存 GPU 运行，提供完整的 Web、Android 及后端源码。\n\n## 1. 环境准备\n\n### 系统要求\n- **操作系统**：推荐 Linux (x86_64)\n- **硬件配置**：\n  - **纯 CPU 版**：无 GPU 要求，需调用云端 API（如 SiliconCloud）。\n  - **标准版（文本检索）**：仅需 2GB 显存（如 GTX 1660 Ti），或使用云端 API。\n  - **多模态版（图文检索）**：需 10GB+ 显存（如 RTX 3090）。\n- **Python 版本**：推荐 Python 3.8+\n\n### 前置依赖安装\n在安装 Python 依赖前，需先安装系统级工具以支持文档解析（Word, PDF, OCR 等）：\n\n```bash\n# 更新源并安装系统依赖\napt update\napt install python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig libpulse-dev\n\n# 安装 Python 依赖\npip install -r requirements.txt\n\n# 注意：若使用 Python 3.8，请安装 faiss-gpu 替代 faiss\n# pip install faiss-gpu\n```\n\n## 2. 安装与知识库构建\n\n### 步骤一：获取模型与代码\n首先同意 BCE Embedding 模型协议并登录 HuggingFace（国内用户若访问受限，可配置镜像或使用代理）：\n\n```bash\nhuggingface-cli login\n```\n\n克隆项目代码并进入目录：\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou.git\ncd HuixiangDou\n```\n\n### 步骤二：创建知识库\n将您的文档（支持 pdf, word, markdown, txt 等格式）放入 `repodir` 目录。以下示例使用项目自带的测试数据：\n\n```bash\n# 创建文档目录并复制示例数据\nmkdir repodir\ncp -rf resource\u002Fdata* repodir\u002F\n\n# 创建工作目录并构建知识库\n# 此步骤会提取特征并自动更新 config.ini 中的阈值\nmkdir workdir\npython3 -m huixiangdou.services.store\n```\n\n> **提示**：您也可以直接使用问答对（CSV 或 JSON 格式）构建知识库：\n> `python3 -m huixiangdou.services.store --qa-pair resource\u002Fdata\u002Fqa_pair.csv`\n\n## 3. 基本使用\n\n### 步骤一：配置模型\n编辑 `config.ini` 文件，配置 LLM 服务。您可以选择本地部署（推荐 vLLM）或云端 API（如 Kimi, DeepSeek, SiliconCloud 等）。\n\n**示例：使用云端 Kimi API**\n```ini\n[llm.server]\nremote_type = \"kimi\"\nremote_api_key = \"sk-your-actual-api-key-here\"\nremote_llm_model = \"auto\"\n```\n\n**示例：使用本地 vLLM 部署**\n先在终端启动本地服务：\n```bash\nvllm serve \u002Fpath\u002Fto\u002FQwen-2.5-7B-Instruct --served-model-name Qwen-2.5-7B-Instruct --enable-prefix-caching\n```\n然后在 `config.ini` 中配置：\n```ini\n[llm.server]\nremote_type = \"vllm\"\nremote_api_key = \"EMPTY\"\nremote_llm_model = \"Qwen-2.5-7B-Instruct\"\n```\n\n### 步骤二：运行测试\n启动主程序进行测试。系统将自动判断问题是否与知识库相关：若相关则回答，若不相关（如询问天气）则拒绝回答，避免群聊消息泛滥。\n\n```bash\npython3 -m huixiangdou.main\n```\n\n运行成功后，您将看到类似以下的交互输出，表明助手已准备好处理基于知识库的问答。\n\n---\n**更多集成**：\n- **Web 界面**：参考 `web` 目录源码或体验 [OpenXLab 在线版](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002Ftpoisonooo\u002Fhuixiangdou-web)。\n- **微信\u002F飞书集成**：参考 `docs\u002Fzh\u002F` 目录下的详细接入文档。\n- **API 服务**：运行 `python3 -m huixiangdou.api_server` 开启 HTTP 服务供其他应用调用。","某大型植物科研团队在微信群中协作攻关，每日需处理大量关于基因编辑、病虫害防治的专业咨询与文献检索需求。\n\n### 没有 HuixiangDou 时\n- **信息淹没严重**：群内消息刷屏频繁，专家提出的关键问题常被闲聊或无关通知覆盖，导致重要技术讨论中断或遗漏。\n- **重复劳动低效**：面对成员反复询问的基础概念或已解决的实验步骤，资深研究员不得不多次手动复制粘贴相同答案，耗费大量精力。\n- **知识检索困难**：团队积累的海量 PDF 文献和实验报告散落在个人手中，群聊无法实时关联内部知识库，回答缺乏数据支撑。\n- **响应延迟高**：非工作时间或专家忙碌时，初级研究员的紧急提问往往数小时甚至数天得不到回应，拖慢项目进度。\n\n### 使用 HuixiangDou 后\n- **智能过滤降噪**：HuixiangDou 的三阶段流水线自动识别并拦截无关闲聊，仅在检测到高质量技术问题时唤醒机器人回复，确保群聊秩序井然。\n- **自动化精准应答**：基于内置知识库，机器人即时回答重复性基础问题，让资深专家从琐碎答疑中解放，专注于核心攻关。\n- **深度知识融合**：通过 GraphRAG 技术，HuixiangDou 能实时检索团队私有文献库，生成的回答不仅准确且附带来源依据，显著提升决策质量。\n- **7x24 小时在线**：无论何时何地，成员提问均能获得秒级响应，即使是复杂的跨文档推理任务也能快速得到初步解决方案，加速研发迭代。\n\nHuixiangDou 将杂乱的群聊转化为高效的知识协作中枢，让专业智慧在零训练成本下实现全天候流动。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FInternLM_HuixiangDou_a72f01e4.png","InternLM","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FInternLM_bc4eb14c.png","",null,"internlm@pjlab.org.cn","intern_lm","https:\u002F\u002Fchat.intern-ai.org.cn\u002F","https:\u002F\u002Fgithub.com\u002FInternLM",[81,85,89,93,97,101,105],{"name":82,"color":83,"percentage":84},"Python","#3572A5",81,{"name":86,"color":87,"percentage":88},"TypeScript","#3178c6",13.4,{"name":90,"color":91,"percentage":92},"Kotlin","#A97BFF",2.6,{"name":94,"color":95,"percentage":96},"Less","#1d365d",2.4,{"name":98,"color":99,"percentage":100},"JavaScript","#f1e05a",0.4,{"name":102,"color":103,"percentage":104},"Shell","#89e051",0.2,{"name":106,"color":107,"percentage":108},"HTML","#e34c26",0.1,2483,184,"2026-04-16T06:18:06","BSD-3-Clause",4,"Linux","可选。纯 CPU 模式仅需调用云端 API；本地运行标准版需 2GB 显存（验证于 GTX 1660 Ti）；多模态版需 10GB 显存（验证于 RTX 3090）。未明确指定 CUDA 版本。","未说明",{"notes":118,"python":119,"dependencies":120},"项目支持三种配置模式：1. CPU 模式：仅使用云端 API（如 SiliconCloud），无需本地 GPU；2. 标准版：本地运行 LLM 及文本检索，需 2GB 显存；3. 多模态版：支持图文检索，需 10GB 显存。安装时需通过 apt 安装大量系统级依赖以支持 Word、PDF、音频等多格式解析。推荐使用 vLLM 部署本地大模型。","3.8+",[121,122,123,124,125,126,127,128,129,130],"faiss-gpu (Python 3.8)","python-dev","libxml2-dev","libxslt1-dev","antiword","poppler-utils","tesseract-ocr","ffmpeg","sox","libjpeg-dev",[14,35,132,16,15],"其他",[134,135,136,137,138,139,140,141,142,143,144,145,146,147],"chatbot","llm","rag","dsl","lark","pipeline","robot","wechat","application","multimodal","image-retrieval","assistant","assistant-chat-bots","group-chat","2026-03-27T02:49:30.150509","2026-04-18T14:14:13.529577",[151,156,161,166,171,176],{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},39907,"运行时报错 ValueError: Cannot decide self.index type 怎么办？","该错误通常是因为环境变量中设置了 `FAISS_NO_AVX2`，导致加载了不支持 AVX2 的 faiss 版本，从而引发类型匹配失败。InternStudio 的 CPU 实际上支持 AVX2，请检查并移除该环境变量。如果问题依旧，请更新代码到最新版本，维护者已修复相关逻辑。","https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fissues\u002F346",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},39908,"Gradio 界面回答生成非常慢且不是流式输出，如何解决？","1. **非流式问题**：源码中 `chat_with_repo` 模式已使用 `yield` 实现流式输出。如果未看到流式效果，可能是网络延迟或宿主机 CPU 调度问题（特别是在 InternStudio 这种 1 虚 6 的虚拟机上）。建议单独启动 LLM 服务 (`python3 -m huixiangdou.service.llm_server_hybrid`) 并在浏览器访问 `http:\u002F\u002F127.0.0.1:8888\u002Fstream` 测试接口是否正常流式响应。\n2. **速度慢\u002F胡言乱语**：建议更换更强的 LLM 模型，例如使用 SiliconCloud 提供的 qwen1.5-110B，或者在物理机上运行以摆脱虚拟机资源限制。","https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fissues\u002F368",{"id":162,"question_zh":163,"answer_zh":164,"source_url":165},39909,"如何在非 Hybrid-LLM 环境下使用 DeepSeek 等远程模型运行 Web Demo？","如果在按照教程配置 `config.ini` 并使用远程模型（如 DeepSeek）运行 `python3 -m tests.test_query_gradio` 时报错，请确保使用的是项目的 `main` 分支。早期教程可能引导用户切换到了其他不稳定的分支，导致兼容性问题。切换到 main 分支后通常可正常运行。","https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fissues\u002F277",{"id":167,"question_zh":168,"answer_zh":169,"source_url":170},39910,"部署 Web 版知识库时报错 missing 'ner_file' 参数如何处理？","这是一个已知的问题，`ner_file` 参数在当前的初始化逻辑中并非必须。维护者确认这是代码冗余导致的错误，可以直接删除该参数或忽略该报错。内部版本已对此进行了简化，预计年底开源的新版本将彻底解决此问题。","https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fissues\u002F400",{"id":172,"question_zh":173,"answer_zh":174,"source_url":175},39911,"运行 server.py 时报错 NameError: name 'main_args' is not defined 怎么修？","这是代码中的变量名引用错误。在 `huixiangdou\u002Fserver.py` 文件中，代码错误地使用了未定义的 `main_args` 变量，而实际解析的参数变量名为 `args`。该问题已在 Pull Request #365 中修复，请将代码更新到最新版本即可解决。","https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fissues\u002F364",{"id":177,"question_zh":178,"answer_zh":179,"source_url":180},39912,"构建多模态 RAG 有什么推荐的流程和模型？","对于多模态 RAG，不建议直接使用 CLIP 获取笼统特征，也不建议直接存储大模型的视觉 token_id。推荐思路如下：\n1. **特征提取**：尝试使用将文本和图像映射到同一潜在空间（latent space）的模型（如 Vary），提取映射后的 embedding。\n2. **检索策略**：可以采用 multi-vector 查询，即不必强求单一的大一统模型，可以对不同模态分别处理最后加权，或者参考 ImageBind 等多模态模型。\n3. **参考项目**：可以研究 https:\u002F\u002Fgithub.com\u002FUcas-HaoranWei\u002FVary 等项目的设计思路。","https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fissues\u002F297",[182,187,192,197],{"id":183,"version":184,"summary_zh":185,"released_at":186},323413,"20251117","## 变更内容\n* 支持 kimi、k2 和 step 模型\n* 重构知识库构建模块\n* 版本升级至 v0.1.0，为下一次重大发布做准备\n\n## 新贡献者\n* @yaqi0510 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F339 中完成了首次贡献\n* @leagend 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F365 中完成了首次贡献\n* @Jonnysunn 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F398 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fcompare\u002F20240722...20251117","2025-11-17T08:58:12",{"id":188,"version":189,"summary_zh":190,"released_at":191},323414,"20240722","## 变更内容\n\n## 精度提升\n\n* [如何选择 chunksize 和 splitter](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Ftree\u002Fmain\u002Fevaluation)\n* [混合知识图谱与密集检索以提升精度](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fblob\u002Fmain\u002Fdocs\u002Fknowledge_graph_en.md)\n* [基于规模定律改进 SFT 标注](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.02817)\n* 支持 LLM 重排序器\n\n## LLM API\n\n* 支持硅云和 InternLM 远程 API\n* 为 Kimi 添加魔法提示\n\n## 功能特性\n\n* 微信支持 wkteam\n* 通过聊天群学习\n* 支持 Pyppeteer\n* InternLM 夏令营3，由 @boshallen 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F321 中完成\n\n## 新贡献者\n\n* @eltociear 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F274 中完成了首次贡献\n* @boshallen 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F321 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fcompare\u002F20240415...20240722","2024-07-22T07:38:30",{"id":193,"version":194,"summary_zh":195,"released_at":196},323415,"20240415","## 变更内容\n### 前端\n  * 由 @JiaYingLii、@Echo-minn、@lanbitou-tech 和 @fly2tomato 添加了 Web 服务器和前端界面\n  * @lmhh 实现了 Android APP 对微信群的支持\n  * 支持飞书 @tpoisonooo\n  \n### 功能\n  * 支持使用 `rag.py` 进行 SFT 数据标注 @tpoisonooo\n  * 支持 `deepseek`、`xi-api`、`alles-apin`、`puyu` 以及 `kimi 自动模型选择` @tpoisonooo\n  * @tpoisonooo 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F63 中更新了 `architecture_zh.md`\n  * @tpoisonooo 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F100 中增加了对 2G 内存的支持\n  * 支持 `pdf`、`word`、`excel`、`pptx` 和 `html` 文件格式 @tpoisonooo\n  * @sanbuphy 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F69 中添加了 GitHub 问题爬取功能\n  * 支持 `zhipuai` 并添加了 Gradio 测试查询 @sanbuphy 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F116 中完成\n  * @tpoisonooo 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F99 中拆分了 feature_store 和 retriever\n\n### 文档\n  * @JimmyMa99 和 @tpoisonooo 添加了微信和架构相关文档\n  * @Modas-Li 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F44 中添加了常见问题解答\n  * @tpoisonooo 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F61 中添加了架构说明\n  * @chg0901 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F215 中修复了 `No module named 'faiss.swigfaiss_avx2'` 错误\n  * @tpoisonooo 新增并清理了 README\n\n### 修复\n  * @LzMingYueShanPao 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F224 中修复了安装问题\n  * @weedge 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F151 中指出，反序列化加载 pickle 文件时需要设置 `allow_dangerous_deserialization=True`\n  * @chg0901 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F217 中修复了安装问题\n  * @weedge 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F158 中将 `sg_search` 提示词的 `KEYWORDS_TEMPLATE` 中的关键字分隔符由空格改为逗号\n  * @LzMingYueShanPao 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F222 中将 `list` 改为 `List`\n\n## 新贡献者\n* @JimmyMa99 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F18 中完成了首次贡献\n* @Modas-Li 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F44 中完成了首次贡献\n* @fly2tomato 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F46 中完成了首次贡献\n* @JiaYingLii 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F54 中完成了首次贡献\n* @sanbuphy 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F69 中完成了首次贡献\n* @lmhh 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F47 中完成了首次贡献\n* @weedge 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F151 中完成了首次贡献\n* @chg0901 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F215 中完成了首次贡献\n* @LzMingYueShanPao 在 https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fpull\u002F222 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fcompare\u002Fv0.1.0rc1...20240415","2024-04-15T11:16:44",{"id":198,"version":199,"summary_zh":200,"released_at":201},323416,"v0.1.0rc1","HuixiangDou 是一款基于大语言模型（LLM）的**群聊**助手。\n\n优势：\n\n1. 针对群聊场景设计了拒绝与回复的两阶段流程，能够在不引发消息刷屏的情况下解答用户问题，详情请参阅 [arxiv2401.08772](https:\u002F\u002Farxiv.org\u002Fabs\u002F2401.08772)。\n2. 成本低廉，仅需 1.5GB 内存，且无需训练。\n3. 提供完整的 Web、Android 应用以及流水线源代码，具备工业级标准，可直接用于商业落地。\n\n欢迎查看 [HuixiangDou 的应用场景](.\u002Fhuixiangdou-inside.md)，并加入 [微信群](https:\u002F\u002Fgithub.com\u002FInternLM\u002FHuixiangDou\u002Fblob\u002Fmain\u002Fresource\u002Ffigures\u002Fwechat.jpg)，亲身体验这款 AI 助手的强大功能。\n\n如果觉得有用，请为项目点亮一颗星 ⭐","2024-01-14T13:07:02"]