[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-AutoCodeRoverSG--auto-code-rover":3,"tool-AutoCodeRoverSG--auto-code-rover":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":81,"owner_twitter":80,"owner_website":82,"owner_url":83,"languages":84,"stars":107,"forks":108,"last_commit_at":109,"license":110,"difficulty_score":10,"env_os":111,"env_gpu":112,"env_ram":113,"env_deps":114,"category_tags":123,"github_topics":80,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":124,"updated_at":125,"faqs":126,"releases":161},2962,"AutoCodeRoverSG\u002Fauto-code-rover","auto-code-rover","A project structure aware autonomous software engineer aiming for autonomous program improvement. Resolved 37.3% tasks (pass@1) in SWE-bench lite and 46.2% tasks (pass@1) in SWE-bench verified with each task costs less than $0.7.","AutoCodeRover 是一款具备项目结构感知能力的自主软件工程助手，旨在自动修复代码缺陷并添加新功能。它通过结合大语言模型的分析与调试能力，能够像人类工程师一样理解代码库，定位问题根源并生成修复补丁。\n\n该工具主要解决了传统 AI 在处理复杂代码库时难以精准定位错误、容易忽略上下文关联的痛点。在权威的 SWE-bench 基准测试中，AutoCodeRover 表现卓越，不仅解决了超过 37% 的轻量级任务和 46% 的验证级任务，而且单次任务成本低于 0.7 美元，耗时仅需约 7 分钟，实现了高效与经济性的平衡。\n\nAutoCodeRover 非常适合软件开发者、技术研究人员以及需要维护大型开源项目的团队使用。无论是处理 GitHub 上的现有议题，还是在本地仓库中排查故障，它都能提供强有力的辅助。\n\n其核心技术亮点在于“程序结构感知”的代码搜索机制。不同于传统的字符串匹配，它能深入抽象语法树（AST），精准定位到具体的方法或类，从而获取更相关的代码上下文。此外，当项目包含测试套件时，AutoCodeRover 还能利用统计故障定位技术，进一步提升修复成功率。这使得它在面对真实","AutoCodeRover 是一款具备项目结构感知能力的自主软件工程助手，旨在自动修复代码缺陷并添加新功能。它通过结合大语言模型的分析与调试能力，能够像人类工程师一样理解代码库，定位问题根源并生成修复补丁。\n\n该工具主要解决了传统 AI 在处理复杂代码库时难以精准定位错误、容易忽略上下文关联的痛点。在权威的 SWE-bench 基准测试中，AutoCodeRover 表现卓越，不仅解决了超过 37% 的轻量级任务和 46% 的验证级任务，而且单次任务成本低于 0.7 美元，耗时仅需约 7 分钟，实现了高效与经济性的平衡。\n\nAutoCodeRover 非常适合软件开发者、技术研究人员以及需要维护大型开源项目的团队使用。无论是处理 GitHub 上的现有议题，还是在本地仓库中排查故障，它都能提供强有力的辅助。\n\n其核心技术亮点在于“程序结构感知”的代码搜索机制。不同于传统的字符串匹配，它能深入抽象语法树（AST），精准定位到具体的方法或类，从而获取更相关的代码上下文。此外，当项目包含测试套件时，AutoCodeRover 还能利用统计故障定位技术，进一步提升修复成功率。这使得它在面对真实世界的复杂软件工程挑战时，比通用代码助手更加可靠和智能。","# AutoCodeRover: Autonomous Program Improvement\n\n\u003Cbr>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_readme_d152c2c6bb66.png\" alt=\"autocoderover_logo\" width=\"200px\" height=\"200px\">\n\u003C\u002Fp>\n\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2404.05427\">\u003Cstrong>ArXiv Paper\u003C\u002Fstrong>\u003C\u002Fa>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n  \u003Ca href=\"https:\u002F\u002Fautocoderover.dev\u002F\">\u003Cstrong>Website\u003C\u002Fstrong>\u003C\u002Fa>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FScXsdE49JY\">\u003Cstrong>Discord server\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr>\n\n![overall-workflow](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_readme_1b7d9c582a34.png)\n\n\u003Cbr>\n\n\n> [!NOTE]\n> This is a public version of the AutoCodeRover project. Check the latest results on our [website](https:\u002F\u002Fautocoderover.dev\u002F).\n\n## 📣 Updates\n- [November 21, 2024] AutoCodeRover(v20240620) achieves **46.20%** efficacy on SWE-bench Verified and **24.89%** on full SWE-bench.\n- [August 14, 2024] On the SWE-bench Verified dataset released by OpenAI, AutoCodeRover(v20240620) achieves **38.40%** efficacy, and AutoCodeRover(v20240408) achieves 28.8% efficacy. More details in the [blog post](https:\u002F\u002Fopenai.com\u002Findex\u002Fintroducing-swe-bench-verified\u002F) from OpenAI and [SWE-bench leaderboard](https:\u002F\u002Fwww.swebench.com\u002F).\n- [July 18, 2024] AutoCodeRover now supports a new mode that outputs the list of potential fix locations.\n- [June 20, 2024] AutoCodeRover(v20240620) now achieves **30.67%** efficacy (pass@1) on SWE-bench-lite!\n- [June 08, 2024] Added support for Gemini, Groq (thank you [KasaiHarcore](https:\u002F\u002Fgithub.com\u002FKasaiHarcore) for the contribution!) and Anthropic models through AWS Bedrock (thank you [JGalego](https:\u002F\u002Fgithub.com\u002FJGalego) for the contribution!).\n- [April 29, 2024] Added support for Claude and Llama models. Find the list of supported models [here](#using-a-different-model)! Support for more models coming soon.\n- [April 19, 2024] AutoCodeRover now supports running on [GitHub issues](#github-issue-mode-set-up-and-run-on-new-github-issues) and [local issues](#local-issue-mode-set-up-and-run-on-local-repositories-and-local-issues)! Feel free to try it out and we welcome your feedback!\n\n## [Discord](https:\u002F\u002Fdiscord.gg\u002FScXsdE49JY) - server for general discussion, questions, and feedback.\n\n## 👋 Overview\n\nAutoCodeRover is a fully automated approach for resolving GitHub issues (bug fixing and feature addition) where LLMs are combined with analysis and debugging capabilities to prioritize patch locations ultimately leading to a patch.\n\n[Update on June 20, 2024] AutoCodeRover(v20240620) now resolves **30.67%** of issues (pass@1) in SWE-bench lite! AutoCodeRover achieved this efficacy while being economical - each task costs **less than $0.7** and is completed within **7 mins**!\n\n\u003Cp align=\"center\">\n\u003Cimg src=https:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F16000056\u002F78d184b2-f15c-4408-9eac-cfd3a11a503a width=500\u002F>\n\u003Cimg src=https:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F16000056\u002F83253ae9-8789-474e-942d-708495b5b310 width=500\u002F>\n\u003C\u002Fp>\n\n[April 08, 2024] First release of AutoCodeRover(v20240408) resolves **19%** of issues in [SWE-bench lite](https:\u002F\u002Fwww.swebench.com\u002Flite.html) (pass@1), improving over the current state-of-the-art efficacy of AI software engineers.\n\n\nAutoCodeRover works in two stages:\n\n- 🔎 Context retrieval: The LLM is provided with code search APIs to navigate the codebase and collect relevant context.\n- 💊 Patch generation: The LLM tries to write a patch, based on retrieved context.\n\n### ✨ Highlights\n\nAutoCodeRover has two unique features:\n\n- Code search APIs are *Program Structure Aware*. Instead of searching over files by plain string matching, AutoCodeRover searches for relevant code context (methods\u002Fclasses) in the abstract syntax tree.\n- When a test suite is available, AutoCodeRover can take advantage of test cases to achieve an even higher repair rate, by performing *statistical fault localization*.\n\n## 🗎 arXiv Paper\n### AutoCodeRover: Autonomous Program Improvement [[arXiv 2404.05427]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2404.05427)\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2404.05427\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_readme_9aa179e8d8b7.png\" alt=\"First page of arXiv paper\" width=\"570\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\nFor referring to our work, please cite and mention:\n```\n@inproceedings{zhang2024autocoderover,\n    author = {Zhang, Yuntong and Ruan, Haifeng and Fan, Zhiyu and Roychoudhury, Abhik},\n    title = {AutoCodeRover: Autonomous Program Improvement},\n    year = {2024},\n    isbn = {9798400706127},\n    publisher = {Association for Computing Machinery},\n    address = {New York, NY, USA},\n    url = {https:\u002F\u002Fdoi.org\u002F10.1145\u002F3650212.3680384},\n    doi = {10.1145\u002F3650212.3680384},\n    booktitle = {Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis},\n    pages = {1592–1604},\n    numpages = {13},\n    keywords = {automatic program repair, autonomous software engineering, autonomous software improvement, large language model},\n    location = {Vienna, Austria},\n    series = {ISSTA 2024}\n}\n```\n\n## ✔️ Example: Django Issue #32347\n\nAs an example, AutoCodeRover successfully fixed issue [#32347](https:\u002F\u002Fcode.djangoproject.com\u002Fticket\u002F32347) of Django. See the demo video for the full process:\n\nhttps:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F48704330\u002F719c7a56-40b8-4f3d-a90e-0069e37baad3\n\n### Enhancement: leveraging test cases\n\nAutoCodeRover can resolve even more issues, if test cases are available. See an example in the video:\n\nhttps:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F48704330\u002F26c9d5d4-04e0-4b98-be55-61c1d10a36e5\n\n## 🚀 Setup & Running\n\n### Setup API key and environment\n\nWe recommend running AutoCodeRover in a Docker container.\n\nSet the `OPENAI_KEY` env var to your [OpenAI key](https:\u002F\u002Fhelp.openai.com\u002Fen\u002Farticles\u002F4936850-where-do-i-find-my-openai-api-key):\n\n```\nexport OPENAI_KEY=sk-YOUR-OPENAI-API-KEY-HERE\n```\n\nFor Anthropic model, Set the `ANTHROPIC_API_KEY` env var can be found [here](https:\u002F\u002Fdocs.anthropic.com\u002Fclaude\u002Freference\u002Fgetting-started-with-the-api)\n\n```\nexport ANTHROPIC_API_KEY=sk-ant-api...\n```\n\nThe same with `GROQ_API_KEY`\n\nBuild and start the docker image for the AutoCodeRover tool:\n\n```\ndocker build -f Dockerfile.minimal -t acr .\ndocker run -it -e OPENAI_KEY=\"${OPENAI_KEY:-OPENAI_API_KEY}\" acr\n```\n\n### Setup: local mode\n\nAlternatively, you can have a local copy of AutoCodeRover and manage python dependencies with `environment.yml`.\nThis is the recommended setup for running SWE-bench experiments with AutoCodeRover.\nWith a working conda installation, do `conda env create -f environment.yml`.\nSimilarly, set `OPENAI_KEY` or `ANTHROPIC_API_KEY` in your shell before running AutoCodeRover.\n\n## Running AutoCodeRover\n\nYou can run AutoCodeRover in three modes:\n\n1. GitHub issue mode: Run ACR on a live GitHub issue by providing a link to the issue page.\n2. Local issue mode: Run ACR on a local repository and a file containing the issue description.\n3. SWE-bench mode: Run ACR on SWE-bench task instances. (local setup of ACR recommend.)\n\n### [GitHub issue mode] Set up and run on new GitHub issues\n\nIf you want to use AutoCodeRover for new GitHub issues in a project, prepare the following:\n\n- Link to clone the project (used for `git clone ...`).\n- Commit hash of the project version for AutoCodeRover to work on (used for `git checkout ...`).\n- Link to the GitHub issue page.\n\nThen, in the docker container (or your local copy of AutoCodeRover), run the following commands to set up the target project\nand generate patch:\n\n```\ncd \u002Fopt\u002Fauto-code-rover\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py github-issue --output-dir output --setup-dir setup --model gpt-4o-2024-05-13 --model-temperature 0.2 --task-id \u003Ctask id> --clone-link \u003Clink for cloning the project> --commit-hash \u003Cany version that has the issue> --issue-link \u003Clink to issue page>\n```\nHere is an example command for running ACR on an issue from the langchain GitHub issue tracker:\n\n```\nPYTHONPATH=. python app\u002Fmain.py github-issue --output-dir output --setup-dir setup --model gpt-4o-2024-05-13 --model-temperature 0.2 --task-id langchain-20453 --clone-link https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain.git --commit-hash cb6e5e5 --issue-link https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain\u002Fissues\u002F20453\n```\n\nThe `\u003Ctask id>` can be any string used to identify this issue.\n\nIf patch generation is successful, the path to the generated patch will be written to a file named `selected_patch.json` in the output directory.\n\n### [Local issue mode] Set up and run on local repositories and local issues\n\nInstead of cloning a remote project and run ACR on an online issue, you can also prepare the local repository and issue beforehand,\nif that suits the use case.\n\nFor running ACR on a local issue and local codebase, prepare a local codebase and write an issue description into a file,\nand run the following commands:\n\n```\ncd \u002Fopt\u002Fauto-code-rover\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py local-issue --output-dir output --model gpt-4o-2024-05-13 --model-temperature 0.2 --task-id \u003Ctask id> --local-repo \u003Cpath to the local project repository> --issue-file \u003Cpath to the file containing issue description>\n```\n\nIf patch generation is successful, the path to the generated patch will be written to a file named `selected_patch.json` in the output directory.\n\n### [SWE-bench mode] Set up and run on SWE-bench tasks\n\nThis mode is for running ACR on existing issue tasks contained in SWE-bench.\n\n#### Set up\n\n##### Install SWE-bench Docker\n\nWe use a [fork](https:\u002F\u002Fgithub.com\u002Fnus-apr\u002FSWE-bench-docker) of [SWE-bench docker](https:\u002F\u002Fgithub.com\u002Faorwall\u002FSWE-bench-docker) to run regression tests (not `FAIL_TO_PASS` tests, but all the tests in the buggy programs). To install this, run\n\n```\nconda activate auto-code-rover\ngit submodule update --init --recursive\ncd SWE-bench-docker\npip install .\n```\n\n##### Setting up Testbed\n\nFor SWE-bench mode, we recommend setting up ACR on a host machine, instead of running it in docker mode.\n\nFirstly, set up the SWE-bench task instances locally.\n\n1. Clone [this SWE-bench fork](https:\u002F\u002Fgithub.com\u002Fyuntongzhang\u002FSWE-bench) and follow the [installation instruction](https:\u002F\u002Fgithub.com\u002Fyuntongzhang\u002FSWE-bench?tab=readme-ov-file#to-install) to install dependencies.\n\n2. Put the tasks to be run into a file, one per line:\n\n```\ncd \u003CSWE-bench-path>\necho django__django-11133 > tasks.txt\n```\n\nOr if running on arm64 (e.g. Apple silicon), try this one which doesn't depend on Python 3.6 (which isn't supported in this env):\n\n```\necho django__django-16041 > tasks.txt\n```\n\nThen, set up these tasks by running:\n3. Set up these tasks in the file by running:\n\n```\ncd \u003CSWE-bench-path>\nconda activate swe-bench\npython harness\u002Frun_setup.py --log_dir logs --testbed testbed --result_dir setup_result --subset_file tasks.txt\n```\n\nOnce the setup for this task is completed, the following two lines will be printed:\n\n```\nsetup_map is saved to setup_result\u002Fsetup_map.json\ntasks_map is saved to setup_result\u002Ftasks_map.json\n```\n\nThe `testbed` directory will now contain the cloned source code of the target project.\nA conda environment will also be created for this task instance.\n\n_If you want to set up multiple tasks together, put multiple ids in `tasks.txt` and follow the same steps._\n\n#### Run a single task in SWE-bench\n\nBefore running the task (`django__django-11133` here), make sure it has been set up as mentioned [above](#set-up-one-or-more-tasks-in-swe-bench).\n\n```\ncd \u003CAutoCodeRover-path>\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py swe-bench --model gpt-4o-2024-05-13 --setup-map \u003CSWE-bench-path>\u002Fsetup_result\u002Fsetup_map.json --tasks-map \u003CSWE-bench-path>\u002Fsetup_result\u002Ftasks_map.json --output-dir output --task django__django-11133\n```\n\nThe output for a run (e.g. for `django__django-11133`) can be found at a location like this: `output\u002Fapplicable_patch\u002Fdjango__django-11133_yyyy-MM-dd_HH-mm-ss\u002F` (the date-time field in the directory name will be different depending on when the experiment was run).\n\nPath to the final generated patch is written in a file named `selected_patch.json` in the output directory.\n\n#### Run multiple tasks in SWE-bench\n\nFirst, put the id's of all tasks to run in a file, one per line. Suppose this file is `tasks.txt`, the tasks can be run with\n\n```\ncd \u003CAutoCodeRover-path>\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py swe-bench --model gpt-4o-2024-05-13 --setup-map \u003CSWE-bench-path>\u002Fsetup_result\u002Fsetup_map.json --tasks-map \u003CSWE-bench-path>\u002Fsetup_result\u002Ftasks_map.json --output-dir output --task-list-file \u003CSWE-bench-path>\u002Ftasks.txt\n```\n\n**NOTE**: make sure that the tasks in `tasks.txt` have all been set up in SWE-bench. See the steps [above](#set-up-one-or-more-tasks-in-swe-bench).\n\n#### Using a config file\n\nAlternatively, a config file can be used to specify all parameters and tasks to run. See `conf\u002Fexample.conf` for an example.\nAlso see [EXPERIMENT.md](EXPERIMENT.md) for the details of the items in a conf file.\nA config file can be used by:\n\n```\npython scripts\u002Frun.py conf\u002Fexample.conf\n```\n\n### Using a different model\n\nAutoCodeRover works with different foundation models. You can set the foundation model to be used with the `--model` command line argument.\n\nThe current list of supported models:\n\n|  | Model | AutoCodeRover cmd line argument |\n|:--------------:|---------------|--------------|\n| OpenAI         | gpt-4o-2024-08-06      | --model gpt-4o-2024-08-06 |\n|                | gpt-4o-2024-05-13      | --model gpt-4o-2024-05-13 |\n|                | gpt-4-turbo-2024-04-09 | --model gpt-4-turbo-2024-04-09 |\n|                | gpt-4-0125-preview     | --model gpt-4-0125-preview |\n|                | gpt-4-1106-preview     | --model gpt-4-1106-preview |\n|                | gpt-3.5-turbo-0125     | --model gpt-3.5-turbo-0125 |\n|                | gpt-3.5-turbo-1106     | --model gpt-3.5-turbo-1106 |\n|                | gpt-3.5-turbo-16k-0613 | --model gpt-3.5-turbo-16k-0613 |\n|                | gpt-3.5-turbo-0613     | --model gpt-3.5-turbo-0613 |\n|                | gpt-4-0613             | --model gpt-4-0613 |\n| Anthropic      | Claude 3.5 Sonnet v2   | --model claude-3-5-sonnet-20241022 |\n|                | Claude 3.5 Sonnet      | --model claude-3-5-sonnet-20240620 |\n|                | Claude 3 Opus          | --model claude-3-opus-20240229 |\n|                | Claude 3 Sonnet        | --model claude-3-sonnet-20240229 |\n|                | Claude 3 Haiku         | --model claude-3-haiku-20240307 |\n| Meta           | Llama 3 70B            | --model llama3:70b |\n|                | Llama 3 8B             | --model llama3     |\n| AWS Bedrock    | Claude 3 Opus          | --model bedrock\u002Fanthropic.claude-3-opus-20240229-v1:0 |\n|                | Claude 3 Sonnet        | --model bedrock\u002Fanthropic.claude-3-sonnet-20240229-v1:0 |\n|                | Claude 3 Haiku         | --model bedrock\u002Fanthropic.claude-3-haiku-20240307-v1:0 |\n|                | Claude 3.5 Sonnet      | --model bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0 |\n|                | Nova Pro               | --model bedrock\u002Fus.amazon.nova-pro-v1:0 |\n|                | Nova Lite              | --model bedrock\u002Fus.amazon.nova-lite-v1:0 |\n|                | Nova Micro             | --model bedrock\u002Fus.amazon.nova-micro-v1:0 |\n| LiteLLM        | Any LiteLLM model      | --model litellm-generic-\u003CMODEL_NAME_HERE> |\n| Groq           | Llama 3 8B             | --model groq\u002Fllama3-8b-8192 |\n|                | Llama 3 70B            | --model groq\u002Fllama3-70b-8192 |\n|                | Llama 2 70B            | --model groq\u002Fllama2-70b-4096 |\n|                | Mixtral 8x7B           | --model groq\u002Fmixtral-8x7b-32768 |\n|                | Gemma 7B               | --model groq\u002Fgemma-7b-it |\n\n\n> [!NOTE]\n> Using the Groq models on a free plan can cause the context limit to be exceeded, even on simple issues.\n\n> [!NOTE]\n> Some notes on running ACR with local models such as llama3:\n> 1. Before using the llama3 models, please [install ollama](https:\u002F\u002Follama.com\u002Fdownload\u002Flinux) and download the corresponding models with ollama (e.g. `ollama pull llama3`).\n> 2. You can run ollama server on the host machine, and ACR in its container. ACR will attempt to communicate to the ollama server on host.\n> 3. If your setup is ollama in host + ACR in its container, we recommend installing [Docker Desktop](https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002F) on the host, in addition to the [Docker Engine](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002F).\n>     - Docker Desktop contains Docker Engine, and also has a virtual machine which makes it easier to access the host ports from within a container. With Docker Desktop, this setup will work without additional effort.\n>     - When the docker installation is only Docker Engine, you may need to add either `--net=host` or `--add-host host.docker.internal=host-gateway` to the `docker run` command when starting the ACR container, so that ACR can communicate with the ollama server on the host machine.\n> If you encounter any issue in the tool or experiment, you can contact us via email at ridwan.shariffdeen@sonarsource.com, or through our [discord server](https:\u002F\u002Fdiscord.com\u002Finvite\u002FScXsdE49JY).\n\n## Experiment Replication\n\nPlease refer to [EXPERIMENT.md](EXPERIMENT.md) for information on experiment replication.\n\n## Testing\n\nPlease refer to [TESTING.md](TESTING.md) for information on setting up and running tests.\n\n## ✉️ Contacts\n\nFor any queries, you are welcome to open an issue.\nAlternatively, contact us at acr@sonarsource.com\n\n\n## Acknowledgements\n\nThis work was partially supported by a Singapore Ministry of Education (MoE) Tier 3 grant \"Automated Program Repair\", MOE-MOET32021-0001.\n","# AutoCodeRover：自主程序改进\n\n\u003Cbr>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_readme_d152c2c6bb66.png\" alt=\"autocoderover_logo\" width=\"200px\" height=\"200px\">\n\u003C\u002Fp>\n\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2404.05427\">\u003Cstrong>ArXiv论文\u003C\u002Fstrong>\u003C\u002Fa>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n  \u003Ca href=\"https:\u002F\u002Fautocoderover.dev\u002F\">\u003Cstrong>官网\u003C\u002Fstrong>\u003C\u002Fa>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FScXsdE49JY\">\u003Cstrong>Discord服务器\u003C\u002Fstrong>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr>\n\n![overall-workflow](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_readme_1b7d9c582a34.png)\n\n\u003Cbr>\n\n\n> [!NOTE]\n> 这是AutoCodeRover项目的公开版本。请访问我们的[官网](https:\u002F\u002Fautocoderover.dev\u002F)查看最新成果。\n\n## 📣 更新\n- [2024年11月21日] AutoCodeRover(v20240620)在SWE-bench Verified数据集上的有效率为**46.20%**，在完整SWE-bench数据集上为**24.89%**。\n- [2024年8月14日] 在OpenAI发布的SWE-bench Verified数据集上，AutoCodeRover(v20240620)的有效率为**38.40%**，而AutoCodeRover(v20240408)的有效率为28.8%。更多详情请参阅OpenAI的[博客文章](https:\u002F\u002Fopenai.com\u002Findex\u002Fintroducing-swe-bench-verified\u002F)和[SWE-bench排行榜](https:\u002F\u002Fwww.swebench.com\u002F)。\n- [2024年7月18日] AutoCodeRover现在支持一种新模式，可输出潜在修复位置的列表。\n- [2024年6月20日] AutoCodeRover(v20240620)在SWE-bench-lite上的有效率（pass@1）已达到**30.67%**！\n- [2024年6月8日] 增加了对Gemini、Groq（感谢[KasaiHarcore](https:\u002F\u002Fgithub.com\u002FKasaiHarcore)的贡献！）以及Anthropic模型的支持，通过AWS Bedrock实现（感谢[JGalego](https:\u002F\u002Fgithub.com\u002FJGalego)的贡献！）。\n- [2024年4月29日] 增加了对Claude和Llama模型的支持。受支持的模型列表请见[此处](#using-a-different-model)! 更多模型的支持即将推出。\n- [2024年4月19日] AutoCodeRover现在支持在[GitHub问题](#github-issue-mode-set-up-and-run-on-new-github-issues)和[本地问题](#local-issue-mode-set-up-and-run-on-local-repositories-and-local-issues)上运行！欢迎试用，并期待您的反馈！\n\n## [Discord](https:\u002F\u002Fdiscord.gg\u002FScXsdE49JY) - 用于一般讨论、提问和反馈的服务器。\n\n## 👋 概述\n\nAutoCodeRover是一种全自动的GitHub问题解决方法（包括错误修复和功能添加），它将大语言模型与分析和调试能力相结合，以优先确定补丁位置，最终生成补丁。\n\n[2024年6月20日更新] AutoCodeRover(v20240620)现在可以在SWE-bench lite中解决**30.67%**的问题（pass@1）！AutoCodeRover在实现这一效果的同时还非常经济高效——每项任务的成本低于**0.7美元**，且完成时间不超过**7分钟**！\n\n\u003Cp align=\"center\">\n\u003Cimg src=https:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F16000056\u002F78d184b2-f15c-4408-9eac-cfd3a11a503a width=500\u002F>\n\u003Cimg src=https:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F16000056\u002F83253ae9-8789-474e-942d-708495b5b310 width=500\u002F>\n\u003C\u002Fp>\n\n[2024年4月8日] AutoCodeRover(v20240408)首次发布，在[SWE-bench lite](https:\u002F\u002Fwww.swebench.com\u002Flite.html)中解决了**19%**的问题（pass@1），其性能超越了当前最先进的AI软件工程师水平。\n\n\nAutoCodeRover分为两个阶段：\n\n- 🔎 上下文检索：LLM通过代码搜索API导航代码库并收集相关上下文。\n- 💊 补丁生成：LLM基于检索到的上下文尝试编写补丁。\n\n### ✨ 亮点\n\nAutoCodeRover具有两项独特特性：\n\n- 代码搜索API具备*程序结构感知*能力。不同于简单的字符串匹配式文件搜索，AutoCodeRover会在抽象语法树中查找相关的代码上下文（方法\u002F类）。\n- 当存在测试套件时，AutoCodeRover可以利用测试用例进行*统计故障定位*，从而进一步提高修复成功率。\n\n## 🗎 arXiv论文\n### AutoCodeRover：自主程序改进 [[arXiv 2404.05427]](https:\u002F\u002Farxiv.org\u002Fabs\u002F2404.05427)\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2404.05427\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_readme_9aa179e8d8b7.png\" alt=\"arXiv论文首页\" width=\"570\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n如需引用本工作，请注明：\n```\n@inproceedings{zhang2024autocoderover,\n    author = {Zhang, Yuntong and Ruan, Haifeng and Fan, Zhiyu and Roychoudhury, Abhik},\n    title = {AutoCodeRover: Autonomous Program Improvement},\n    year = {2024},\n    isbn = {9798400706127},\n    publisher = {Association for Computing Machinery},\n    address = {New York, NY, USA},\n    url = {https:\u002F\u002Fdoi.org\u002F10.1145\u002F3650212.3680384},\n    doi = {10.1145\u002F3650212.3680384},\n    booktitle = {Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis},\n    pages = {1592–1604},\n    numpages = {13},\n    keywords = {automatic program repair, autonomous software engineering, autonomous software improvement, large language model},\n    location = {Vienna, Austria},\n    series = {ISSTA 2024}\n}\n```\n\n## ✔️ 示例：Django Issue #32347\n\n作为示例，AutoCodeRover成功修复了Django的[#32347号问题](https:\u002F\u002Fcode.djangoproject.com\u002Fticket\u002F32347)。完整的流程请观看演示视频：\n\nhttps:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F48704330\u002F719c7a56-40b8-4f3d-a90e-0069e37baad3\n\n### 增强功能：利用测试用例\n\n如果提供测试用例，AutoCodeRover可以解决更多的问题。请参阅视频中的示例：\n\nhttps:\u002F\u002Fgithub.com\u002Fnus-apr\u002Fauto-code-rover\u002Fassets\u002F48704330\u002F26c9d5d4-04e0-4b98-be55-61c1d10a36e5\n\n## 🚀 设置与运行\n\n### 设置API密钥和环境变量\n\n我们建议在Docker容器中运行AutoCodeRover。\n\n将`OPENAI_KEY`环境变量设置为您的[OpenAI密钥](https:\u002F\u002Fhelp.openai.com\u002Fen\u002Farticles\u002F4936850-where-do-i-find-my-openai-api-key)：\n\n```\nexport OPENAI_KEY=sk-YOUR-OPENAI-API-KEY-HERE\n```\n\n对于Anthropic模型，请设置`ANTHROPIC_API_KEY`环境变量，该密钥可在[这里](https:\u002F\u002Fdocs.anthropic.com\u002Fclaude\u002Freference\u002Fgetting-started-with-the-api)找到：\n\n```\nexport ANTHROPIC_API_KEY=sk-ant-api...\n```\n\n同样地，设置`GROQ_API_KEY`。\n\n构建并启动AutoCodeRover工具的Docker镜像：\n\n```\ndocker build -f Dockerfile.minimal -t acr .\ndocker run -it -e OPENAI_KEY=\"${OPENAI_KEY:-OPENAI_API_KEY}\" acr\n```\n\n### 设置：本地模式\n\n或者，您也可以拥有AutoCodeRover的本地副本，并使用`environment.yml`管理Python依赖。这是运行SWE-bench实验时推荐的设置。在安装好conda的情况下，执行`conda env create -f environment.yml`即可。同样地，在运行AutoCodeRover之前，请在您的shell中设置`OPENAI_KEY`或`ANTHROPIC_API_KEY`。\n\n## 运行 AutoCodeRover\n\n您可以通过三种模式运行 AutoCodeRover：\n\n1. GitHub 问题模式：通过提供问题页面的链接，在实时的 GitHub 问题上运行 ACR。\n2. 本地问题模式：在本地仓库和包含问题描述的文件上运行 ACR。\n3. SWE-bench 模式：在 SWE-bench 任务实例上运行 ACR。（建议使用 ACR 的本地部署。）\n\n### [GitHub 问题模式] 在新的 GitHub 问题上设置并运行\n\n如果您希望在某个项目的新的 GitHub 问题上使用 AutoCodeRover，请准备以下内容：\n\n- 用于 `git clone ...` 的项目克隆链接。\n- AutoCodeRover 将要处理的项目版本的提交哈希值（用于 `git checkout ...`）。\n- GitHub 问题页面的链接。\n\n然后，在 Docker 容器中（或您的 AutoCodeRover 本地副本中），运行以下命令以设置目标项目并生成补丁：\n\n```\ncd \u002Fopt\u002Fauto-code-rover\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py github-issue --output-dir output --setup-dir setup --model gpt-4o-2024-05-13 --model-temperature 0.2 --task-id \u003Ctask id> --clone-link \u003Clink for cloning the project> --commit-hash \u003Cany version that has the issue> --issue-link \u003Clink to issue page>\n```\n\n以下是针对 langchain GitHub 问题跟踪器中的一个问题运行 ACR 的示例命令：\n\n```\nPYTHONPATH=. python app\u002Fmain.py github-issue --output-dir output --setup-dir setup --model gpt-4o-2024-05-13 --model-temperature 0.2 --task-id langchain-20453 --clone-link https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain.git --commit-hash cb6e5e5 --issue-link https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain\u002Fissues\u002F20453\n```\n\n`\u003Ctask id>` 可以是任何用于标识该问题的字符串。\n\n如果补丁生成成功，生成的补丁路径将被写入输出目录下的 `selected_patch.json` 文件中。\n\n### [本地问题模式] 在本地仓库和本地问题上设置并运行\n\n除了克隆远程项目并在在线问题上运行 ACR 外，您也可以根据使用场景提前准备好本地仓库和问题。\n\n要在本地代码库和本地问题上运行 ACR，请准备一个本地代码库，并将问题描述写入文件，然后运行以下命令：\n\n```\ncd \u002Fopt\u002Fauto-code-rover\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py local-issue --output-dir output --model gpt-4o-2024-05-13 --model-temperature 0.2 --task-id \u003Ctask id> --local-repo \u003Cpath to the local project repository> --issue-file \u003Cpath to the file containing issue description>\n```\n\n如果补丁生成成功，生成的补丁路径将被写入输出目录下的 `selected_patch.json` 文件中。\n\n### [SWE-bench 模式] 在 SWE-bench 任务上设置并运行\n\n此模式用于在 SWE-bench 中包含的现有问题任务上运行 ACR。\n\n#### 设置\n\n##### 安装 SWE-bench Docker\n\n我们使用 [SWE-bench docker](https:\u002F\u002Fgithub.com\u002Faorwall\u002FSWE-bench-docker) 的一个 [分支](https:\u002F\u002Fgithub.com\u002Fnus-apr\u002FSWE-bench-docker)，以运行回归测试（不是 `FAIL_TO_PASS` 测试，而是包含在有缺陷程序中的所有测试）。要安装它，请运行：\n\n```\nconda activate auto-code-rover\ngit submodule update --init --recursive\ncd SWE-bench-docker\npip install .\n```\n\n##### 设置测试环境\n\n对于 SWE-bench 模式，我们建议在主机上设置 ACR，而不是在 Docker 模式下运行。\n\n首先，在本地设置 SWE-bench 任务实例。\n\n1. 克隆 [这个 SWE-bench 分支](https:\u002F\u002Fgithub.com\u002Fyuntongzhang\u002FSWE-bench)，并按照 [安装说明](https:\u002F\u002Fgithub.com\u002Fyuntongzhang\u002FSWE-bench?tab=readme-ov-file#to-install) 安装依赖项。\n\n2. 将要运行的任务逐行放入一个文件中：\n\n```\ncd \u003CSWE-bench-path>\necho django__django-11133 > tasks.txt\n```\n\n或者，如果在 arm64 架构上运行（例如 Apple Silicon），可以尝试这个不依赖于 Python 3.6 的版本（该版本在此环境中不受支持）：\n\n```\necho django__django-16041 > tasks.txt\n```\n\n然后，通过运行以下命令来设置这些任务：\n\n3. 通过运行以下命令设置文件中的任务：\n\n```\ncd \u003CSWE-bench-path>\nconda activate swe-bench\npython harness\u002Frun_setup.py --log_dir logs --testbed testbed --result_dir setup_result --subset_file tasks.txt\n```\n\n一旦该任务的设置完成，将打印出以下两行：\n\n```\nsetup_map is saved to setup_result\u002Fsetup_map.json\ntasks_map is saved to setup_result\u002Ftasks_map.json\n```\n\n此时，`testbed` 目录将包含目标项目的克隆源代码。同时，也会为该任务实例创建一个 Conda 环境。\n\n_如果您想同时设置多个任务，只需将多个 ID 放入 `tasks.txt` 文件中，并按照相同的步骤操作。_\n\n#### 在 SWE-bench 中运行单个任务\n\n在运行任务（此处为 `django__django-11133`）之前，请确保已按照[上述](#set-up-one-or-more-tasks-in-swe-bench)方法完成设置。\n\n```\ncd \u003CAutoCodeRover-path>\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py swe-bench --model gpt-4o-2024-05-13 --setup-map \u003CSWE-bench-path>\u002Fsetup_result\u002Fsetup_map.json --tasks-map \u003CSWE-bench-path>\u002Fsetup_result\u002Ftasks_map.json --output-dir output --task django__django-11133\n```\n\n运行结果（例如针对 `django__django-11133`）可以在类似以下位置找到：`output\u002Fapplicable_patch\u002Fdjango__django-11133_yyyy-MM-dd_HH-mm-ss\u002F`（目录名中的日期时间字段会根据实验运行时间而有所不同）。\n\n最终生成的补丁路径会被写入输出目录下的 `selected_patch.json` 文件中。\n\n#### 在 SWE-bench 中运行多个任务\n\n首先，将所有要运行的任务 ID 逐行放入一个文件中。假设该文件名为 `tasks.txt`，则可以通过以下命令运行这些任务：\n\n```\ncd \u003CAutoCodeRover-path>\nconda activate auto-code-rover\nPYTHONPATH=. python app\u002Fmain.py swe-bench --model gpt-4o-2024-05-13 --setup-map \u003CSWE-bench-path>\u002Fsetup_result\u002Fsetup_map.json --tasks-map \u003CSWE-bench-path>\u002Fsetup_result\u002Ftasks_map.json --output-dir output --task-list-file \u003CSWE-bench-path>\u002Ftasks.txt\n```\n\n**注意**：请确保 `tasks.txt` 中的所有任务都已在 SWE-bench 中完成设置。请参阅[上述](#set-up-one-or-more-tasks-in-swe-bench)步骤。\n\n#### 使用配置文件\n\n此外，您还可以使用配置文件来指定所有参数和要运行的任务。有关示例，请参阅 `conf\u002Fexample.conf`。更多关于配置文件中各项内容的详细信息，请参阅 `EXPERIMENT.md`。可以通过以下方式使用配置文件：\n\n```\npython scripts\u002Frun.py conf\u002Fexample.conf\n```\n\n### 使用不同的模型\n\nAutoCodeRover 支持多种基础模型。您可以通过 `--model` 命令行参数来指定要使用的基础模型。\n\n当前支持的模型列表如下：\n\n|  | 模型 | AutoCodeRover 命令行参数 |\n|:--------------:|---------------|--------------|\n| OpenAI         | gpt-4o-2024-08-06      | --model gpt-4o-2024-08-06 |\n|                | gpt-4o-2024-05-13      | --model gpt-4o-2024-05-13 |\n|                | gpt-4-turbo-2024-04-09 | --model gpt-4-turbo-2024-04-09 |\n|                | gpt-4-0125-preview     | --model gpt-4-0125-preview |\n|                | gpt-4-1106-preview     | --model gpt-4-1106-preview |\n|                | gpt-3.5-turbo-0125     | --model gpt-3.5-turbo-0125 |\n|                | gpt-3.5-turbo-1106     | --model gpt-3.5-turbo-1106 |\n|                | gpt-3.5-turbo-16k-0613 | --model gpt-3.5-turbo-16k-0613 |\n|                | gpt-3.5-turbo-0613     | --model gpt-3.5-turbo-0613 |\n|                | gpt-4-0613             | --model gpt-4-0613 |\n| Anthropic      | Claude 3.5 Sonnet v2   | --model claude-3-5-sonnet-20241022 |\n|                | Claude 3.5 Sonnet      | --model claude-3-5-sonnet-20240620 |\n|                | Claude 3 Opus          | --model claude-3-opus-20240229 |\n|                | Claude 3 Sonnet        | --model claude-3-sonnet-20240229 |\n|                | Claude 3 Haiku         | --model claude-3-haiku-20240307 |\n| Meta           | Llama 3 70B            | --model llama3:70b |\n|                | Llama 3 8B             | --model llama3     |\n| AWS Bedrock    | Claude 3 Opus          | --model bedrock\u002Fanthropic.claude-3-opus-20240229-v1:0 |\n|                | Claude 3 Sonnet        | --model bedrock\u002Fanthropic.claude-3-sonnet-20240229-v1:0 |\n|                | Claude 3 Haiku         | --model bedrock\u002Fanthropic.claude-3-haiku-20240307-v1:0 |\n|                | Claude 3.5 Sonnet      | --model bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0 |\n|                | Nova Pro               | --model bedrock\u002Fus.amazon.nova-pro-v1:0 |\n|                | Nova Lite              | --model bedrock\u002Fus.amazon.nova-lite-v1:0 |\n|                | Nova Micro             | --model bedrock\u002Fus.amazon.nova-micro-v1:0 |\n| LiteLLM        | 任何 LiteLLM 模型      | --model litellm-generic-\u003CMODEL_NAME_HERE> |\n| Groq           | Llama 3 8B             | --model groq\u002Fllama3-8b-8192 |\n|                | Llama 3 70B            | --model groq\u002Fllama3-70b-8192 |\n|                | Llama 2 70B            | --model groq\u002Fllama2-70b-4096 |\n|                | Mixtral 8x7B           | --model groq\u002Fmixtral-8x7b-32768 |\n|                | Gemma 7B               | --model groq\u002Fgemma-7b-it |\n\n\n> [!注意]\n> 在免费套餐下使用 Groq 模型可能会导致上下文限制被超出，即使是在处理简单问题时也是如此。\n\n> [!注意]\n> 关于使用本地模型（如 llama3）运行 ACR 的一些说明：\n> 1. 在使用 llama3 模型之前，请先[安装 Ollama](https:\u002F\u002Follama.com\u002Fdownload\u002Flinux)，并使用 Ollama 下载相应的模型（例如 `ollama pull llama3`）。\n> 2. 您可以在宿主机上运行 Ollama 服务器，同时在容器中运行 ACR。ACR 将尝试与宿主机上的 Ollama 服务器进行通信。\n> 3. 如果您的设置是宿主机上运行 Ollama，而 ACR 在容器中运行，我们建议您在宿主机上除了安装 [Docker Engine](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002F) 外，还安装 [Docker Desktop](https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002F)。\n>     - Docker Desktop 包含 Docker Engine，并且自带虚拟机，这使得容器内更容易访问宿主机的端口。使用 Docker Desktop，这种设置无需额外操作即可正常工作。\n>     - 如果仅安装了 Docker Engine，在启动 ACR 容器时，您可能需要在 `docker run` 命令中添加 `--net=host` 或 `--add-host host.docker.internal=host-gateway` 参数，以便 ACR 能够与宿主机上的 Ollama 服务器通信。\n> 如果您在使用工具或实验过程中遇到任何问题，可以通过电子邮件 ridwan.shariffdeen@sonarsource.com 或通过我们的 [Discord 服务器](https:\u002F\u002Fdiscord.com\u002Finvite\u002FScXsdE49JY) 联系我们。\n\n## 实验复现\n\n有关实验复现的信息，请参阅 [EXPERIMENT.md](EXPERIMENT.md)。\n\n## 测试\n\n有关设置和运行测试的信息，请参阅 [TESTING.md](TESTING.md)。\n\n## ✉️ 联系方式\n\n如有任何疑问，欢迎提交问题。您也可以通过 acr@sonarsource.com 与我们联系。\n\n\n## 致谢\n\n本研究部分得到了新加坡教育部 (MoE) Tier 3 资助项目“自动化程序修复”(MOE-MOET32021-0001) 的支持。","# AutoCodeRover 快速上手指南\n\nAutoCodeRover 是一个全自动化的程序修复工具，结合大语言模型（LLM）与代码分析能力，能够自动定位并修复 GitHub Issue 中的 Bug 或添加新功能。它支持多种模型（OpenAI, Anthropic, Groq 等），并在 SWE-bench 基准测试中表现优异。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**: Linux 或 macOS (Windows 用户建议使用 WSL2 或 Docker)\n- **硬件**: 建议至少 8GB 内存，充足的磁盘空间用于克隆代码库\n- **网络**: 需要能够访问 GitHub 及大模型 API 服务\n\n### 前置依赖\n请确保已安装以下工具：\n- **Git**: 用于克隆项目代码\n- **Docker** (推荐): 用于隔离运行环境\n- **Conda** (可选): 如果选择本地模式运行，需安装 Miniconda 或 Anaconda\n- **API Key**: \n  - OpenAI: `OPENAI_KEY`\n  - Anthropic: `ANTHROPIC_API_KEY`\n  - Groq: `GROQ_API_KEY`\n\n> **注意**: 国内开发者若无法直接访问 OpenAI\u002FAnthropic 接口，请自行配置代理或在支持这些服务的云环境中运行。\n\n## 安装步骤\n\n### 方式一：Docker 运行（推荐）\n\n这是最简便的部署方式，无需手动配置 Python 环境。\n\n1. **设置环境变量**\n   在终端中导出你的 API Key：\n   ```bash\n   export OPENAI_KEY=sk-YOUR-OPENAI-API-KEY-HERE\n   # 如果使用 Anthropic\n   export ANTHROPIC_API_KEY=sk-ant-api...\n   ```\n\n2. **构建并启动容器**\n   ```bash\n   docker build -f Dockerfile.minimal -t acr .\n   docker run -it -e OPENAI_KEY=\"${OPENAI_KEY:-OPENAI_API_KEY}\" acr\n   ```\n   *注：进入容器后，默认工作目录为 `\u002Fopt\u002Fauto-code-rover`。*\n\n### 方式二：本地 Conda 环境（适合 SWE-bench 实验）\n\n如果你需要深度定制或运行 SWE-bench 基准测试，建议使用此方式。\n\n1. **创建 Conda 环境**\n   ```bash\n   conda env create -f environment.yml\n   conda activate auto-code-rover\n   ```\n\n2. **设置环境变量**\n   在当前 Shell 中导出 API Key（同 Docker 方式）。\n\n## 基本使用\n\nAutoCodeRover 支持三种运行模式，以下是两种最常用的快速开始示例。\n\n### 场景 1：修复新的 GitHub Issue (GitHub Issue Mode)\n\n适用于直接针对线上公开的 GitHub Issue 进行修复。\n\n**准备工作：**\n- 项目克隆链接 (Clone URL)\n- 包含该 Issue 的代码版本 Commit Hash\n- Issue 页面链接\n\n**执行命令：**\n在 Docker 容器或激活的 Conda 环境中运行：\n\n```bash\ncd \u002Fopt\u002Fauto-code-rover\nconda activate auto-code-rover  # 如果是 Docker 环境且已预激活可省略此行\n\nPYTHONPATH=. python app\u002Fmain.py github-issue \\\n  --output-dir output \\\n  --setup-dir setup \\\n  --model gpt-4o-2024-05-13 \\\n  --model-temperature 0.2 \\\n  --task-id langchain-20453 \\\n  --clone-link https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain.git \\\n  --commit-hash cb6e5e5 \\\n  --issue-link https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain\u002Fissues\u002F20453\n```\n\n**结果查看：**\n若成功生成补丁，修复文件的路径将保存在 `output\u002Fselected_patch.json` 中。\n\n### 场景 2：修复本地仓库问题 (Local Issue Mode)\n\n适用于私有项目或已下载到本地的代码库。\n\n**准备工作：**\n- 本地项目仓库路径\n- 包含 Issue 描述文本的文件路径\n\n**执行命令：**\n\n```bash\ncd \u002Fopt\u002Fauto-code-rover\nconda activate auto-code-rover\n\nPYTHONPATH=. python app\u002Fmain.py local-issue \\\n  --output-dir output \\\n  --model gpt-4o-2024-05-13 \\\n  --model-temperature 0.2 \\\n  --task-id my-local-task \\\n  --local-repo \u002Fpath\u002Fto\u002Fyour\u002Flocal\u002Fproject \\\n  --issue-file \u002Fpath\u002Fto\u002Fissue_description.txt\n```\n\n**结果查看：**\n同样，生成的补丁路径将记录在 `output\u002Fselected_patch.json` 文件中。\n\n---\n*提示：对于更复杂的 SWE-bench 基准测试任务，请参考官方文档中关于 `SWE-bench mode` 的详细配置流程，涉及额外的 testbed 设置步骤。*","某中型电商平台的后端团队正紧急处理一个由用户反馈引发的订单状态同步异常，该问题隐藏在复杂的微服务调用链中，导致部分订单卡在“支付中”状态。\n\n### 没有 auto-code-rover 时\n- 开发人员需手动翻阅数十个微服务模块的代码文件，依靠经验猜测故障点，耗时数小时仍难以定位具体出错的方法或类。\n- 传统的字符串搜索无法理解代码结构，往往返回大量无关结果，干扰排查思路，容易遗漏深层的逻辑缺陷。\n- 即使找到疑似代码，编写修复补丁后需反复运行本地测试套件验证，人工分析测试失败原因效率极低。\n- 整个修复过程高度依赖资深工程师的个人能力，新人难以独立承担，且夜间突发故障时响应速度严重受限。\n\n### 使用 auto-code-rover 后\n- auto-code-rover 利用程序结构感知的代码搜索 API，自动遍历抽象语法树，精准锁定涉及订单状态流转的核心方法与类，将定位时间缩短至分钟级。\n- 工具结合统计故障定位技术，自动分析现有测试用例的执行结果，直接高亮最可能的缺陷代码行，无需人工大海捞针。\n- 基于检索到的完整上下文，auto-code-rover 自动生成修复补丁并预验证，开发者只需进行最终代码审查即可合并，大幅降低试错成本。\n- 即使是初级工程师也能借助该工具快速解决复杂问题，实现了 7 分钟内完成从问题输入到补丁生成的全流程，且单次任务成本低于 0.7 美元。\n\nauto-code-rover 通过将代码结构理解与自动化调试相结合，把原本依赖人工经验的“黑盒”排查过程转变为高效、低成本的标准化自动修复流程。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAutoCodeRoverSG_auto-code-rover_d152c2c6.png","AutoCodeRoverSG","AutoCodeRover","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FAutoCodeRoverSG_427fa466.png","",null,"info@autocoderover.dev","https:\u002F\u002Fautocoderover.dev\u002F","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG",[85,89,93,97,101,104],{"name":86,"color":87,"percentage":88},"Python","#3572A5",98,{"name":90,"color":91,"percentage":92},"TypeScript","#3178c6",1.9,{"name":94,"color":95,"percentage":96},"Dockerfile","#384d54",0.1,{"name":98,"color":99,"percentage":100},"JavaScript","#f1e05a",0,{"name":102,"color":103,"percentage":100},"Shell","#89e051",{"name":105,"color":106,"percentage":100},"CSS","#663399",3063,331,"2026-04-02T23:22:36","NOASSERTION","Linux, macOS","未说明 (主要依赖外部 API 如 OpenAI\u002FAnthropic\u002FGroq，本地无重型模型推理需求)","未说明 (建议至少 8GB 以运行 Docker 和 Conda 环境)",{"notes":115,"python":116,"dependencies":117},"1. 强烈建议使用 Docker 容器运行，或本地使用 Conda 管理环境 (environment.yml)。\n2. 必须配置大模型 API 密钥 (OPENAI_KEY, ANTHROPIC_API_KEY 或 GROQ_API_KEY)。\n3. 运行 SWE-bench 模式时，需在宿主机而非 Docker 内设置测试床 (Testbed)，并初始化特定的 SWE-bench 子模块。\n4. macOS (ARM64\u002FApple Silicon) 用户在运行 SWE-bench 任务时需注意避开依赖 Python 3.6 的旧任务。","3.8+ (SWE-bench 部分任务明确不支持 Python 3.6，暗示需较新版本；Conda 环境由 environment.yml 管理)",[118,119,120,121,122],"conda","docker","git","SWE-bench-docker (fork 版本)","OpenAI API \u002F Anthropic API \u002F Groq API (密钥必需)",[26,15],"2026-03-27T02:49:30.150509","2026-04-06T06:54:19.835354",[127,132,137,142,147,152,157],{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},13673,"为什么运行时会报错 'git returned non-zero exit status 128'，如何解决？","该错误通常是因为当前网络环境阻止了对代码仓库的访问（例如被防火墙拦截），导致 git 命令无法拉取或重置代码。请检查您的网络连接，确保能够正常访问 GitHub 或相关代码源。","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG\u002Fauto-code-rover\u002Fissues\u002F76",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},13674,"遇到 'RateLimitError' 或请求重试失败错误怎么办？","此错误表明 Auto-Code-Rover 向 OpenAI 发送的请求过多，触发了 API 速率限制。建议检查您的 API 配额，适当降低并发任务数，或在代码中增加重试等待时间。","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG\u002Fauto-code-rover\u002Fissues\u002F80",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},13675,"如何配置环境变量以解决 'AuthenticationError' 认证失败问题？","请注意区分两个环境变量：`OPENAI_KEY` 是项目代码读取并传递给 OpenAI 对象的变量；而 `OPENAI_API_KEY` 是 OpenAI 官方库在构造函数未传参时默认读取的变量。请确保您设置的是项目所需的 `OPENAI_KEY`，或者在代码调用时显式传入 API Key。","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG\u002Fauto-code-rover\u002Fissues\u002F63",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},13676,"是否支持除了 OpenAI 以外的模型（如 Claude, Gemini, Ollama 等）？","是的，项目已更新支持。现在可以通过 LiteLLM 集成 Claude 模型，通过 Ollama 运行本地模型（如 Llama3）。您可以尝试使用这些替代方案来运行代码生成任务。","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG\u002Fauto-code-rover\u002Fissues\u002F15",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},13677,"在 Apple Silicon (M1\u002FM2) Mac 上构建 Docker 镜像失败怎么办？","在 Apple Silicon 架构上构建时，可能会遇到 conda 环境创建错误或架构不兼容问题。建议检查 Docker Desktop 是否启用了 Rosetta 转译，或尝试使用针对 ARM64 架构优化的基础镜像。如果问题依旧，可参考社区提供的修改版 Dockerfile，调整 Python 版本或依赖安装方式。","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG\u002Fauto-code-rover\u002Fissues\u002F72",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},13678,"Docker 镜像构建时出现 'apt-get returned a non-zero code: 100' 错误如何解决？","这通常是网络问题或 GPG 密钥缺失导致的。解决方案包括：1. 更换更稳定的基础镜像（如 `ubuntu:focal`）；2. 手动添加缺失的 GPG 密钥（例如运行 `apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C`）；3. 确保 `DEBIAN_FRONTEND=noninteractive` 已设置以避免交互式提示中断构建。","https:\u002F\u002Fgithub.com\u002FAutoCodeRoverSG\u002Fauto-code-rover\u002Fissues\u002F9",{"id":158,"question_zh":159,"answer_zh":160,"source_url":136},13679,"AutoCodeRover 是基于搜索的修复工具还是基于 LLM 的修复工具？","AutoCodeRover 不是一个纯粹的基于搜索的修复工具（Search-Based APR）。它是一个代理系统（Agentic System），利用大语言模型（LLM）进行代码修复。其上下文检索代理会模拟开发者的行为，通过 AST 分析等技术搜索类、方法、函数等实体，辅助 LLM 生成补丁。",[162,167],{"id":163,"version":164,"summary_zh":165,"released_at":166},72531,"v1.1.0","允许在 GitHub 问题中使用评论。这使得智能体能够采纳反馈意见。","2024-09-10T05:13:18",{"id":168,"version":169,"summary_zh":80,"released_at":170},72532,"v1.0.0","2024-09-09T07:43:54"]