[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-spcl--graph-of-thoughts":3,"tool-spcl--graph-of-thoughts":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 真正成长为懂上",149489,2,"2026-04-10T11:32:46",[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":77,"owner_twitter":77,"owner_website":78,"owner_url":79,"languages":80,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":32,"env_os":89,"env_gpu":89,"env_ram":89,"env_deps":90,"category_tags":95,"github_topics":96,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":103,"updated_at":104,"faqs":105,"releases":142},6344,"spcl\u002Fgraph-of-thoughts","graph-of-thoughts","Official Implementation of \"Graph of Thoughts: Solving Elaborate Problems with Large Language Models\"","graph-of-thoughts 是论文《Graph of Thoughts: Solving Elaborate Problems with Large Language Models》的官方开源实现。它旨在解决大语言模型在处理复杂、多步骤推理任务时容易出错或逻辑断裂的难题。\n\n传统方法如思维链（CoT）通常只能进行线性推导，而 graph-of-thoughts 创新性地将解题过程建模为“操作图”（Graph of Operations）。在这个框架中，大模型作为执行引擎，能够以非线性的方式生成、评估、合并甚至回溯不同的思考路径。这种结构化的思维方式让模型能像人类专家一样灵活地探索多种解决方案，显著提升了处理排序、逻辑推理等复杂任务的准确性和鲁棒性。\n\n该工具不仅支持全新的 GoT 推理模式，还具备极高的灵活性，允许用户复现思维树（ToT）或思维链（CoT）等既有方法，便于进行对比研究和算法改进。它特别适合 AI 研究人员、算法工程师以及希望深入探索大模型推理机制的开发者使用。通过简单的 Python 接口，用户可以自定义操作节点和控制流程，快速构建并测试自己的推理策略，是探索下","graph-of-thoughts 是论文《Graph of Thoughts: Solving Elaborate Problems with Large Language Models》的官方开源实现。它旨在解决大语言模型在处理复杂、多步骤推理任务时容易出错或逻辑断裂的难题。\n\n传统方法如思维链（CoT）通常只能进行线性推导，而 graph-of-thoughts 创新性地将解题过程建模为“操作图”（Graph of Operations）。在这个框架中，大模型作为执行引擎，能够以非线性的方式生成、评估、合并甚至回溯不同的思考路径。这种结构化的思维方式让模型能像人类专家一样灵活地探索多种解决方案，显著提升了处理排序、逻辑推理等复杂任务的准确性和鲁棒性。\n\n该工具不仅支持全新的 GoT 推理模式，还具备极高的灵活性，允许用户复现思维树（ToT）或思维链（CoT）等既有方法，便于进行对比研究和算法改进。它特别适合 AI 研究人员、算法工程师以及希望深入探索大模型推理机制的开发者使用。通过简单的 Python 接口，用户可以自定义操作节点和控制流程，快速构建并测试自己的推理策略，是探索下一代大模型应用架构的有力工具。","# Graph of Thoughts (GoT)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"paper\u002Fpics\u002Fpreview.svg\">\n\u003C\u002Fp>\n\nThis is the official implementation of [Graph of Thoughts: Solving Elaborate Problems with Large Language Models](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2308.09687.pdf).  \nThis framework gives you the ability to solve complex problems by modeling them as a Graph of Operations (GoO), which is automatically executed with a Large Language Model (LLM) as the engine.  \nThis framework is designed to be flexible and extensible, allowing you to not only solve problems using the new GoT approach, but also to implement GoOs resembling previous approaches like CoT or ToT.\n\n## Setup Guide\n\nIn order to use this framework, you need to have a working installation of Python 3.8 or newer.\n\n### Installing GoT\n\nBefore running either of the following two installation methods, make sure to activate your Python environment (if any) beforehand.  \nIf you are a user and you just want to use `graph_of_thoughts`, you can install it directly from PyPI:\n```bash\npip install graph_of_thoughts\n```\nIf you are a developer and you want to modify the code, you can install it in editable mode from source:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts.git\ncd graph-of-thoughts\npip install -e .\n```\n\n### Configuring the LLM\n\nIn order to use the framework, you need to have access to an LLM.\nPlease follow the instructions in the [Controller README](graph_of_thoughts\u002Fcontroller\u002FREADME.md) to configure the LLM of your choice.\n\n## Quick Start\n\nThe following code snippet shows how to use the framework to solve the sorting problem for a list of 32 numbers using a CoT-like approach.  \nMake sure you have followed the [Setup Guide](#setup-guide) before running the code.\n\n```python\nfrom examples.sorting.sorting_032 import SortingPrompter, SortingParser, utils\nfrom graph_of_thoughts import controller, language_models, operations\n\n# Problem input\n\nto_be_sorted = \"[0, 2, 6, 3, 8, 7, 1, 1, 6, 7, 7, 7, 7, 9, 3, 0, 1, 7, 9, 1, 3, 5, 1, 3, 6, 4, 5, 4, 7, 3, 5, 7]\"\n\n# Create the Graph of Operations\ngop = operations.GraphOfOperations()\ngop.append_operation(operations.Generate())\ngop.append_operation(operations.Score(scoring_function=utils.num_errors))\ngop.append_operation(operations.GroundTruth(utils.test_sorting))\n\n# Configure the Language Model (Assumes config.json is in the current directory with OpenAI API key)\nlm = language_models.ChatGPT(\"config.json\", model_name=\"chatgpt\")\n\n# Create the Controller\nctrl = controller.Controller(\n  lm, \n  gop, \n  SortingPrompter(), \n  SortingParser(),\n  # The following dictionary is used to configure the initial thought state\n  {\n    \"original\": to_be_sorted,\n    \"current\": \"\",\n    \"method\": \"cot\"\n  }\n)\n\n# Run the Controller and generate the output graph\nctrl.run()\nctrl.output_graph(\"output_cot.json\")\n```\n\nTo run the more sophisticated GoT approach, you can use the following code snippet.\n\n```python\nfrom examples.sorting.sorting_032 import SortingPrompter, SortingParser, got, utils\nfrom graph_of_thoughts import controller, language_models, operations\n\n# Problem input\n\nto_be_sorted = \"[0, 2, 6, 3, 8, 7, 1, 1, 6, 7, 7, 7, 7, 9, 3, 0, 1, 7, 9, 1, 3, 5, 1, 3, 6, 4, 5, 4, 7, 3, 5, 7]\"\n\n# Retrieve the Graph of Operations\ngop = got()\n\n# Configure the Language Model (Assumes config.json is in the current directory with OpenAI API key)\nlm = language_models.ChatGPT(\"config.json\", model_name=\"chatgpt\")\n\n# Create the Controller\nctrl = controller.Controller(\n  lm, \n  gop, \n  SortingPrompter(), \n  SortingParser(),\n  # The following dictionary is used to configure the initial thought state\n  {\n    \"original\": to_be_sorted,\n    \"current\": \"\",\n    \"phase\": 0,\n    \"method\": \"got\"\n  }\n)\n\n# Run the Controller and generate the output graph\nctrl.run()\nctrl.output_graph(\"output_got.json\")\n```\nYou can compare the two results by inspecting the output graphs `output_cot.json` and `output_got.json`.  \nThe final thought states' scores indicate the number of errors in the sorted list.\n\n## Documentation\nThe paper gives a high-level overview of the framework and its components.  \nIn order to understand the framework in more detail, you can read the documentation of the individual modules.  \nEspecially the [Controller](graph_of_thoughts\u002Fcontroller\u002FREADME.md) and [Operations](graph_of_thoughts\u002Foperations\u002FREADME.md) modules are important for understanding how to make the most out of the framework.  \nWe took extra care to fully document the code, so that you can easily understand how it works and how to extend it.\n\n## Examples\n\nThe [examples](examples) directory contains several examples of problems that can be solved using the framework, including the ones presented in the paper.  \nIt is a great starting point for learning how to use the framework to solve real problems.  \nEach example contains a `README.md` file with instructions on how to run it and play with it. The code is fully documented and should be easy to follow.\nYou can also run the examples straight from the main directory. Note that the results will be stored in the respective examples sub-directory.\n\nTry for instance:\n```bash\npython -m examples.sorting.sorting_032\npython -m examples.keyword_counting.keyword_counting\n```\n## Paper Results\n\nYou can run the experiments from the paper by following the instructions in the [examples](examples) directory.  \nHowever, if you just want to inspect and replot the results, you can use the [paper](paper) directory.\n\n## Citations\n\nIf you find this repository valuable, please give it a star!  \nGot any questions or feedback? Feel free to reach out to [nils.blach@inf.ethz.ch](mailto:nils.blach@inf.ethz.ch) or open an issue.  \nUsing this in your work? Please reference us using the provided citation:\n\n```bibtex\n@article{besta2024got,\n  title = {{Graph of Thoughts: Solving Elaborate Problems with Large Language Models}},\n  author = {Besta, Maciej and Blach, Nils and Kubicek, Ales and Gerstenberger, Robert and Gianinazzi, Lukas and Gajda, Joanna and Lehmann, Tomasz and Podstawski, Micha{\\l} and Niewiadomski, Hubert and Nyczyk, Piotr and Hoefler, Torsten},\n  year = 2024,\n  month = {Mar},\n  journal = {Proceedings of the AAAI Conference on Artificial Intelligence},\n  volume = 38,\n  number = 16,\n  pages = {17682-17690},\n  publisher = {AAAI Press},\n  doi = {10.1609\u002Faaai.v38i16.29720},\n  url = {https:\u002F\u002Fojs.aaai.org\u002Findex.php\u002FAAAI\u002Farticle\u002Fview\u002F29720}\n}\n```\n","# 思维图（GoT）\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"paper\u002Fpics\u002Fpreview.svg\">\n\u003C\u002Fp>\n\n这是 [思维图：利用大型语言模型解决复杂问题](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2308.09687.pdf) 的官方实现。  \n该框架通过将问题建模为操作图（GoO），并以大型语言模型（LLM）作为引擎自动执行，从而具备解决复杂问题的能力。  \n该框架设计灵活且可扩展，不仅能够使用新的 GoT 方法解决问题，还支持实现类似于 CoT 或 ToT 等传统方法的操作图。\n\n## 设置指南\n\n要使用本框架，您需要安装 Python 3.8 或更高版本。\n\n### 安装 GoT\n\n在执行以下两种安装方法之前，请确保已激活您的 Python 环境（如有）。  \n如果您是普通用户，只需使用 `graph_of_thoughts`，可以直接从 PyPI 安装：\n```bash\npip install graph_of_thoughts\n```\n如果您是开发者，希望对代码进行修改，可以从源码以可编辑模式安装：\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts.git\ncd graph-of-thoughts\npip install -e .\n```\n\n### 配置 LLM\n\n要使用该框架，您需要访问一个大型语言模型。  \n请按照 [Controller README](graph_of_thoughts\u002Fcontroller\u002FREADME.md) 中的说明配置您选择的 LLM。\n\n## 快速入门\n\n以下代码片段展示了如何使用该框架，采用类似 CoT 的方法解决包含 32 个数字的排序问题。  \n请确保在运行代码前已遵循 [设置指南](#setup-guide)。\n\n```python\nfrom examples.sorting.sorting_032 import SortingPrompter, SortingParser, utils\nfrom graph_of_thoughts import controller, language_models, operations\n\n# 问题输入\n\nto_be_sorted = \"[0, 2, 6, 3, 8, 7, 1, 1, 6, 7, 7, 7, 7, 9, 3, 0, 1, 7, 9, 1, 3, 5, 1, 3, 6, 4, 5, 4, 7, 3, 5, 7]\"\n\n# 创建操作图\ngop = operations.GraphOfOperations()\ngop.append_operation(operations.Generate())\ngop.append_operation(operations.Score(scoring_function=utils.num_errors))\ngop.append_operation(operations.GroundTruth(utils.test_sorting))\n\n# 配置语言模型（假设当前目录下有包含 OpenAI API 密钥的 config.json 文件）\nlm = language_models.ChatGPT(\"config.json\", model_name=\"chatgpt\")\n\n# 创建控制器\nctrl = controller.Controller(\n  lm, \n  gop, \n  SortingPrompter(), \n  SortingParser(),\n  # 下列字典用于配置初始思维状态\n  {\n    \"original\": to_be_sorted,\n    \"current\": \"\",\n    \"method\": \"cot\"\n  }\n)\n\n# 运行控制器并生成输出图\nctrl.run()\nctrl.output_graph(\"output_cot.json\")\n```\n\n若要运行更为复杂的 GoT 方法，可以使用以下代码片段。\n\n```python\nfrom examples.sorting.sorting_032 import SortingPrompter, SortingParser, got, utils\nfrom graph_of_thoughts import controller, language_models, operations\n\n# 问题输入\n\nto_be_sorted = \"[0, 2, 6, 3, 8, 7, 1, 1, 6, 7, 7, 7, 7, 9, 3, 0, 1, 7, 9, 1, 3, 5, 1, 3, 6, 4, 5, 4, 7, 3, 5, 7]\"\n\n# 获取操作图\ngop = got()\n\n# 配置语言模型（假设当前目录下有包含 OpenAI API 密钥的 config.json 文件）\nlm = language_models.ChatGPT(\"config.json\", model_name=\"chatgpt\")\n\n# 创建控制器\nctrl = controller.Controller(\n  lm, \n  gop, \n  SortingPrompter(), \n  SortingParser(),\n  # 下列字典用于配置初始思维状态\n  {\n    \"original\": to_be_sorted,\n    \"current\": \"\",\n    \"phase\": 0,\n    \"method\": \"got\"\n  }\n)\n\n# 运行控制器并生成输出图\nctrl.run()\nctrl.output_graph(\"output_got.json\")\n```\n\n您可以通过检查输出图 `output_cot.json` 和 `output_got.json` 来比较两种结果。  \n最终思维状态的得分表示排序列表中的错误数量。\n\n## 文档\n\n论文对框架及其组件进行了高层次的概述。  \n若想更深入地了解框架，您可以阅读各个模块的文档。  \n尤其是 [Controller](graph_of_thoughts\u002Fcontroller\u002FREADME.md) 和 [Operations](graph_of_thoughts\u002Foperations\u002FREADME.md) 模块，对于理解如何充分利用该框架至关重要。  \n我们特别注重对代码的全面文档化，以便您轻松理解其工作原理及扩展方式。\n\n## 示例\n\n[examples](examples) 目录包含多个可使用该框架解决的问题示例，其中包括论文中介绍的案例。  \n这是学习如何使用该框架解决实际问题的良好起点。  \n每个示例都包含一个 `README.md` 文件，其中提供了运行和尝试的说明。代码文档齐全，易于理解。  \n您也可以直接从主目录运行这些示例。请注意，结果将保存在相应的示例子目录中。\n\n例如，您可以尝试：\n```bash\npython -m examples.sorting.sorting_032\npython -m examples.keyword_counting.keyword_counting\n```\n\n## 论文结果\n\n您可以按照 [examples](examples) 目录中的说明运行论文中的实验。  \n但如果您只想查看和重新绘制结果，可以使用 [paper](paper) 目录。\n\n## 引用\n\n如果您觉得本仓库很有价值，请为它点亮星标！  \n有任何问题或反馈吗？欢迎联系 [nils.blach@inf.ethz.ch](mailto:nils.blach@inf.ethz.ch) 或提交问题。  \n如果在您的工作中使用了本项目，请使用以下引用：\n\n```bibtex\n@article{besta2024got,\n  title = {{思维图：利用大型语言模型解决复杂问题}},\n  author = {Besta, Maciej and Blach, Nils and Kubicek, Ales and Gerstenberger, Robert and Gianinazzi, Lukas and Gajda, Joanna and Lehmann, Tomasz and Podstawski, Micha{\\l} and Niewiadomski, Hubert and Nyczyk, Piotr and Hoefler, Torsten},\n  year = 2024,\n  month = {Mar},\n  journal = {AAAI人工智能会议论文集},\n  volume = 38,\n  number = 16,\n  pages = {17682-17690},\n  publisher = {AAAI Press},\n  doi = {10.1609\u002Faaai.v38i16.29720},\n  url = {https:\u002F\u002Fojs.aaai.org\u002Findex.php\u002FAAAI\u002Farticle\u002Fview\u002F29720}\n}\n```","# Graph of Thoughts (GoT) 快速上手指南\n\nGraph of Thoughts (GoT) 是一个利用大语言模型（LLM）解决复杂问题的框架。它将问题建模为“操作图”（Graph of Operations, GoO），支持从简单的思维链（CoT）到复杂的图结构推理等多种策略。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows\n*   **Python 版本**：3.8 或更高版本\n*   **大语言模型访问权限**：您需要配置一个可用的 LLM（如 OpenAI ChatGPT），并准备好 API Key。\n\n## 安装步骤\n\n建议先创建并激活一个独立的 Python 虚拟环境。\n\n### 方式一：用户安装（推荐）\n如果您仅需使用框架功能，无需修改源码，可直接从 PyPI 安装：\n\n```bash\npip install graph_of_thoughts\n```\n\n> **国内加速提示**：如果遇到下载速度慢的问题，可以使用清华源或阿里源：\n> ```bash\n> pip install graph_of_thoughts -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n### 方式二：开发者安装\n如果您需要修改源码或贡献代码，请以可编辑模式从源代码安装：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts.git\ncd graph-of-thoughts\npip install -e .\n```\n\n### 配置 LLM\n安装完成后，您需要配置所使用的语言模型。框架默认通过 `config.json` 文件读取配置（例如 OpenAI API Key）。请参考项目中的 `graph_of_thoughts\u002Fcontroller\u002FREADME.md` 文档进行具体配置。\n\n## 基本使用\n\n以下示例展示了如何使用 GoT 框架解决一个包含 32 个数字的排序问题。该示例采用类似思维链（CoT）的方法。\n\n请确保已按照上述步骤完成安装和 LLM 配置，并在当前目录下准备好包含 API Key 的 `config.json` 文件。\n\n```python\nfrom examples.sorting.sorting_032 import SortingPrompter, SortingParser, utils\nfrom graph_of_thoughts import controller, language_models, operations\n\n# 问题输入：待排序的数字列表\nto_be_sorted = \"[0, 2, 6, 3, 8, 7, 1, 1, 6, 7, 7, 7, 7, 9, 3, 0, 1, 7, 9, 1, 3, 5, 1, 3, 6, 4, 5, 4, 7, 3, 5, 7]\"\n\n# 1. 创建操作图 (Graph of Operations)\ngop = operations.GraphOfOperations()\ngop.append_operation(operations.Generate())\ngop.append_operation(operations.Score(scoring_function=utils.num_errors))\ngop.append_operation(operations.GroundTruth(utils.test_sorting))\n\n# 2. 配置语言模型 (假设 config.json 在当前目录)\nlm = language_models.ChatGPT(\"config.json\", model_name=\"chatgpt\")\n\n# 3. 创建控制器\nctrl = controller.Controller(\n  lm, \n  gop, \n  SortingPrompter(), \n  SortingParser(),\n  # 初始化思考状态\n  {\n    \"original\": to_be_sorted,\n    \"current\": \"\",\n    \"method\": \"cot\"\n  }\n)\n\n# 4. 运行控制器并生成输出图\nctrl.run()\nctrl.output_graph(\"output_cot.json\")\n```\n\n运行结束后，您可以查看生成的 `output_cot.json` 文件。文件中最终思考状态的分数（score）表示排序结果中的错误数量，分数越低代表效果越好。\n\n如需尝试更复杂的完整 GoT 方法，可参考官方文档中关于 `got()` 函数的用法示例。","某金融科技团队正在开发一个自动化系统，需从杂乱的新闻文本中提取关键事件并构建复杂的因果推理链条，以辅助投资决策。\n\n### 没有 graph-of-thoughts 时\n- **逻辑断层严重**：传统的链式思维（CoT）只能线性推导，一旦中间某步推理出错，后续结果全盘皆错，无法回溯修正。\n- **缺乏全局视角**：模型难以同时维护多个假设分支，面对“若 A 发生则 B 可能，但若 C 介入则 B 不成立”这类复杂条件时容易顾此失彼。\n- **调试黑盒化**：当最终结论错误时，开发者无法定位具体是哪个推理节点出了问题，只能盲目调整提示词重试。\n- **资源浪费**：为了覆盖多种可能性，不得不多次重复调用大模型生成不同版本的答案，导致 API 成本高昂且效率低下。\n\n### 使用 graph-of-thoughts 后\n- **动态纠错机制**：graph-of-thoughts 将推理过程建模为操作图，允许模型在发现错误路径时自动回溯到上游节点重新生成，显著降低最终错误率。\n- **多分支并行探索**：系统能同时展开多个推理分支并进行交叉验证，有效处理包含多重条件约束的复杂金融逻辑判断。\n- **可视化可解释性**：生成的输出图谱清晰展示了每个思考节点的状态与得分，开发人员可精准定位并优化表现不佳的推理环节。\n- **执行效率提升**：通过智能调度操作图，一次性完成多路径探索与聚合，减少了冗余的大模型调用次数，降低了运行成本。\n\ngraph-of-thoughts 通过将线性思考升级为网状推理，让大模型在处理高难度复杂任务时具备了自我修正与全局规划的能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fspcl_graph-of-thoughts_9d1fccc8.png","spcl","SPCL","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fspcl_31754211.png","",null,"https:\u002F\u002Fspcl.inf.ethz.ch\u002F","https:\u002F\u002Fgithub.com\u002Fspcl",[81],{"name":82,"color":83,"percentage":84},"Python","#3572A5",100,2633,201,"2026-04-10T11:54:49","NOASSERTION","未说明",{"notes":91,"python":92,"dependencies":93},"该工具本身不强制要求本地 GPU，因为它主要作为框架调用外部大语言模型（如通过 API 访问 ChatGPT）。用户需自行配置 LLM 访问权限（例如在 config.json 中提供 OpenAI API Key）。安装方式支持直接从 PyPI 安装或通过源码以可编辑模式安装。","3.8+",[94],"graph_of_thoughts",[14,35],[97,98,99,100,101,102,64],"graph-structures","graphs","large-language-models","llm","prompt-engineering","prompting","2026-03-27T02:49:30.150509","2026-04-11T03:32:07.688885",[106,111,116,120,125,129,134,138],{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},28725,"代码示例中的 `num_branches_prompt` 参数为何未被使用？它的作用是什么？","该参数目前未在提供的示例用例中直接使用。作者最初实验过让语言模型在单个提示 - 回答对中进行分支的功能，但最终决定改为通过 API 查询 LLM 以获取不同答案，因为这样可以减少解析工作并避免相关错误。不过，用户仍可选择使用该参数，类似于在排序用例的合并提示中使用输入及其长度作为参数。若需使用该功能，可参考旧实验代码：在 `generate_prompt` 方法中，根据 `num_branches` 的值动态生成提示语（例如：\"Provide {num_branches} possible next steps\"）。","https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts\u002Fissues\u002F35",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},28726,"运行代码时遇到 `AttributeError: module 'openai' has no attribute 'error'` 错误如何解决？","这是由于 OpenAI 库升级到了主版本 1，其 API 发生了变更。解决方案有两种：1. 将 openai 库降级到 0.28.0 版本（命令：`pip install openai==0.28.0`）；2. 或者更新项目代码至最新提交，维护者已在最近一次提交中修复了该问题并适配了 OpenAI v1 版本。","https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts\u002Fissues\u002F17",{"id":117,"question_zh":118,"answer_zh":119,"source_url":115},28727,"如何实例化 Prompter、Parser、GraphOfOperations 和 AbstractLanguageModel 组件？","不需要将 README 中的代码块复制粘贴到 Python 文件中运行。请参考项目中的 `examples` 目录（例如 `examples\u002Fsorting\u002Fsorting_032.py`），其中包含了完整的实现示例，展示了如何正确实例化和连接这些组件。",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},28728,"如何在 Graph of Operations (GoO) 中实现回溯（backtracking）过程？","目前的 GoO 是在执行前静态构建的有向无环图（DAG，包含自环）。因此，无法在运行时动态创建回溯路径。实现策略是：在执行前定义所有想要探索的路径，并利用过滤操作（Filtering Operations）来移除那些不符合标准或不再值得探索的路径。通常情况下，如果一个操作没有前置思维（thoughts），它将不会执行任何工作。","https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts\u002Fissues\u002F8",{"id":126,"question_zh":127,"answer_zh":128,"source_url":124},28729,"如何在 GoT 中对思维（Thoughts）进行循环优化或细化（Refinement）？","细化是指改进思维内容，而不是操作本身。可以通过使用 `ValidateAndImprove` 操作来实现。该操作会遍历前一个操作产生的每个思维，对其进行验证并尝试改进。具体实现可参考源代码中的 `ValidateAndImprove` 类定义。",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},28730,"如何在 DAG 中实现操作的多线程并发执行？","由于 DAG 的性质，所有满足前置条件依赖的操作都可以并发执行。实现步骤如下：1. 将初始 `execution_queue` 构建为一个集合（set），包含所有基于前置状态可以并发执行的操作；2. 使用线程池（如 `ThreadPool` executor）执行 `execution_queue` 中的所有操作并等待完成；3. 将下一个 `execution_queue` 也构建为集合。注意：如果遇到段错误（Segmentation fault），需检查调用的外部 API（如 OpenAI ChatCompletion）是否线程安全，这通常不是 GoT 内部数据结构的问题。","https:\u002F\u002Fgithub.com\u002Fspcl\u002Fgraph-of-thoughts\u002Fissues\u002F16",{"id":135,"question_zh":136,"answer_zh":137,"source_url":110},28731,"论文中提到的 `Repeat(k)` 操作为何在代码中找不到？","虽然论文中提到了 `Repeat(k)`，但在当前提供的代码库中并未直接实现名为 `Repeat` 的独立操作类。类似的重复逻辑通常通过其他方式实现，或者该功能属于早期实验阶段未被纳入最终的标准操作集中。建议查看具体的用例代码或通过组合现有操作（如循环调用 Generate）来达到类似效果。",{"id":139,"question_zh":140,"answer_zh":141,"source_url":110},28732,"为什么在很多示例中 `io()` 和 `cot()` 的实现看起来是一样的？","在某些简单的任务或示例中，直接输入输出（IO）和思维链（CoT）的提示模板可能非常相似，导致代码实现看起来一样。但这取决于具体任务的复杂度。对于需要多步推理的任务，`cot()` 通常会包含引导模型逐步思考的指令，而 `io()` 则直接要求结果。用户可以参考 `examples` 目录下更复杂的用例来观察两者的区别。",[143,147],{"id":144,"version":145,"summary_zh":77,"released_at":146},197635,"v0.0.2","2023-09-26T13:38:41",{"id":148,"version":149,"summary_zh":77,"released_at":150},197636,"v0.0.1","2023-08-23T14:33:27"]