[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-AsyncFuncAI--deepwiki-open":3,"tool-AsyncFuncAI--deepwiki-open":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 真正成长为懂上",155373,2,"2026-04-14T11:34:08",[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":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":77,"owner_website":79,"owner_url":80,"languages":81,"stars":106,"forks":107,"last_commit_at":108,"license":109,"difficulty_score":10,"env_os":110,"env_gpu":111,"env_ram":112,"env_deps":113,"category_tags":122,"github_topics":123,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":133,"updated_at":134,"faqs":135,"releases":166},7532,"AsyncFuncAI\u002Fdeepwiki-open","deepwiki-open","Open Source DeepWiki: AI-Powered Wiki Generator for GitHub\u002FGitlab\u002FBitbucket Repositories. Join the discord: https:\u002F\u002Fdiscord.gg\u002FgMwThUMeme","DeepWiki-Open 是一款专为 GitHub、GitLab 和 Bitbucket 代码仓库打造的开源 AI 文档生成器。它能自动分析任意仓库的代码结构，在几秒钟内生成美观、交互性强的技术维基，彻底解决开源项目或私有代码库中常见的文档缺失、更新滞后以及新人上手难的问题。\n\n这款工具非常适合开发者、技术团队负责人以及开源贡献者使用。无论是想要快速梳理遗留代码逻辑，还是希望为新项目自动生成标准化文档，DeepWiki-Open 都能提供极大便利。其核心亮点在于强大的智能分析能力：不仅能生成详尽的文字说明，还能自动绘制 Mermaid 架构图和数据流图，让复杂的代码关系一目了然。此外，它集成了基于 RAG（检索增强生成）技术的对话功能，允许用户直接“与代码库聊天”，通过多轮深度研究获取精准答案。\n\n在技术灵活性方面，DeepWiki-Open 支持多种主流大模型提供商（如 Google Gemini、OpenAI、Azure OpenAI）及本地部署的 Ollama 模型，并允许用户自由选择嵌入模型以优化性能与成本。它还特别支持通过个人访问令牌安全地读取私有仓库，确保企业级数据的安全","DeepWiki-Open 是一款专为 GitHub、GitLab 和 Bitbucket 代码仓库打造的开源 AI 文档生成器。它能自动分析任意仓库的代码结构，在几秒钟内生成美观、交互性强的技术维基，彻底解决开源项目或私有代码库中常见的文档缺失、更新滞后以及新人上手难的问题。\n\n这款工具非常适合开发者、技术团队负责人以及开源贡献者使用。无论是想要快速梳理遗留代码逻辑，还是希望为新项目自动生成标准化文档，DeepWiki-Open 都能提供极大便利。其核心亮点在于强大的智能分析能力：不仅能生成详尽的文字说明，还能自动绘制 Mermaid 架构图和数据流图，让复杂的代码关系一目了然。此外，它集成了基于 RAG（检索增强生成）技术的对话功能，允许用户直接“与代码库聊天”，通过多轮深度研究获取精准答案。\n\n在技术灵活性方面，DeepWiki-Open 支持多种主流大模型提供商（如 Google Gemini、OpenAI、Azure OpenAI）及本地部署的 Ollama 模型，并允许用户自由选择嵌入模型以优化性能与成本。它还特别支持通过个人访问令牌安全地读取私有仓库，确保企业级数据的安全。只需简单配置 API 密钥或通过 Docker 一键启动，即可将枯燥的代码仓库转化为易于导航的知识库。","\n### ⚠️ Announcement: Shifting focus to AsyncReview\n---\n\n**IMPORTANT UPDATE** DeepWiki-Open maintenance is ongoing, but primary active development is moving to **[AsyncReview](https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002FAsyncReview\u002F)**. Thank you for the support on this project; please join me in the new repository for this year's primary effort.\n\n---\n---\n\n# DeepWiki-Open\n\n![DeepWiki Banner](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_0b8900126c20.png)\n\n**DeepWiki** is my own implementation attempt of DeepWiki, automatically creates beautiful, interactive wikis for any GitHub, GitLab, or BitBucket repository! Just enter a repo name, and DeepWiki will:\n\n1. Analyze the code structure\n2. Generate comprehensive documentation\n3. Create visual diagrams to explain how everything works\n4. Organize it all into an easy-to-navigate wiki\n\n[![\"Buy Me A Coffee\"](https:\u002F\u002Fwww.buymeacoffee.com\u002Fassets\u002Fimg\u002Fcustom_images\u002Forange_img.png)](https:\u002F\u002Fbuymeacoffee.com\u002Fsheing)\n[![Tip in Crypto](https:\u002F\u002Ftip.md\u002Fbadge.svg)](https:\u002F\u002Ftip.md\u002Fsng-asyncfunc)\n[![Twitter\u002FX](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTwitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https:\u002F\u002Fx.com\u002Fsashimikun_void)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.com\u002Finvite\u002FVQMBGR8u5v)\n\n[English](.\u002FREADME.md) | [简体中文](.\u002FREADME.zh.md) | [繁體中文](.\u002FREADME.zh-tw.md) | [日本語](.\u002FREADME.ja.md) | [Español](.\u002FREADME.es.md) | [한국어](.\u002FREADME.kr.md) | [Tiếng Việt](.\u002FREADME.vi.md) | [Português Brasileiro](.\u002FREADME.pt-br.md) | [Français](.\u002FREADME.fr.md) | [Русский](.\u002FREADME.ru.md)\n\n## ✨ Features\n\n- **Instant Documentation**: Turn any GitHub, GitLab or BitBucket repo into a wiki in seconds\n- **Private Repository Support**: Securely access private repositories with personal access tokens\n- **Smart Analysis**: AI-powered understanding of code structure and relationships\n- **Beautiful Diagrams**: Automatic Mermaid diagrams to visualize architecture and data flow\n- **Easy Navigation**: Simple, intuitive interface to explore the wiki\n- **Ask Feature**: Chat with your repository using RAG-powered AI to get accurate answers\n- **DeepResearch**: Multi-turn research process that thoroughly investigates complex topics\n- **Multiple Model Providers**: Support for Google Gemini, OpenAI, OpenRouter, and local Ollama models\n- **Flexible Embeddings**: Choose between OpenAI, Google AI, or local Ollama embeddings for optimal performance\n\n## 🚀 Quick Start (Super Easy!)\n\n### Option 1: Using Docker\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open.git\ncd deepwiki-open\n\n# Create a .env file with your API keys\necho \"GOOGLE_API_KEY=your_google_api_key\" > .env\necho \"OPENAI_API_KEY=your_openai_api_key\" >> .env\n# Optional: Use Google AI embeddings instead of OpenAI (recommended if using Google models)\necho \"DEEPWIKI_EMBEDDER_TYPE=google\" >> .env\n# Optional: Add OpenRouter API key if you want to use OpenRouter models\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" >> .env\n# Optional: Add Ollama host if not local. defaults to http:\u002F\u002Flocalhost:11434\necho \"OLLAMA_HOST=your_ollama_host\" >> .env\n# Optional: Add Azure API key, endpoint and version if you want to use azure openai models\necho \"AZURE_OPENAI_API_KEY=your_azure_openai_api_key\" >> .env\necho \"AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint\" >> .env\necho \"AZURE_OPENAI_VERSION=your_azure_openai_version\" >> .env\n# Run with Docker Compose\ndocker-compose up\n```\n\nFor detailed instructions on using DeepWiki with Ollama and Docker, see [Ollama Instructions](Ollama-instruction.md).\n\n> 💡 **Where to get these keys:**\n> - Get a Google API key from [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey)\n> - Get an OpenAI API key from [OpenAI Platform](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys)\n> - Get Azure OpenAI credentials from [Azure Portal](https:\u002F\u002Fportal.azure.com\u002F) - create an Azure OpenAI resource and get the API key, endpoint, and API version\n\n### Option 2: Manual Setup (Recommended)\n\n#### Step 1: Set Up Your API Keys\n\nCreate a `.env` file in the project root with these keys:\n\n```\nGOOGLE_API_KEY=your_google_api_key\nOPENAI_API_KEY=your_openai_api_key\n# Optional: Use Google AI embeddings (recommended if using Google models)\nDEEPWIKI_EMBEDDER_TYPE=google\n# Optional: Add this if you want to use OpenRouter models\nOPENROUTER_API_KEY=your_openrouter_api_key\n# Optional: Add this if you want to use Azure OpenAI models\nAZURE_OPENAI_API_KEY=your_azure_openai_api_key\nAZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint\nAZURE_OPENAI_VERSION=your_azure_openai_version\n# Optional: Add Ollama host if not local. default: http:\u002F\u002Flocalhost:11434\nOLLAMA_HOST=your_ollama_host\n```\n\n#### Step 2: Start the Backend\n\n```bash\n# Install Python dependencies\npython -m pip install poetry==2.0.1 && poetry install -C api\n\n# Start the API server\npython -m api.main\n```\n\n#### Step 3: Start the Frontend\n\n```bash\n# Install JavaScript dependencies\nnpm install\n# or\nyarn install\n\n# Start the web app\nnpm run dev\n# or\nyarn dev\n```\n\n#### Step 4: Use DeepWiki!\n\n1. Open [http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000) in your browser\n2. Enter a GitHub, GitLab, or Bitbucket repository (like `https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex`, `https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fautogen`, `https:\u002F\u002Fgitlab.com\u002Fgitlab-org\u002Fgitlab`, or `https:\u002F\u002Fbitbucket.org\u002Fredradish\u002Fatlassian_app_versions`)\n3. For private repositories, click \"+ Add access tokens\" and enter your GitHub or GitLab personal access token\n4. Click \"Generate Wiki\" and watch the magic happen!\n\n## 🔍 How It Works\n\nDeepWiki uses AI to:\n\n1. Clone and analyze the GitHub, GitLab, or Bitbucket repository (including private repos with token authentication)\n2. Create embeddings of the code for smart retrieval\n3. Generate documentation with context-aware AI (using Google Gemini, OpenAI, OpenRouter, Azure OpenAI, or local Ollama models)\n4. Create visual diagrams to explain code relationships\n5. Organize everything into a structured wiki\n6. Enable intelligent Q&A with the repository through the Ask feature\n7. Provide in-depth research capabilities with DeepResearch\n\n```mermaid\ngraph TD\n    A[User inputs GitHub\u002FGitLab\u002FBitbucket repo] --> AA{Private repo?}\n    AA -->|Yes| AB[Add access token]\n    AA -->|No| B[Clone Repository]\n    AB --> B\n    B --> C[Analyze Code Structure]\n    C --> D[Create Code Embeddings]\n\n    D --> M{Select Model Provider}\n    M -->|Google Gemini| E1[Generate with Gemini]\n    M -->|OpenAI| E2[Generate with OpenAI]\n    M -->|OpenRouter| E3[Generate with OpenRouter]\n    M -->|Local Ollama| E4[Generate with Ollama]\n    M -->|Azure| E5[Generate with Azure]\n\n    E1 --> E[Generate Documentation]\n    E2 --> E\n    E3 --> E\n    E4 --> E\n    E5 --> E\n\n    D --> F[Create Visual Diagrams]\n    E --> G[Organize as Wiki]\n    F --> G\n    G --> H[Interactive DeepWiki]\n\n    classDef process stroke-width:2px;\n    classDef data stroke-width:2px;\n    classDef result stroke-width:2px;\n    classDef decision stroke-width:2px;\n\n    class A,D data;\n    class AA,M decision;\n    class B,C,E,F,G,AB,E1,E2,E3,E4,E5 process;\n    class H result;\n```\n\n## 🛠️ Project Structure\n\n```\ndeepwiki\u002F\n├── api\u002F                  # Backend API server\n│   ├── main.py           # API entry point\n│   ├── api.py            # FastAPI implementation\n│   ├── rag.py            # Retrieval Augmented Generation\n│   ├── data_pipeline.py  # Data processing utilities\n│   ├── pyproject.toml     # Python dependencies (Poetry)\n│   └── poetry.lock        # Locked Python dependency versions\n│\n├── src\u002F                  # Frontend Next.js app\n│   ├── app\u002F              # Next.js app directory\n│   │   └── page.tsx      # Main application page\n│   └── components\u002F       # React components\n│       └── Mermaid.tsx   # Mermaid diagram renderer\n│\n├── public\u002F               # Static assets\n├── package.json          # JavaScript dependencies\n└── .env                  # Environment variables (create this)\n```\n\n## 🤖 Provider-Based Model Selection System\n\nDeepWiki now implements a flexible provider-based model selection system supporting multiple LLM providers:\n\n### Supported Providers and Models\n\n- **Google**: Default `gemini-2.5-flash`, also supports `gemini-2.5-flash-lite`, `gemini-2.5-pro`, etc.\n- **OpenAI**: Default `gpt-5-nano`, also supports `gpt-5`, `4o`, etc.\n- **OpenRouter**: Access to multiple models via a unified API, including Claude, Llama, Mistral, etc.\n- **Azure OpenAI**: Default `gpt-4o`, also supports `o4-mini`, etc.\n- **Ollama**: Support for locally running open-source models like `llama3`\n\n### Environment Variables\n\nEach provider requires its corresponding API key environment variables:\n\n```\n# API Keys\nGOOGLE_API_KEY=your_google_api_key        # Required for Google Gemini models\nOPENAI_API_KEY=your_openai_api_key        # Required for OpenAI models\nOPENROUTER_API_KEY=your_openrouter_api_key # Required for OpenRouter models\nAZURE_OPENAI_API_KEY=your_azure_openai_api_key  #Required for Azure OpenAI models\nAZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint  #Required for Azure OpenAI models\nAZURE_OPENAI_VERSION=your_azure_openai_version  #Required for Azure OpenAI models\n\n# OpenAI API Base URL Configuration\nOPENAI_BASE_URL=https:\u002F\u002Fcustom-api-endpoint.com\u002Fv1  # Optional, for custom OpenAI API endpoints\n\n# Ollama host\nOLLAMA_HOST=your_ollama_host # Optional, if Ollama is not local. default: http:\u002F\u002Flocalhost:11434\n\n# Configuration Directory\nDEEPWIKI_CONFIG_DIR=\u002Fpath\u002Fto\u002Fcustom\u002Fconfig\u002Fdir  # Optional, for custom config file location\n```\n\n### Configuration Files\n\nDeepWiki uses JSON configuration files to manage various aspects of the system:\n\n1. **`generator.json`**: Configuration for text generation models\n   - Defines available model providers (Google, OpenAI, OpenRouter, Azure, Ollama)\n   - Specifies default and available models for each provider\n   - Contains model-specific parameters like temperature and top_p\n\n2. **`embedder.json`**: Configuration for embedding models and text processing\n   - Defines embedding models for vector storage\n   - Contains retriever configuration for RAG\n   - Specifies text splitter settings for document chunking\n\n3. **`repo.json`**: Configuration for repository handling\n   - Contains file filters to exclude certain files and directories\n   - Defines repository size limits and processing rules\n\nBy default, these files are located in the `api\u002Fconfig\u002F` directory. You can customize their location using the `DEEPWIKI_CONFIG_DIR` environment variable.\n\n### Custom Model Selection for Service Providers\n\nThe custom model selection feature is specifically designed for service providers who need to:\n\n- You can offer multiple AI model choices to users within your organization\n- You can quickly adapt to the rapidly evolving LLM landscape without code changes\n- You can support specialized or fine-tuned models that aren't in the predefined list\n\nService providers can implement their model offerings by selecting from the predefined options or entering custom model identifiers in the frontend interface.\n\n### Base URL Configuration for Enterprise Private Channels\n\nThe OpenAI Client's base_url configuration is designed primarily for enterprise users with private API channels. This feature:\n\n- Enables connection to private or enterprise-specific API endpoints\n- Allows organizations to use their own self-hosted or custom-deployed LLM services\n- Supports integration with third-party OpenAI API-compatible services\n\n**Coming Soon**: In future updates, DeepWiki will support a mode where users need to provide their own API keys in requests. This will allow enterprise customers with private channels to use their existing API arrangements without sharing credentials with the DeepWiki deployment.\n\n## 🧩 Using OpenAI-Compatible Embedding Models (e.g., Alibaba Qwen)\n\nIf you want to use embedding models compatible with the OpenAI API (such as Alibaba Qwen), follow these steps:\n\n1. Replace the contents of `api\u002Fconfig\u002Fembedder.json` with those from `api\u002Fconfig\u002Fembedder_openai_compatible.json`.\n2. In your project root `.env` file, set the relevant environment variables, for example:\n   ```\n   OPENAI_API_KEY=your_api_key\n   OPENAI_BASE_URL=your_openai_compatible_endpoint\n   ```\n3. The program will automatically substitute placeholders in embedder.json with the values from your environment variables.\n\nThis allows you to seamlessly switch to any OpenAI-compatible embedding service without code changes.\n\n## 🧠 Using Google AI Embeddings\n\nDeepWiki now supports Google AI's latest embedding models as an alternative to OpenAI embeddings. This provides better integration when you're already using Google Gemini models for text generation.\n\n### Features\n\n- **Latest Model**: Uses Google's `text-embedding-004` model\n- **Same API Key**: Uses your existing `GOOGLE_API_KEY` (no additional setup required)\n- **Better Integration**: Optimized for use with Google Gemini text generation models\n- **Task-Specific**: Supports semantic similarity, retrieval, and classification tasks\n- **Batch Processing**: Efficient processing of multiple texts\n\n### How to Enable Google AI Embeddings\n\n**Option 1: Environment Variable (Recommended)**\n\nSet the embedder type in your `.env` file:\n\n```bash\n# Your existing Google API key\nGOOGLE_API_KEY=your_google_api_key\n\n# Enable Google AI embeddings\nDEEPWIKI_EMBEDDER_TYPE=google\n```\n\n**Option 2: Docker Environment**\n\n```bash\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e DEEPWIKI_EMBEDDER_TYPE=google \\\n  -v ~\u002F.adalflow:\u002Froot\u002F.adalflow \\\n  ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n```\n\n**Option 3: Docker Compose**\n\nAdd to your `.env` file:\n\n```bash\nGOOGLE_API_KEY=your_google_api_key\nDEEPWIKI_EMBEDDER_TYPE=google\n```\n\nThen run:\n\n```bash\ndocker-compose up\n```\n\n### Available Embedder Types\n\n| Type | Description | API Key Required | Notes |\n|------|-------------|------------------|-------|\n| `openai` | OpenAI embeddings (default) | `OPENAI_API_KEY` | Uses `text-embedding-3-small` model |\n| `google` | Google AI embeddings | `GOOGLE_API_KEY` | Uses `text-embedding-004` model |\n| `ollama` | Local Ollama embeddings | None | Requires local Ollama installation |\n\n### Why Use Google AI Embeddings?\n\n- **Consistency**: If you're using Google Gemini for text generation, using Google embeddings provides better semantic consistency\n- **Performance**: Google's latest embedding model offers excellent performance for retrieval tasks\n- **Cost**: Competitive pricing compared to OpenAI\n- **No Additional Setup**: Uses the same API key as your text generation models\n\n### Switching Between Embedders\n\nYou can easily switch between different embedding providers:\n\n```bash\n# Use OpenAI embeddings (default)\nexport DEEPWIKI_EMBEDDER_TYPE=openai\n\n# Use Google AI embeddings\nexport DEEPWIKI_EMBEDDER_TYPE=google\n\n# Use local Ollama embeddings\nexport DEEPWIKI_EMBEDDER_TYPE=ollama\n```\n\n**Note**: When switching embedders, you may need to regenerate your repository embeddings as different models produce different vector spaces.\n\n### Logging\n\nDeepWiki uses Python's built-in `logging` module for diagnostic output. You can configure the verbosity and log file destination via environment variables:\n\n| Variable        | Description                                                        | Default                      |\n|-----------------|--------------------------------------------------------------------|------------------------------|\n| `LOG_LEVEL`     | Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL).             | INFO                         |\n| `LOG_FILE_PATH` | Path to the log file. If set, logs will be written to this file.   | `api\u002Flogs\u002Fapplication.log`   |\n\nTo enable debug logging and direct logs to a custom file:\n```bash\nexport LOG_LEVEL=DEBUG\nexport LOG_FILE_PATH=.\u002Fdebug.log\npython -m api.main\n```\nOr with Docker Compose:\n```bash\nLOG_LEVEL=DEBUG LOG_FILE_PATH=.\u002Fdebug.log docker-compose up\n```\n\nWhen running with Docker Compose, the container's `api\u002Flogs` directory is bind-mounted to `.\u002Fapi\u002Flogs` on your host (see the `volumes` section in `docker-compose.yml`), ensuring log files persist across restarts.\n\nAlternatively, you can store these settings in your `.env` file:\n\n```bash\nLOG_LEVEL=DEBUG\nLOG_FILE_PATH=.\u002Fdebug.log\n```\nThen simply run:\n\n```bash\ndocker-compose up\n```\n\n**Logging Path Security Considerations:** In production environments, ensure the `api\u002Flogs` directory and any custom log file path are secured with appropriate filesystem permissions and access controls. The application enforces that `LOG_FILE_PATH` resides within the project's `api\u002Flogs` directory to prevent path traversal or unauthorized writes.\n\n## 🛠️ Advanced Setup\n\n### Environment Variables\n\n| Variable             | Description                                                  | Required | Note                                                                                                     |\n|----------------------|--------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|\n| `GOOGLE_API_KEY`     | Google Gemini API key for AI generation and embeddings      | No | Required for Google Gemini models and Google AI embeddings                                               \n| `OPENAI_API_KEY`     | OpenAI API key for embeddings and models                     | Conditional | Required if using OpenAI embeddings or models                                                            |\n| `OPENROUTER_API_KEY` | OpenRouter API key for alternative models                    | No | Required only if you want to use OpenRouter models                                                       |\n| `AWS_ACCESS_KEY_ID`  | AWS access key ID for Bedrock                                 | No | Required for Bedrock if not using instance\u002Frole-based credentials                                        |\n| `AWS_SECRET_ACCESS_KEY` | AWS secret access key for Bedrock                          | No | Required for Bedrock if not using instance\u002Frole-based credentials                                        |\n| `AWS_SESSION_TOKEN`  | AWS session token for Bedrock (STS)                            | No | Required when using temporary credentials                                                                |\n| `AWS_REGION`         | AWS region for Bedrock (default: `us-east-1`)                  | No | Used by Bedrock client                                                                                   |\n| `AWS_ROLE_ARN`       | AWS role ARN to assume for Bedrock                             | No | If set, the Bedrock client will call STS AssumeRole                                                     |\n| `AZURE_OPENAI_API_KEY` | Azure OpenAI API key                    | No | Required only if you want to use Azure OpenAI models                                                       |\n| `AZURE_OPENAI_ENDPOINT` | Azure OpenAI endpoint                    | No | Required only if you want to use Azure OpenAI models                                                       |\n| `AZURE_OPENAI_VERSION` | Azure OpenAI version                     | No | Required only if you want to use Azure OpenAI models                                                       |\n| `OLLAMA_HOST`        | Ollama Host (default: http:\u002F\u002Flocalhost:11434)                | No | Required only if you want to use external Ollama server                                                  |\n| `DEEPWIKI_EMBEDDER_TYPE` | Embedder type: `openai`, `google`, `ollama`, or `bedrock` (default: `openai`) | No | Controls which embedding provider to use                                                              |\n| `PORT`               | Port for the API server (default: 8001)                      | No | If you host API and frontend on the same machine, make sure change port of `SERVER_BASE_URL` accordingly |\n| `SERVER_BASE_URL`    | Base URL for the API server (default: http:\u002F\u002Flocalhost:8001) | No |\n| `DEEPWIKI_AUTH_MODE` | Set to `true` or `1` to enable authorization mode. | No | Defaults to `false`. If enabled, `DEEPWIKI_AUTH_CODE` is required. |\n| `DEEPWIKI_AUTH_CODE` | The secret code required for wiki generation when `DEEPWIKI_AUTH_MODE` is enabled. | No | Only used if `DEEPWIKI_AUTH_MODE` is `true` or `1`. |\n\n**API Key Requirements:**\n- If using `DEEPWIKI_EMBEDDER_TYPE=openai` (default): `OPENAI_API_KEY` is required\n- If using `DEEPWIKI_EMBEDDER_TYPE=google`: `GOOGLE_API_KEY` is required  \n- If using `DEEPWIKI_EMBEDDER_TYPE=ollama`: No API key required (local processing)\n- If using `DEEPWIKI_EMBEDDER_TYPE=bedrock`: AWS credentials (or role-based credentials) are required\n\nOther API keys are only required when configuring and using models from the corresponding providers.\n\n## Authorization Mode\n\nDeepWiki can be configured to run in an authorization mode, where wiki generation requires a valid authorization code. This is useful if you want to control who can use the generation feature.\nRestricts frontend initiation and protects cache deletion, but doesn't fully prevent backend generation if API endpoints are hit directly.\n\nTo enable authorization mode, set the following environment variables:\n\n- `DEEPWIKI_AUTH_MODE`: Set this to `true` or `1`. When enabled, the frontend will display an input field for the authorization code.\n- `DEEPWIKI_AUTH_CODE`: Set this to the desired secret code. Restricts frontend initiation and protects cache deletion, but doesn't fully prevent backend generation if API endpoints are hit directly.\n\nIf `DEEPWIKI_AUTH_MODE` is not set or is set to `false` (or any other value than `true`\u002F`1`), the authorization feature will be disabled, and no code will be required.\n\n### Docker Setup\n\nYou can use Docker to run DeepWiki:\n\n#### Running the Container\n\n```bash\n# Pull the image from GitHub Container Registry\ndocker pull ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n\n# Run the container with environment variables\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  -e OPENROUTER_API_KEY=your_openrouter_api_key \\\n  -e OLLAMA_HOST=your_ollama_host \\\n  -e AZURE_OPENAI_API_KEY=your_azure_openai_api_key \\\n  -e AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint \\\n  -e AZURE_OPENAI_VERSION=your_azure_openai_version \\\n\n  -v ~\u002F.adalflow:\u002Froot\u002F.adalflow \\\n  ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n```\n\nThis command also mounts `~\u002F.adalflow` on your host to `\u002Froot\u002F.adalflow` in the container. This path is used to store:\n- Cloned repositories (`~\u002F.adalflow\u002Frepos\u002F`)\n- Their embeddings and indexes (`~\u002F.adalflow\u002Fdatabases\u002F`)\n- Cached generated wiki content (`~\u002F.adalflow\u002Fwikicache\u002F`)\n\nThis ensures that your data persists even if the container is stopped or removed.\n\nOr use the provided `docker-compose.yml` file:\n\n```bash\n# Edit the .env file with your API keys first\ndocker-compose up\n```\n\n(The `docker-compose.yml` file is pre-configured to mount `~\u002F.adalflow` for data persistence, similar to the `docker run` command above.)\n\n#### Using a .env file with Docker\n\nYou can also mount a .env file to the container:\n\n```bash\n# Create a .env file with your API keys\necho \"GOOGLE_API_KEY=your_google_api_key\" > .env\necho \"OPENAI_API_KEY=your_openai_api_key\" >> .env\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" >> .env\necho \"AZURE_OPENAI_API_KEY=your_azure_openai_api_key\" >> .env\necho \"AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint\" >> .env\necho \"AZURE_OPENAI_VERSION=your_azure_openai_version\"  >>.env\necho \"OLLAMA_HOST=your_ollama_host\" >> .env\n\n# Run the container with the .env file mounted\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -v $(pwd)\u002F.env:\u002Fapp\u002F.env \\\n  -v ~\u002F.adalflow:\u002Froot\u002F.adalflow \\\n  ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n```\n\nThis command also mounts `~\u002F.adalflow` on your host to `\u002Froot\u002F.adalflow` in the container. This path is used to store:\n- Cloned repositories (`~\u002F.adalflow\u002Frepos\u002F`)\n- Their embeddings and indexes (`~\u002F.adalflow\u002Fdatabases\u002F`)\n- Cached generated wiki content (`~\u002F.adalflow\u002Fwikicache\u002F`)\n\nThis ensures that your data persists even if the container is stopped or removed.\n\n#### Building the Docker image locally\n\nIf you want to build the Docker image locally:\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open.git\ncd deepwiki-open\n\n# Build the Docker image\ndocker build -t deepwiki-open .\n\n# Run the container\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  -e OPENROUTER_API_KEY=your_openrouter_api_key \\\n  -e AZURE_OPENAI_API_KEY=your_azure_openai_api_key \\\n  -e AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint \\\n  -e AZURE_OPENAI_VERSION=your_azure_openai_version \\\n  -e OLLAMA_HOST=your_ollama_host \\\n  deepwiki-open\n```\n\n#### Using Self-Signed Certificates in Docker\n\nIf you're in an environment that uses self-signed certificates, you can include them in the Docker build:\n\n1. Create a directory for your certificates (default is `certs` in your project root)\n2. Copy your `.crt` or `.pem` certificate files into this directory\n3. Build the Docker image:\n\n```bash\n# Build with default certificates directory (certs)\ndocker build .\n\n# Or build with a custom certificates directory\ndocker build --build-arg CUSTOM_CERT_DIR=my-custom-certs .\n```\n\n### API Server Details\n\nThe API server provides:\n- Repository cloning and indexing\n- RAG (Retrieval Augmented Generation)\n- Streaming chat completions\n\nFor more details, see the [API README](.\u002Fapi\u002FREADME.md).\n\n## 🔌 OpenRouter Integration\n\nDeepWiki now supports [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002F) as a model provider, giving you access to hundreds of AI models through a single API:\n\n- **Multiple Model Options**: Access models from OpenAI, Anthropic, Google, Meta, Mistral, and more\n- **Simple Configuration**: Just add your OpenRouter API key and select the model you want to use\n- **Cost Efficiency**: Choose models that fit your budget and performance needs\n- **Easy Switching**: Toggle between different models without changing your code\n\n### How to Use OpenRouter with DeepWiki\n\n1. **Get an API Key**: Sign up at [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002F) and get your API key\n2. **Add to Environment**: Add `OPENROUTER_API_KEY=your_key` to your `.env` file\n3. **Enable in UI**: Check the \"Use OpenRouter API\" option on the homepage\n4. **Select Model**: Choose from popular models like GPT-4o, Claude 3.5 Sonnet, Gemini 2.0, and more\n\nOpenRouter is particularly useful if you want to:\n- Try different models without signing up for multiple services\n- Access models that might be restricted in your region\n- Compare performance across different model providers\n- Optimize for cost vs. performance based on your needs\n\n## 🤖 Ask & DeepResearch Features\n\n### Ask Feature\n\nThe Ask feature allows you to chat with your repository using Retrieval Augmented Generation (RAG):\n\n- **Context-Aware Responses**: Get accurate answers based on the actual code in your repository\n- **RAG-Powered**: The system retrieves relevant code snippets to provide grounded responses\n- **Real-Time Streaming**: See responses as they're generated for a more interactive experience\n- **Conversation History**: The system maintains context between questions for more coherent interactions\n\n### DeepResearch Feature\n\nDeepResearch takes repository analysis to the next level with a multi-turn research process:\n\n- **In-Depth Investigation**: Thoroughly explores complex topics through multiple research iterations\n- **Structured Process**: Follows a clear research plan with updates and a comprehensive conclusion\n- **Automatic Continuation**: The AI automatically continues research until reaching a conclusion (up to 5 iterations)\n- **Research Stages**:\n  1. **Research Plan**: Outlines the approach and initial findings\n  2. **Research Updates**: Builds on previous iterations with new insights\n  3. **Final Conclusion**: Provides a comprehensive answer based on all iterations\n\nTo use DeepResearch, simply toggle the \"Deep Research\" switch in the Ask interface before submitting your question.\n\n## Screenshots\n\n![DeepWiki Main Interface](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_30fb5b1b365a.png)\n*The main interface of DeepWiki*\n\n![Private Repository Support](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_69be8d221816.png)\n*Access private repositories with personal access tokens*\n\n![DeepResearch Feature](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_7649d5781ec1.png)\n*DeepResearch conducts multi-turn investigations for complex topics*\n\n### Demo Video\n\n[![DeepWiki Demo Video](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_f78190915111.jpg)](https:\u002F\u002Fyoutu.be\u002FzGANs8US8B4)\n\n*Watch DeepWiki in action!*\n\n## ❓ Troubleshooting\n\n### API Key Issues\n- **\"Missing environment variables\"**: Make sure your `.env` file is in the project root and contains the required API keys\n- **\"API key not valid\"**: Check that you've copied the full key correctly with no extra spaces\n- **\"OpenRouter API error\"**: Verify your OpenRouter API key is valid and has sufficient credits\n- **\"Azure OpenAI API error\"**: Verify your Azure OpenAI credentials (API key, endpoint, and version) are correct and the service is properly deployed\n\n### Connection Problems\n- **\"Cannot connect to API server\"**: Make sure the API server is running on port 8001\n- **\"CORS error\"**: The API is configured to allow all origins, but if you're having issues, try running both frontend and backend on the same machine\n\n### Generation Issues\n- **\"Error generating wiki\"**: For very large repositories, try a smaller one first\n- **\"Invalid repository format\"**: Make sure you're using a valid GitHub, GitLab or Bitbucket URL format\n- **\"Could not fetch repository structure\"**: For private repositories, ensure you've entered a valid personal access token with appropriate permissions\n- **\"Diagram rendering error\"**: The app will automatically try to fix broken diagrams\n\n### Common Solutions\n1. **Restart both servers**: Sometimes a simple restart fixes most issues\n2. **Check console logs**: Open browser developer tools to see any JavaScript errors\n3. **Check API logs**: Look at the terminal where the API is running for Python errors\n\n## 🤝 Contributing\n\nContributions are welcome! Feel free to:\n- Open issues for bugs or feature requests\n- Submit pull requests to improve the code\n- Share your feedback and ideas\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## ⭐ Star History\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_415f671142a2.png)](https:\u002F\u002Fstar-history.com\u002F#AsyncFuncAI\u002Fdeepwiki-open&Date)\n","### ⚠️ 公告：重心轉移至 AsyncReview\n---\n\n**重要更新** DeepWiki-Open 的維護仍在進行中，但主要的積極開發工作將遷移到 **[AsyncReview](https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002FAsyncReview\u002F)**。感謝大家對本項目的支持；請加入新的倉庫，共同參與今年的主要開發工作。\n\n---\n---\n\n# DeepWiki-Open\n\n![DeepWiki 標誌](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_0b8900126c20.png)\n\n**DeepWiki** 是我對 DeepWiki 的一次實現嘗試，能夠自動為任何 GitHub、GitLab 或 BitBucket 倉庫創建美觀且互動性強的維基頁面！只需輸入一個倉庫名稱，DeepWiki 就會：\n\n1. 分析代碼結構\n2. 生成全面的文檔\n3. 組織視覺化圖表來解釋系統運作方式\n4. 將所有內容整理成易於導航的維基頁面\n\n[![\"給我買杯咖啡\"](https:\u002F\u002Fwww.buymeacoffee.com\u002Fassets\u002Fimg\u002Fcustom_images\u002Forange_img.png)](https:\u002F\u002Fbuymeacoffee.com\u002Fsheing)\n[![加密貨幣打賞](https:\u002F\u002Ftip.md\u002Fbadge.svg)](https:\u002F\u002Ftip.md\u002Fsng-asyncfunc)\n[![Twitter\u002FX](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTwitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https:\u002F\u002Fx.com\u002Fsashimikun_void)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.com\u002Finvite\u002FVQMBGR8u5v)\n\n[English](.\u002FREADME.md) | [简体中文](.\u002FREADME.zh.md) | [繁體中文](.\u002FREADME.zh-tw.md) | [日本語](.\u002FREADME.ja.md) | [Español](.\u002FREADME.es.md) | [한국어](.\u002FREADME.kr.md) | [Tiếng Việt](.\u002FREADME.vi.md) | [Português Brasileiro](.\u002FREADME.pt-br.md) | [Français](.\u002FREADME.fr.md) | [Русский](.\u002FREADME.ru.md)\n\n## ✨ 特色功能\n\n- **即時文檔生成**：幾秒內即可將任何 GitHub、GitLab 或 BitBucket 倉庫轉換為維基頁面\n- **私有倉庫支援**：通過個人存取令牌安全地訪問私有倉庫\n- **智能分析**：利用 AI 技術理解代碼結構與相互關係\n- **精美圖表**：自動生成 Mermaid 圖表，直觀展示架構與資料流\n- **簡單導航**：設計簡潔直觀的介面，方便探索維基內容\n- **Ask Feature**：使用 RAG 驅動的 AI 與你的倉庫對話，獲取準確回覆\n- **DeepResearch**：多輪研究流程，深入探討複雜主題\n- **多模型提供商支援**：兼容 Google Gemini、OpenAI、OpenRouter 以及本地 Ollama 模型\n- **靈活嵌入技術**：可選擇 OpenAI、Google AI 或本地 Ollama 嵌入，以獲得最佳性能\n\n## 🚀 快速開始（超簡單！）\n\n### 方法一：使用 Docker\n\n```bash\n# 克隆倉庫\ngit clone https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open.git\ncd deepwiki-open\n\n# 創建包含 API 密鑰的 .env 文件\necho \"GOOGLE_API_KEY=your_google_api_key\" > .env\necho \"OPENAI_API_KEY=your_openai_api_key\" >> .env\n# 選擇：若使用 Google 模型，建議採用 Google AI 嵌入\necho \"DEEPWIKI_EMBEDDER_TYPE=google\" >> .env\n# 選擇：若要使用 OpenRouter 模型，添加其 API 密鑰\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" >> .env\n# 選擇：若 Ollama 伺服器不在本地，需指定地址。預設為 http:\u002F\u002Flocalhost:11434\necho \"OLLAMA_HOST=your_ollama_host\" >> .env\n# 選擇：若要使用 Azure OpenAI 模型，添加其 API 密鑰、端點及版本號\necho \"AZURE_OPENAI_API_KEY=your_azure_openai_api_key\" >> .env\necho \"AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint\" >> .env\necho \"AZURE_OPENAI_VERSION=your_azure_openai_version\" >> .env\n# 使用 Docker Compose 啟動服務\ndocker-compose up\n```\n\n有關如何結合 Ollama 和 Docker 使用 DeepWiki 的詳細說明，請參閱 [Ollama 使用說明](Ollama-instruction.md)。\n\n> 💡 **這些密鑰從哪裡獲取？**\n> - Google API 密鑰可在 [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey) 獲得\n> - OpenAI API 密鑰可在 [OpenAI 平台](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys) 獲得\n> - Azure OpenAI 的認證資訊則可從 [Azure 门户](https:\u002F\u002Fportal.azure.com\u002F)取得——建立 Azure OpenAI 資源後，即可獲得 API 密鑰、端點和 API 版本\n\n### 方法二：手動安裝（推薦）\n\n####  Schritt 1: Setzen Sie Ihre API-Schlüssel ein\n\nErstellen Sie eine `.env`-Datei im Stammverzeichnis des Projekts mit folgenden Schlüsseln:\n\n```\nGOOGLE_API_KEY=your_google_api_key\nOPENAI_API_KEY=your_openai_api_key\n# Optional: Verwenden Sie Google AI Embeddings (empfohlen, wenn Sie Google-Modelle verwenden)\nDEEPWIKI_EMBEDDER_TYPE=google\n# Optional: Fügen Sie dies hinzu, wenn Sie OpenRouter-Modelle verwenden möchten\nOPENROUTER_API_KEY=your_openrouter_api_key\n# Optional: Fügen Sie dies hinzu, wenn Sie Azure OpenAI-Modelle verwenden möchten\nAZURE_OPENAI_API_KEY=your_azure_openai_api_key\nAZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint\nAZURE_OPENAI_VERSION=your_azure_openai_version\n# Optional: Fügen Sie den Ollama-Host hinzu, falls er nicht lokal ist. Standard: http:\u002F\u002Flocalhost:11434\nOLLAMA_HOST=your_ollama_host\n```\n\n#### Schritt 2: Starten Sie das Backend\n\n```bash\n# Installieren Sie die Python-Abhängigkeiten\npython -m pip install poetry==2.0.1 && poetry install -C api\n\n# Starten Sie den API-Server\npython -m api.main\n```\n\n#### Schritt 3: Starten Sie das Frontend\n\n```bash\n# Installieren Sie die JavaScript-Abhängigkeiten\nnpm install\n# oder\nyarn install\n\n# Starten Sie die Webanwendung\nnpm run dev\n# oder\nyarn dev\n```\n\n#### Schritt 4: Nutzen Sie DeepWiki!\n\n1. Öffnen Sie [http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000) in Ihrem Browser\n2. Geben Sie einen GitHub-, GitLab- oder Bitbucket-Repository-Link ein (z. B. `https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex`, `https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fautogen`, `https:\u002F\u002Fgitlab.com\u002Fgitlab-org\u002Fgitlab` oder `https:\u002F\u002Fbitbucket.org\u002Fredradish\u002Fatlassian_app_versions`)\n3. Für private Repositories klicken Sie auf \"+ Add access tokens\" und geben Sie Ihren persönlichen GitHub- oder GitLab-Zugriffstoken ein\n4. Klicken Sie auf \"Generate Wiki\" und beobachten Sie, wie die Magie geschieht!\n\n## 🔍 工作原理\n\nDeepWiki 使用 AI 完成以下任务：\n\n1. 克隆并分析 GitHub、GitLab 或 Bitbucket 仓库（包括使用令牌认证的私有仓库）\n2. 为代码创建嵌入向量，以便进行智能检索\n3. 利用上下文感知的 AI 生成文档（支持 Google Gemini、OpenAI、OpenRouter、Azure OpenAI 或本地 Ollama 模型）\n4. 创建可视化图表以解释代码之间的关系\n5. 将所有内容组织成结构化的维基\n6. 通过“Ask”功能实现与仓库的智能问答\n7. 提供深度研究功能 DeepResearch\n\n```mermaid\ngraph TD\n    A[用户输入 GitHub\u002FGitLab\u002FBitbucket 仓库] --> AA{是否为私有仓库?}\n    AA -->|是| AB[添加访问令牌]\n    AA -->|否| B[克隆仓库]\n    AB --> B\n    B --> C[分析代码结构]\n    C --> D[创建代码嵌入]\n\n    D --> M{选择模型提供商}\n    M -->|Google Gemini| E1[使用 Gemini 生成]\n    M -->|OpenAI| E2[使用 OpenAI 生成]\n    M -->|OpenRouter| E3[使用 OpenRouter 生成]\n    M -->|Local Ollama| E4[使用 Ollama 生成]\n    M -->|Azure| E5[使用 Azure 生成]\n\n    E1 --> E[生成文档]\n    E2 --> E\n    E3 --> E\n    E4 --> E\n    E5 --> E\n\n    D --> F[创建可视化图表]\n    E --> G[整理为维基]\n    F --> G\n    G --> H[交互式 DeepWiki]\n\n    classDef process stroke-width:2px;\n    classDef data stroke-width:2px;\n    classDef result stroke-width:2px;\n    classDef decision stroke-width:2px;\n\n    class A,D data;\n    class AA,M decision;\n    class B,C,E,F,G,AB,E1,E2,E3,E4,E5 process;\n    class H result;\n```\n\n## 🛠️ 项目结构\n\n```\ndeepwiki\u002F\n├── api\u002F                  # 后端 API 服务器\n│   ├── main.py           # API 入口文件\n│   ├── api.py            # FastAPI 实现\n│   ├── rag.py            # 检索增强生成模块\n│   ├── data_pipeline.py  # 数据处理工具\n│   ├── pyproject.toml     # Python 依赖管理（Poetry）\n│   └── poetry.lock        # 锁定的 Python 依赖版本\n│\n├── src\u002F                  # 前端 Next.js 应用\n│   ├── app\u002F              # Next.js 应用目录\n│   │   └── page.tsx      # 主应用页面\n│   └── components\u002F       # React 组件\n│       └── Mermaid.tsx   # Mermaid 图表渲染器\n│\n├── public\u002F               # 静态资源\n├── package.json          # JavaScript 依赖\n└── .env                  # 环境变量文件（需创建）\n```\n\n## 🤖 基于提供商的模型选择系统\n\nDeepWiki 现已实现灵活的基于提供商的模型选择系统，支持多种 LLM 提供商：\n\n### 支持的提供商及模型\n\n- **Google**: 默认 `gemini-2.5-flash`，也支持 `gemini-2.5-flash-lite`、`gemini-2.5-pro` 等。\n- **OpenAI**: 默认 `gpt-5-nano`，也支持 `gpt-5`、`4o` 等。\n- **OpenRouter**: 通过统一 API 访问多种模型，包括 Claude、Llama、Mistral 等。\n- **Azure OpenAI**: 默认 `gpt-4o`，也支持 `o4-mini` 等。\n- **Ollama**: 支持本地运行的开源模型，如 `llama3`。\n\n### 环境变量\n\n每个提供商都需要相应的 API 密钥环境变量：\n\n```\n# API 密钥\nGOOGLE_API_KEY=your_google_api_key        # Google Gemini 模型所需\nOPENAI_API_KEY=your_openai_api_key        # OpenAI 模型所需\nOPENROUTER_API_KEY=your_openrouter_api_key # OpenRouter 模型所需\nAZURE_OPENAI_API_KEY=your_azure_openai_api_key  # Azure OpenAI 模型所需\nAZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint  # Azure OpenAI 模型所需\nAZURE_OPENAI_VERSION=your_azure_openai_version  # Azure OpenAI 模型所需\n\n# OpenAI API 基础 URL 配置\nOPENAI_BASE_URL=https:\u002F\u002Fcustom-api-endpoint.com\u002Fv1  # 可选，用于自定义 OpenAI API 端点\n\n# Ollama 主机\nOLLAMA_HOST=your_ollama_host # 可选，若 Ollama 不在本地，默认为 http:\u002F\u002Flocalhost:11434\n\n# 配置目录\nDEEPWIKI_CONFIG_DIR=\u002Fpath\u002Fto\u002Fcustom\u002Fconfig\u002Fdir  # 可选，用于指定自定义配置文件位置\n```\n\n### 配置文件\n\nDeepWiki 使用 JSON 配置文件来管理系统的各个方面：\n\n1. **`generator.json`**: 文本生成模型的配置\n   - 定义可用的模型提供商（Google、OpenAI、OpenRouter、Azure、Ollama）\n   - 指定每个提供商的默认和可用模型\n   - 包含温度、top_p 等模型特定参数\n\n2. **`embedder.json`**: 嵌入模型和文本处理的配置\n   - 定义用于向量存储的嵌入模型\n   - 包含 RAG 的检索器配置\n   - 指定用于文档分块的文本分割器设置\n\n3. **`repo.json`**: 仓库处理的配置\n   - 包含文件过滤器，用于排除特定文件和目录\n   - 定义仓库大小限制和处理规则\n\n默认情况下，这些文件位于 `api\u002Fconfig\u002F` 目录下。您可以通过设置 `DEEPWIKI_CONFIG_DIR` 环境变量来自定义其位置。\n\n### 针对服务提供商的自定义模型选择\n\n自定义模型选择功能专为需要以下需求的服务提供商设计：\n\n- 可以为贵公司内部用户提供多种 AI 模型选择\n- 能够快速适应快速发展的 LLM 生态，而无需修改代码\n- 支持不在预定义列表中的专用或微调模型\n\n服务提供商可以通过前端界面从预定义选项中选择，或输入自定义模型标识符来实现其模型方案。\n\n### 针对企业私有通道的基础 URL 配置\n\nOpenAI 客户端的 base_url 配置主要面向拥有私有 API 通道的企业用户。此功能：\n\n- 允许连接到私有或企业专属的 API 端点\n- 使组织能够使用自己托管或自定义部署的 LLM 服务\n- 支持与第三方兼容 OpenAI API 的服务集成\n\n**即将推出**：在未来的更新中，DeepWiki 将支持一种模式，即用户需要在请求中提供自己的 API 密钥。这将允许拥有私有通道的企业客户在不与 DeepWiki 部署共享凭据的情况下，继续使用现有的 API 配置。\n\n## 🧩 使用兼容 OpenAI 的嵌入模型（例如 Alibaba Qwen）\n\n如果您想使用与 OpenAI API 兼容的嵌入模型（如 Alibaba Qwen），请按照以下步骤操作：\n\n1. 将 `api\u002Fconfig\u002Fembedder.json` 文件的内容替换为 `api\u002Fconfig\u002Fembedder_openai_compatible.json` 中的内容。\n2. 在项目根目录的 `.env` 文件中，设置相关环境变量，例如：\n   ```\n   OPENAI_API_KEY=your_api_key\n   OPENAI_BASE_URL=your_openai_compatible_endpoint\n   ```\n3. 程序会自动将 embedder.json 中的占位符替换为您环境变量中的值。\n\n这样，您就可以无缝切换到任何兼容 OpenAI 的嵌入服务，而无需更改代码。\n\n## 🧠 使用 Google AI 嵌入\n\nDeepWiki 现在支持 Google AI 的最新嵌入模型，作为 OpenAI 嵌入的替代方案。这为您在已经使用 Google Gemini 模型进行文本生成时提供了更好的集成。\n\n### 功能特性\n\n- **最新模型**：使用 Google 的 `text-embedding-004` 模型\n- **相同 API 密钥**：使用您现有的 `GOOGLE_API_KEY`（无需额外设置）\n- **更佳集成**：针对与 Google Gemini 文本生成模型的配合进行了优化\n- **任务专用**：支持语义相似度、检索和分类任务\n- **批量处理**：高效处理多条文本\n\n### 如何启用 Google AI 嵌入\n\n**选项 1：环境变量（推荐）**\n\n在您的 `.env` 文件中设置嵌入器类型：\n\n```bash\n# 您现有的 Google API 密钥\nGOOGLE_API_KEY=your_google_api_key\n\n# 启用 Google AI 嵌入\nDEEPWIKI_EMBEDDER_TYPE=google\n```\n\n**选项 2：Docker 环境**\n\n```bash\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e DEEPWIKI_EMBEDDER_TYPE=google \\\n  -v ~\u002F.adalflow:\u002Froot\u002F.adalflow \\\n  ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n```\n\n**选项 3：Docker Compose**\n\n在您的 `.env` 文件中添加：\n\n```bash\nGOOGLE_API_KEY=your_google_api_key\nDEEPWIKI_EMBEDDER_TYPE=google\n```\n\n然后运行：\n\n```bash\ndocker-compose up\n```\n\n### 可用的嵌入器类型\n\n| 类型 | 描述 | 是否需要 API 密钥 | 备注 |\n|------|-------------|------------------|-------|\n| `openai` | OpenAI 嵌入（默认） | `OPENAI_API_KEY` | 使用 `text-embedding-3-small` 模型 |\n| `google` | Google AI 嵌入 | `GOOGLE_API_KEY` | 使用 `text-embedding-004` 模型 |\n| `ollama` | 本地 Ollama 嵌入 | 无 | 需要本地安装 Ollama |\n\n### 为什么使用 Google AI 嵌入？\n\n- **一致性**：如果您正在使用 Google Gemini 进行文本生成，使用 Google 嵌入可以提供更好的语义一致性\n- **性能**：Google 最新的嵌入模型在检索任务上表现出色\n- **成本**：与 OpenAI 相比具有竞争力的价格\n- **无需额外设置**：使用与文本生成模型相同的 API 密钥\n\n### 在不同嵌入器之间切换\n\n您可以轻松地在不同的嵌入提供商之间切换：\n\n```bash\n# 使用 OpenAI 嵌入（默认）\nexport DEEPWIKI_EMBEDDER_TYPE=openai\n\n# 使用 Google AI 嵌入\nexport DEEPWIKI_EMBEDDER_TYPE=google\n\n# 使用本地 Ollama 嵌入\nexport DEEPWIKI_EMBEDDER_TYPE=ollama\n```\n\n**注意**：切换嵌入器时，可能需要重新生成您的仓库嵌入，因为不同的模型会产生不同的向量空间。\n\n### 日志记录\n\nDeepWiki 使用 Python 内置的 `logging` 模块来进行诊断输出。您可以使用环境变量来配置日志的详细程度和日志文件的存储位置：\n\n| 变量        | 描述                                                        | 默认                      |\n|-----------------|--------------------------------------------------------------------|------------------------------|\n| `LOG_LEVEL`     | 日志级别（DEBUG、INFO、WARNING、ERROR、CRITICAL）。             | INFO                         |\n| `LOG_FILE_PATH` | 日志文件的路径。如果设置，日志将被写入此文件。   | `api\u002Flogs\u002Fapplication.log`   |\n\n要启用调试日志并将其定向到自定义文件：\n```bash\nexport LOG_LEVEL=DEBUG\nexport LOG_FILE_PATH=.\u002Fdebug.log\npython -m api.main\n```\n或者使用 Docker Compose：\n```bash\nLOG_LEVEL=DEBUG LOG_FILE_PATH=.\u002Fdebug.log docker-compose up\n```\n\n当使用 Docker Compose 运行时，容器的 `api\u002Flogs` 目录会以绑定挂载的方式映射到主机上的 `.\u002Fapi\u002Flogs`（参见 `docker-compose.yml` 中的 `volumes` 部分），从而确保日志文件在重启后仍然存在。\n\n您也可以将这些设置保存到 `.env` 文件中：\n\n```bash\nLOG_LEVEL=DEBUG\nLOG_FILE_PATH=.\u002Fdebug.log\n```\n然后只需运行：\n\n```bash\ndocker-compose up\n```\n\n**日志路径安全注意事项**：在生产环境中，请确保 `api\u002Flogs` 目录以及任何自定义的日志文件路径都通过适当的文件系统权限和访问控制加以保护。应用程序会强制要求 `LOG_FILE_PATH` 位于项目的 `api\u002Flogs` 目录内，以防止路径遍历或未经授权的写入操作。\n\n## 🛠️ 高级设置\n\n### 环境变量\n\n| 变量             | 描述                                                  | 是否必填 | 备注                                                                                                     |\n|----------------------|--------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|\n| `GOOGLE_API_KEY`     | 用于 AI 生成和嵌入的 Google Gemini API 密钥      | 否 | 使用 Google Gemini 模型和 Google AI 嵌入时需要                                                  \n| `OPENAI_API_KEY`     | 用于嵌入和模型的 OpenAI API 密钥                     | 条件   | 如果使用 OpenAI 的嵌入或模型，则需要                                                            |\n| `OPENROUTER_API_KEY` | 用于替代模型的 OpenRouter API 密钥                    | 否 | 仅在您希望使用 OpenRouter 模型时才需要                                                       |\n| `AWS_ACCESS_KEY_ID`  | Bedrock 的 AWS 访问密钥 ID                            | 否 | 如果不使用实例\u002F角色相关的凭证，Bedrock 需要此密钥                                             |\n| `AWS_SECRET_ACCESS_KEY` | Bedrock 的 AWS 秘密访问密钥                          | 否 | 如果不使用实例\u002F角色相关的凭证，Bedrock 需要此密钥                                             |\n| `AWS_SESSION_TOKEN`  | Bedrock 的 AWS 会话令牌（STS）                         | 否 | 使用临时凭证时需要                                                                           |\n| `AWS_REGION`         | Bedrock 的 AWS 区域（默认：`us-east-1`）               | 否 | 由 Bedrock 客户端使用                                                                          |\n| `AWS_ROLE_ARN`       | Bedrock 要承担的 AWS 角色 ARN                         | 否 | 如果设置，Bedrock 客户端将调用 STS AssumeRole                                                |\n| `AZURE_OPENAI_API_KEY` | Azure OpenAI 的 API 密钥                              | 否 | 仅在您希望使用 Azure OpenAI 模型时需要                                                       |\n| `AZURE_OPENAI_ENDPOINT` | Azure OpenAI 的终端点                                 | 否 | 仅在您希望使用 Azure OpenAI 模型时需要                                                       |\n| `AZURE_OPENAI_VERSION` | Azure OpenAI 的版本                                   | 否 | 仅在您希望使用 Azure OpenAI 模型时需要                                                       |\n| `OLLAMA_HOST`        | Ollama 主机地址（默认：http:\u002F\u002Flocalhost:11434）        | 否 | 仅在您希望使用外部 Ollama 服务器时需要                                                      |\n| `DEEPWIKI_EMBEDDER_TYPE` | 嵌入器类型：`openai`、`google`、`ollama` 或 `bedrock`（默认：`openai`） | 否 | 控制使用哪个嵌入提供商                                                                      |\n| `PORT`               | API 服务器的端口（默认：8001）                        | 否 | 如果在同一台机器上托管 API 和前端，请确保相应地更改 `SERVER_BASE_URL` 的端口                   |\n| `SERVER_BASE_URL`    | API 服务器的基 URL（默认：http:\u002F\u002Flocalhost:8001）      | 否 |\n| `DEEPWIKI_AUTH_MODE` | 设置为 `true` 或 `1` 以启用授权模式。                | 否 | 默认为 `false`。如果启用，需要 `DEEPWIKI_AUTH_CODE`。                                         |\n| `DEEPWIKI_AUTH_CODE` | 当 `DEEPWIKI_AUTH_MODE` 启用时，生成维基所需的密钥。  | 否 | 仅在 `DEEPWIKI_AUTH_MODE` 为 `true` 或 `1` 时使用。                                          |\n\n**API 密钥要求：**\n- 如果使用 `DEEPWIKI_EMBEDDER_TYPE=openai`（默认）：需要 `OPENAI_API_KEY`\n- 如果使用 `DEEPWIKI_EMBEDDER_TYPE=google`：需要 `GOOGLE_API_KEY`  \n- 如果使用 `DEEPWIKI_EMBEDDER_TYPE=ollama`：无需 API 密钥（本地处理）\n- 如果使用 `DEEPWIKI_EMBEDDER_TYPE=bedrock`：需要 AWS 凭证（或基于角色的凭证）\n\n其他 API 密钥仅在配置和使用相应提供商的模型时才需要。\n\n## 授权模式\n\nDeepWiki 可以配置为在授权模式下运行，此时生成维基内容需要有效的授权码。这在您希望控制谁可以使用生成功能时非常有用。\n该模式会限制前端发起请求并保护缓存删除操作，但如果直接调用 API 端点，则无法完全阻止后端生成。\n\n要启用授权模式，请设置以下环境变量：\n\n- `DEEPWIKI_AUTH_MODE`：将其设置为 `true` 或 `1`。启用后，前端将显示一个输入框用于输入授权码。\n- `DEEPWIKI_AUTH_CODE`：将其设置为您希望的密钥。该模式会限制前端发起请求并保护缓存删除操作，但若直接调用 API 端点，则无法完全阻止后端生成。\n\n如果未设置 `DEEPWIKI_AUTH_MODE`，或将其设置为 `false`（或其他非 `true`\u002F`1` 的值），则授权功能将被禁用，无需输入任何代码。\n\n### Docker 部署\n\n您可以使用 Docker 运行 DeepWiki：\n\n#### 运行容器\n\n```bash\n# 从 GitHub Container Registry 拉取镜像\ndocker pull ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n\n# 使用环境变量运行容器\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  -e OPENROUTER_API_KEY=your_openrouter_api_key \\\n  -e OLLAMA_HOST=your_ollama_host \\\n  -e AZURE_OPENAI_API_KEY=your_azure_openai_api_key \\\n  -e AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint \\\n  -e AZURE_OPENAI_VERSION=your_azure_openai_version \\\n\n  -v ~\u002F.adalflow:\u002Froot\u002F.adalflow \\\n  ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n```\n\n此命令还将主机上的 `~\u002F.adalflow` 挂载到容器内的 `\u002Froot\u002F.adalflow`。该路径用于存储：\n- 克隆的仓库 (`~\u002F.adalflow\u002Frepos\u002F`)\n- 它们的嵌入和索引 (`~\u002F.adalflow\u002Fdatabases\u002F`)\n- 缓存的生成维基内容 (`~\u002F.adalflow\u002Fwikicache\u002F`)\n\n这样可以确保即使容器停止或移除，您的数据仍然会保留。\n\n或者使用提供的 `docker-compose.yml` 文件：\n\n```bash\n# 首先编辑 .env 文件，填写您的 API 密钥\ndocker-compose up\n```\n\n（`docker-compose.yml` 文件已预先配置好挂载 `~\u002F.adalflow` 以实现数据持久化，与上述 `docker run` 命令类似。）\n\n#### 使用 .env 文件与 Docker\n\n您也可以将 .env 文件挂载到容器中：\n\n```bash\n# 创建包含 API 密钥的 .env 文件\necho \"GOOGLE_API_KEY=your_google_api_key\" > .env\necho \"OPENAI_API_KEY=your_openai_api_key\" >> .env\necho \"OPENROUTER_API_KEY=your_openrouter_api_key\" >> .env\necho \"AZURE_OPENAI_API_KEY=your_azure_openai_api_key\" >> .env\necho \"AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint\" >> .env\necho \"AZURE_OPENAI_VERSION=your_azure_openai_version\"  >>.env\necho \"OLLAMA_HOST=your_ollama_host\" >> .env\n\n# 使用挂载 .env 文件的容器运行\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -v $(pwd)\u002F.env:\u002Fapp\u002F.env \\\n  -v ~\u002F.adalflow:\u002Froot\u002F.adalflow \\\n  ghcr.io\u002Fasyncfuncai\u002Fdeepwiki-open:latest\n```\n\n此命令还会将主机上的 `~\u002F.adalflow` 挂载到容器内的 `\u002Froot\u002F.adalflow`。该路径用于存储：\n- 克隆的仓库（`~\u002F.adalflow\u002Frepos\u002F`）\n- 它们的嵌入和索引（`~\u002F.adalflow\u002Fdatabases\u002F`）\n- 缓存的生成维基内容（`~\u002F.adalflow\u002Fwikicache\u002F`）\n\n这确保了即使容器停止或被移除，您的数据仍然会保留。\n\n#### 在本地构建 Docker 镜像\n\n如果您想在本地构建 Docker 镜像：\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open.git\ncd deepwiki-open\n\n# 构建 Docker 镜像\ndocker build -t deepwiki-open .\n\n# 运行容器\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  -e OPENROUTER_API_KEY=your_openrouter_api_key \\\n  -e AZURE_OPENAI_API_KEY=your_azure_openai_api_key \\\n  -e AZURE_OPENAI_ENDPOINT=your_azure_openai_endpoint \\\n  -e AZURE_OPENAI_VERSION=your_azure_openai_version \\\n  -e OLLAMA_HOST=your_ollama_host \\\n  deepwiki-open\n```\n\n#### 在 Docker 中使用自签名证书\n\n如果您处于使用自签名证书的环境中，可以将其包含在 Docker 构建中：\n\n1. 创建一个用于存放证书的目录（默认为项目根目录下的 `certs`）\n2. 将您的 `.crt` 或 `.pem` 证书文件复制到该目录\n3. 构建 Docker 镜像：\n\n```bash\n# 使用默认证书目录 (certs) 构建\ndocker build .\n\n# 或者使用自定义证书目录构建\ndocker build --build-arg CUSTOM_CERT_DIR=my-custom-certs .\n```\n\n### API 服务器详情\n\nAPI 服务器提供：\n- 仓库克隆和索引\n- RAG（检索增强生成）\n- 流式聊天完成\n\n更多详细信息，请参阅 [API README](.\u002Fapi\u002FREADME.md)。\n\n## 🔌 OpenRouter 集成\n\nDeepWiki 现在支持 [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002F) 作为模型提供商，让您可以通过一个 API 访问数百种 AI 模型：\n\n- **多种模型选择**：访问来自 OpenAI、Anthropic、Google、Meta、Mistral 等的模型\n- **简单配置**：只需添加您的 OpenRouter API 密钥并选择您想要使用的模型\n- **成本效益**：根据您的预算和性能需求选择合适的模型\n- **轻松切换**：无需更改代码即可在不同模型之间切换\n\n### 如何将 OpenRouter 与 DeepWiki 结合使用\n\n1. **获取 API 密钥**：在 [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002F) 上注册并获取您的 API 密钥\n2. **添加到环境变量**：将 `OPENROUTER_API_KEY=your_key` 添加到您的 `.env` 文件中\n3. **在 UI 中启用**：在主页上勾选“使用 OpenRouter API”选项\n4. **选择模型**：从 GPT-4o、Claude 3.5 Sonnet、Gemini 2.0 等热门模型中进行选择\n\nOpenRouter 特别适用于以下情况：\n- 无需注册多个服务即可尝试不同模型\n- 访问可能在您所在地区受限的模型\n- 比较不同模型提供商之间的性能\n- 根据您的需求优化成本与性能的平衡\n\n## 🤖 Ask 和 DeepResearch 功能\n\n### Ask 功能\n\nAsk 功能允许您使用检索增强生成（RAG）与您的仓库进行对话：\n\n- **上下文感知的回答**：根据仓库中的实际代码获得准确的答案\n- **RAG 驱动**：系统会检索相关的代码片段以提供有依据的回答\n- **实时流式传输**：您可以实时查看生成的回答，获得更互动的体验\n- **对话历史**：系统会保持问题之间的上下文，以便进行更连贯的交互\n\n### DeepResearch 功能\n\nDeepResearch 功能通过多轮研究过程将仓库分析提升到一个新的水平：\n\n- **深入调查**：通过多次研究迭代彻底探索复杂主题\n- **结构化流程**：遵循清晰的研究计划，提供更新和全面的结论\n- **自动继续**：AI 会自动继续研究，直到得出结论为止（最多 5 次迭代）\n- **研究阶段**：\n  1. **研究计划**：概述方法和初步发现\n  2. **研究更新**：基于之前的迭代提供新的见解\n  3. **最终结论**：根据所有迭代提供全面的答案\n\n要使用 DeepResearch，只需在提交问题之前，在 Ask 界面中切换“Deep Research”开关即可。\n\n## 截图\n\n![DeepWiki 主界面](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_30fb5b1b365a.png)\n*DeepWiki 的主界面*\n\n![私有仓库支持](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_69be8d221816.png)\n*使用个人访问令牌访问私有仓库*\n\n![DeepResearch 功能](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_7649d5781ec1.png)\n*DeepResearch 对于复杂主题进行多轮调查*\n\n### 演示视频\n\n[![DeepWiki 演示视频](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_f78190915111.jpg)](https:\u002F\u002Fyoutu.be\u002FzGANs8US8B4)\n\n*观看 DeepWiki 的实际操作！*\n\n## ❓ 故障排除\n\n### API 密钥问题\n- **“缺少环境变量”**：请确保您的 `.env` 文件位于项目根目录，并包含所需的 API 密钥\n- **“API 密钥无效”**：请检查您是否正确复制了完整的密钥，且没有多余的空格\n- **“OpenRouter API 错误”**：请验证您的 OpenRouter API 密钥是否有效，且有足够的额度\n- **“Azure OpenAI API 错误”**：请确认您的 Azure OpenAI 凭证（API 密钥、端点和版本）是否正确，并且服务已正确部署\n\n### 连接问题\n- **“无法连接到 API 服务器”**：请确保 API 服务器正在 8001 端口上运行\n- **“CORS 错误”**：API 已配置为允许所有来源，但如果您遇到问题，可以尝试在同一台机器上同时运行前端和后端\n\n### 生成问题\n- **“生成维基时出错”**：对于非常大的仓库，建议先尝试较小的仓库\n- **“仓库格式无效”**：请确保您使用的是有效的 GitHub、GitLab 或 Bitbucket URL 格式\n- **“无法获取仓库结构”**：对于私有仓库，确保您输入了具有适当权限的有效个人访问令牌\n- **“图表渲染错误”**：应用程序会自动尝试修复损坏的图表\n\n### 常见解决方案\n1. **重启两个服务器**：有时简单的重启就能解决大多数问题\n2. **检查控制台日志**：打开浏览器开发者工具查看是否有 JavaScript 错误\n3. **检查 API 日志**：查看运行 API 的终端，寻找 Python 错误\n\n## 🤝 贡献\n\n欢迎贡献！您可以：\n- 打开问题以报告 bug 或提出功能请求\n- 提交拉取请求以改进代码\n- 分享您的反馈和想法\n\n## 📄 许可证\n\n本项目采用 MIT 许可证授权——详情请参阅 [LICENSE](LICENSE) 文件。\n\n## ⭐ 星标历史\n\n[![星标历史图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_readme_415f671142a2.png)](https:\u002F\u002Fstar-history.com\u002F#AsyncFuncAI\u002Fdeepwiki-open&Date)","# DeepWiki-Open 快速上手指南\n\nDeepWiki-Open 是一款开源工具，能够自动分析 GitHub、GitLab 或 BitBucket 仓库的代码结构，利用 AI 生成包含可视化图表（Mermaid）和智能问答功能的交互式 Wiki 文档。\n\n> **⚠️ 重要提示**：本项目目前主要维护状态，核心开发重心已转移至 **[AsyncReview](https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002FAsyncReview\u002F)**。如需最新功能体验，建议关注新仓库。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows (WSL2 推荐)\n*   **容器化方案 (可选但推荐)**：Docker & Docker Compose\n*   **手动部署依赖**：\n    *   Python 3.10+ (需安装 `poetry` 包管理器)\n    *   Node.js 18+ & npm\u002Fyarn\n*   **API 密钥**：至少需要一个大模型服务商的 API Key（支持 Google Gemini, OpenAI, Azure OpenAI, OpenRouter 或本地 Ollama）。\n    *   Google AI Studio: [获取 Key](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey)\n    *   OpenAI Platform: [获取 Key](https:\u002F\u002Fplatform.openai.com\u002Fapi-keys)\n    *   国内用户可使用兼容 OpenAI 格式的第三方服务或部署本地 Ollama。\n\n## 安装步骤\n\n您可以选择 **Docker 部署**（最简单）或 **手动源码部署**。\n\n### 方案一：使用 Docker 部署（推荐）\n\n此方式无需配置复杂的 Python\u002FNode 环境，一键启动。\n\n1.  **克隆项目**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open.git\n    cd deepwiki-open\n    ```\n\n2.  **配置环境变量**\n    创建 `.env` 文件并填入您的 API Key。以下以 Google 和 OpenAI 为例：\n    ```bash\n    echo \"GOOGLE_API_KEY=your_google_api_key\" > .env\n    echo \"OPENAI_API_KEY=your_openai_api_key\" >> .env\n    # 若主要使用 Google 模型，建议指定 Embedding 类型\n    echo \"DEEPWIKI_EMBEDDER_TYPE=google\" >> .env\n    # 若使用 OpenRouter 或 Ollama，可追加相应配置\n    # echo \"OPENROUTER_API_KEY=your_openrouter_api_key\" >> .env\n    # echo \"OLLAMA_HOST=http:\u002F\u002Flocalhost:11434\" >> .env\n    ```\n\n3.  **启动服务**\n    ```bash\n    docker-compose up\n    ```\n\n### 方案二：手动源码部署\n\n适合需要自定义开发或调试的用户。\n\n1.  **配置环境变量**\n    在项目根目录创建 `.env` 文件：\n    ```text\n    GOOGLE_API_KEY=your_google_api_key\n    OPENAI_API_KEY=your_openai_api_key\n    DEEPWIKI_EMBEDDER_TYPE=google\n    # 其他可选配置\n    # OPENROUTER_API_KEY=...\n    # AZURE_OPENAI_API_KEY=...\n    # OLLAMA_HOST=...\n    ```\n\n2.  **启动后端 (API)**\n    ```bash\n    # 安装 Poetry 并安装后端依赖\n    python -m pip install poetry==2.0.1 && poetry install -C api\n\n    # 启动 API 服务\n    python -m api.main\n    ```\n\n3.  **启动前端 (Web)**\n    打开新终端窗口：\n    ```bash\n    # 安装前端依赖\n    npm install\n    # 或 yarn install\n\n    # 启动开发服务器\n    npm run dev\n    # 或 yarn dev\n    ```\n\n## 基本使用\n\n部署完成后，即可开始生成仓库文档。\n\n1.  **访问界面**\n    打开浏览器访问：[http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000)\n\n2.  **输入仓库地址**\n    在输入框中填入目标仓库 URL，支持：\n    *   GitHub: `https:\u002F\u002Fgithub.com\u002Fopenai\u002Fcodex`\n    *   GitLab: `https:\u002F\u002Fgitlab.com\u002Fgitlab-org\u002Fgitlab`\n    *   BitBucket: `https:\u002F\u002Fbitbucket.org\u002Fredradish\u002Fatlassian_app_versions`\n\n3.  **配置私有仓库（可选）**\n    如果是私有仓库，点击页面上的 **\"+ Add access tokens\"** 按钮，输入对应的 Personal Access Token。\n\n4.  **生成 Wiki**\n    点击 **\"Generate Wiki\"** 按钮。系统将自动执行以下流程：\n    *   克隆并分析代码结构\n    *   创建代码向量嵌入 (Embeddings)\n    *   调用 AI 生成文档和 Mermaid 架构图\n    *   组装为可交互的 Wiki 页面\n\n5.  **互动与查询**\n    生成完毕后，您可以：\n    *   浏览自动生成的目录和图表。\n    *   使用右侧 **\"Ask\"** 功能，通过 RAG 技术与代码库对话，询问具体实现细节。\n    *   使用 **\"DeepResearch\"** 功能进行多轮深度调研。","某初创团队刚接手一个由前离职员工留下的复杂 GitHub 私有仓库，需要在三天内理清架构并启动新功能开发，但面对数万行缺乏文档的代码束手无策。\n\n### 没有 deepwiki-open 时\n- 开发人员需逐行阅读源码才能拼凑出模块间的调用关系，耗时数天且极易遗漏关键逻辑。\n- 由于缺乏可视化图表，新人难以理解数据流向和系统架构，导致在代码评审中频繁提出基础性问题。\n- 遇到特定功能实现细节时，只能靠全局搜索关键词盲目猜测，无法获得上下文准确的解释。\n- 团队内部知识传递依赖口口相传或零散的笔记，一旦核心人员缺席，项目进度立即停滞。\n- 编写正式文档被视为“额外负担”，大家宁愿花时间在调试上也不愿整理说明，导致技术债务堆积。\n\n### 使用 deepwiki-open 后\n- 输入仓库地址并配置 Token 后，deepwiki-open 自动分析代码结构，秒级生成包含完整模块说明的交互式维基。\n- 工具自动绘制 Mermaid 架构图和数据流图，让团队成员一眼看清系统全貌，新人上手时间从一周缩短至半天。\n- 利用 RAG 驱动的\"Ask Feature\"，开发者直接用自然语言提问（如“用户认证流程在哪？”），即可获取基于代码上下文的精准答案。\n- 生成的维基支持多轮深度研究（DeepResearch），能自动梳理复杂业务逻辑，形成可传承的结构化知识库。\n- 支持本地 Ollama 模型部署，确保私有代码数据不出内网，既满足了安全合规要求，又实现了文档的持续自动化更新。\n\ndeepwiki-open 将原本需要数周的人工逆向工程工作压缩为分钟级的自动化流程，让团队能立即从“读代码”转向“写代码”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAsyncFuncAI_deepwiki-open_0b890012.png","AsyncFuncAI","ASYNCFUNC","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FAsyncFuncAI_67f8395c.png","",null,"support@asyncfunc.ai","https:\u002F\u002Fasyncfunc.ai","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI",[82,86,90,94,98,102],{"name":83,"color":84,"percentage":85},"Python","#3572A5",52,{"name":87,"color":88,"percentage":89},"TypeScript","#3178c6",46.6,{"name":91,"color":92,"percentage":93},"CSS","#663399",0.8,{"name":95,"color":96,"percentage":97},"Dockerfile","#384d54",0.5,{"name":99,"color":100,"percentage":101},"JavaScript","#f1e05a",0.1,{"name":103,"color":104,"percentage":105},"Shell","#89e051",0,15634,1757,"2026-04-14T14:06:53","MIT","Linux, macOS, Windows","非必需。若使用本地 Ollama 模型，需根据所选模型大小配置相应 GPU 显存；若使用云端 API（Google\u002FOpenAI\u002FAzure）则无 GPU 要求。","未说明（取决于是否运行本地大模型及代码库大小）",{"notes":114,"python":115,"dependencies":116},"1. 该项目采用前后端分离架构：后端使用 Python (Poetry) 和 FastAPI，前端使用 Node.js (npm\u002Fyarn) 和 Next.js。\n2. 主要依赖外部 API 服务（Google Gemini, OpenAI, Azure OpenAI, OpenRouter），需配置对应的 API Key。\n3. 支持完全本地化部署，需自行安装并运行 Ollama 服务来提供本地大模型和 Embedding 能力。\n4. 推荐使用 Docker Compose 一键部署，或手动分别启动后端 (api) 和前端 (src) 服务。\n5. 需要 Git 环境以克隆目标仓库进行分析。","3.8+ (通过 Poetry 管理，具体版本未在文中明确锁定，但 Poetry 2.0.1 通常支持 Python 3.8+)",[117,118,119,120,121],"Poetry==2.0.1","FastAPI","Next.js","React","Ollama (可选)",[13,35,14,15],[124,125,126,127,128,129,130,131,132],"ai","gemini","github","ollama","open-source","openai","openrouter","self-hosted","wiki","2026-03-27T02:49:30.150509","2026-04-15T06:48:56.780410",[136,141,146,151,156,161],{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},33769,"遇到'No valid XML found in response'或'No valid embeddings found'错误该如何解决？","这通常是因为缺少必要的环境变量或嵌入模型配置不兼容。快速启动时，您至少需要在环境变量中配置 `GOOGLE_API_KEY` 和 `OPENAI_API_KEY`。如果您使用的是公司自有的兼容 OpenAI 接口的模型而非官方模型，可能需要修改 `api\u002Fconfig` 文件夹下的 `embedding.json` 和 `generator.json` 文件，将默认的 `text-embedding-small` 替换为您实际使用的嵌入模型名称（例如 Ollama 的 `nomic-embed-text`），以确保项目能正确调用您的本地或私有模型。","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open\u002Fissues\u002F252",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},33770,"在 MacBook ARM64 架构上使用 docker-compose 启动失败或报错怎么办？","在 Mac ARM64 设备上运行时常遇到前端无法连接后端或端口冲突问题。首先，确保 `.env` 文件中明确指定了端口（例如 `PORT=3000` 或您自定义的端口如 `3001`）。如果前端提示连接 localhost 失败，可能是因为容器网络配置问题，社区已有相关修复（PR #31）。此外，日志中关于 'Failed to load GPU Faiss' 的警告在 CPU 环境下是正常的，可以忽略，只要确保 `GOOGLE_API_KEY` 和 `OPENAI_API_KEY` 已正确填入 `.env` 文件即可。","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open\u002Fissues\u002F2",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},33771,"如何集成并使用本地的 Ollama 模型？","该项目支持通过 Ollama 服务器连接本地大语言模型，以实现隐私保护和离线使用。配置时需确保 Ollama 服务正常运行。注意模型选择至关重要：用户反馈显示 `qwen3:4b` 和 `qwen3:14b` 版本工作正常，但 `qwen3:8b` 可能会出现前端报错而无后端日志的情况。如果遇到此类问题，建议尝试更换其他尺寸的模型版本或检查本地模型安装是否完整。","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open\u002Fissues\u002F19",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},33772,"使用本地 Ollama 模型时出现 JSON 解析错误（如 'Expecting property name enclosed in double quotes'）怎么办？","当使用 `adalflow` 解析本地模型（如 Ollama 运行的 qwen3:14b）的输出时，如果模型返回了代码片段或非标准 JSON 格式，会导致解析失败。日志通常会显示系统尝试自动修复缺失的逗号或转义单引号。若自动修复失败，这通常意味着所选模型在生成结构化数据方面表现不佳。建议尝试更换为更擅长遵循指令或输出 JSON 格式的模型版本，或者检查是否使用了正确的解析器配置。","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open\u002Fissues\u002F88",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},33773,"查询仓库时提示'failed to run ada query'错误是什么原因？","该错误有时表现为间歇性问题，可能与浏览器兼容性或临时服务状态有关。用户反馈显示，在 Firefox Developer Edition 等特定浏览器中可能正常工作，而在其他环境（如 Zen Browser）中可能失败。如果之前正常突然报错，且私人浏览模式下问题依旧，建议尝试更换浏览器（如 Chrome 或 Firefox），或者等待一段时间后再试，因为部分用户报告该问题会在几天后自行恢复。","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open\u002Fissues\u002F418",{"id":162,"question_zh":163,"answer_zh":164,"source_url":165},33774,"加载本地文件仓库时报错'No pages found'或路径检查无误仍失败怎么办？","即使确认了本地文件路径正确，如果出现此错误，首要检查项仍然是环境变量配置。维护者指出，必须至少在环境中配置 `gemini api key` 和 `open ai api key` 才能完成初始化和快速启动。如果使用的是非官方 API 提供商，请确保在配置文件中正确映射了嵌入模型，因为默认的嵌入模型请求方法可能不兼容您的中间代理提供商。","https:\u002F\u002Fgithub.com\u002FAsyncFuncAI\u002Fdeepwiki-open\u002Fissues\u002F106",[]]