[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-TIGER-AI-Lab--TheoremExplainAgent":3,"tool-TIGER-AI-Lab--TheoremExplainAgent":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 真正成长为懂上",157379,2,"2026-04-15T23:32:42",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":76,"owner_website":76,"owner_url":78,"languages":79,"stars":84,"forks":85,"last_commit_at":86,"license":87,"difficulty_score":88,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":103,"github_topics":105,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":110,"updated_at":111,"faqs":112,"releases":141},8044,"TIGER-AI-Lab\u002FTheoremExplainAgent","TheoremExplainAgent","Official Repo for \"TheoremExplainAgent: Towards Video-based Multimodal Explanations for LLM Theorem Understanding\" [ACL 2025 oral]","TheoremExplainAgent 是一款专为大型语言模型（LLM）设计的智能系统，能够自动生成基于 Manim 引擎的长格式数学定理讲解视频。它致力于解决传统纯文本解释在展示复杂数学推理时的局限性：文字往往难以直观呈现动态推导过程，且容易掩盖模型逻辑中的细微漏洞。通过将抽象的定理转化为包含动态图形与语音解说的多模态视频，TheoremExplainAgent 不仅能更清晰地验证模型对数学概念的深度理解，还能有效暴露其推理缺陷。\n\n该工具特别适合 AI 研究人员、教育科技开发者以及数学教育工作者使用。对于研究者而言，项目开源了完整的生成与评估代码，并提供了一套高质量的基准视频数据集，便于进行多模态推理能力的对比研究；对于教育者，它能辅助制作直观的数学教学素材。其核心技术亮点在于构建了从定理文本到动态视觉视频的端到端生成流程，结合了先进的文本到语音（TTS）技术与专业的数学动画渲染能力。作为 ACL 2025 的口头报告论文成果，TheoremExplainAgent 为探索大模型在严谨科学领域的可解释性提供了全新的视角与强有力的工具支持。","# TheoremExplainAgent (TEA) 🍵\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2502.19400-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400)\n\u003Ca href='https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2502.19400'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Paper&message=Huggingface&color=orange'>\u003C\u002Fa> \n\n[**🌐 Homepage**](https:\u002F\u002Ftiger-ai-lab.github.io\u002FTheoremExplainAgent\u002F)  | [**📖 arXiv**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400) | [**🤗 HuggingFace Dataset**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FTIGER-Lab\u002FTheoremExplainBench) | [🎥Video Data](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F18kmzXvbxaFGyJw-g51jnq9m93v_ez4aJ\u002Fview) | [**▶️ YouTube**](https:\u002F\u002Fyoutu.be\u002F0G9YO637IVE)\n\n[![contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002FTIGER-AI-Lab\u002FTheoremExplainAgent)](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fgraphs\u002Fcontributors)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FTIGER-AI-Lab\u002FTheoremExplainAgent.svg)](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fblob\u002Fmain\u002FLICENSE)\n[![GitHub](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?style=social)](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent)\n![Hits](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTIGER-AI-Lab_TheoremExplainAgent_readme_5954c78a6c4f.png)\n\n\nThis repo contains the codebase for our paper [TheoremExplainAgent: Towards Video-based Multimodal Explanations for LLM Theorem Understanding](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400)\n\n**ACL 2025 main** (Oral)\n\n## Introduction\nTheoremExplainAgent is an AI system that generates long-form Manim videos to visually explain theorems, proving its deep understanding while uncovering reasoning flaws that text alone often hides.\n\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F17f2f4f2-8f2c-4abc-b377-ac92ebda69f3\n\n\n## 📰 News\n* 2025 Jun 24: Paper got selected for Oral presentation (Top 3%).\n* 2025 Jun 8: We released our generated video data for researchers to serve as baselines.\n* 2025 May 15: Paper accepted to ACL 2025 main conference.\n* 2025 Mar 3: Generation code and Evaluation code released. Thanks for the wait!\n\u003C!--* 2025 Mar 3: Reach 404 stars without code.-->\n* 2025 Feb 27: Paper available on [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400). Thanks AK for putting our paper on [HF Daily](https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2502.19400).\n\n## Downloading Generated Video Data\nSkip this section if you just want to try out the code.\nIf you are researchers who just need the baseline videos as baseline comparison, download it here:\n```shell\nwget --save-cookies \u002Ftmp\u002Fcookies.txt --keep-session-cookies --no-check-certificate 'https:\u002F\u002Fdocs.google.com\u002Fuc?export=download&id=18kmzXvbxaFGyJw-g51jnq9m93v_ez4aJ' -O \u002Ftmp\u002Fgdrive.html && wget --load-cookies \u002Ftmp\u002Fcookies.txt -O baseline_videos.zip \"https:\u002F\u002Fdrive.usercontent.google.com\u002Fdownload?id=18kmzXvbxaFGyJw-g51jnq9m93v_ez4aJ&export=download&confirm=$(sed -rn 's\u002F.*name=\"confirm\" value=\"([^\"]+)\".*\u002F\\\\1\u002Fp' \u002Ftmp\u002Fgdrive.html)&uuid=$(sed -rn 's\u002F.*name=\"uuid\" value=\"([^\"]+)\".*\u002F\\\\1\u002Fp' \u002Ftmp\u002Fgdrive.html)\" && rm \u002Ftmp\u002Fgdrive.html \u002Ftmp\u002Fcookies.txt\n```\n\n## Installation\n\n> **Look at the [FAQ section in this README doc](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?tab=readme-ov-file#-faq) if you encountered any errors. If that didnt help, create a issue**\u003Cbr>\n\n1. Setting up conda environment\n```shell\nconda create --name tea python=3.12.8\nconda activate tea\npip install -r requirements.txt\n```\n\n2. You may also need to install latex and other dependencies for Manim Community. Look at [Manim Installation Docs](https:\u002F\u002Fdocs.manim.community\u002Fen\u002Fstable\u002Finstallation.html) for more details.\n```shell\n# You might need these dependencies if you are using Linux Ubuntu:\nsudo apt-get install portaudio19-dev\nsudo apt-get install libsdl-pango-dev\n```\n\n3. Then Download the Kokoro model and voices using the commands to enable TTS service.\n\n```shell\nmkdir -p models && wget -P models https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fkokoro-v0_19.onnx && wget -P models https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fvoices.bin\n```\n\n4. Create `.env` based on `.env.template`, filling in the environmental variables according to the models you choose to use.\nSee [LiteLLM](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders) for reference.\n\n```shell\ntouch .env\n```\nThen open the `.env` file and edit it with whatever text editor you like.\n\nYour `.env` file should look like the following:\n```shell\n# OpenAI\nOPENAI_API_KEY=\"\"\n\n# Azure OpenAI\nAZURE_API_KEY=\"\"\nAZURE_API_BASE=\"\"\nAZURE_API_VERSION=\"\"\n\n# Google Vertex AI\nVERTEXAI_PROJECT=\"\"\nVERTEXAI_LOCATION=\"\"\nGOOGLE_APPLICATION_CREDENTIALS=\"\"\n\n# Google Gemini\nGEMINI_API_KEY=\"\"\n\n...\n\n# Kokoro TTS Settings\nKOKORO_MODEL_PATH=\"models\u002Fkokoro-v0_19.onnx\"\nKOKORO_VOICES_PATH=\"models\u002Fvoices.bin\"\nKOKORO_DEFAULT_VOICE=\"af\"\nKOKORO_DEFAULT_SPEED=\"1.0\"\nKOKORO_DEFAULT_LANG=\"en-us\"\n```\nFill in the API keys according to the model you wanted to use.\n\n5. Configure Python path. Note that you need to configure the python path to make it work. Otherwise you may encounter import issues (like not being able to import src etc.)\n```shell\nexport PYTHONPATH=$(pwd):$PYTHONPATH\n```\n\n6. (Optional) To setup RAG, See [https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?tab=readme-ov-file#generation-with-rag](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?tab=readme-ov-file#generation-with-rag).\n\n> **Look at the [FAQ section in this README doc](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?tab=readme-ov-file#-faq) if you encountered any errors. If that didnt help, create a issue**\u003Cbr>\n\n## Generation\n\n### Supported Models\n\u003C!--You can customize the allowed models by editing the `src\u002Futils\u002Fallowed_models.json` file. This file specifies which `model` and `helper_model` the system is permitted to use.--> \nThe model naming follows the LiteLLM convention. For details on how models should be named, please refer to the [LiteLLM documentation](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders).\n\n### Generation (Single topic)\n```shell\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fyour_exp_name\" \\\n      --topic \"your_topic\" \\\n      --context \"description of your topic, e.g. 'This is a topic about the properties of a triangle'\" \\\n```\n\nExample:\n```shell\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fmy_exp_name\" \\\n      --topic \"Big O notation\" \\\n      --context \"most common type of asymptotic notation in computer science used to measure worst case complexity\" \\\n```\n\n### Generation (in batch)\n```shell\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fmy_exp_name\" \\\n      --theorems_path data\u002Fthb_easy\u002Fmath.json \\\n      --max_scene_concurrency 7 \\\n      --max_topic_concurrency 20 \\\n```\n\n### Generation with RAG\nBefore using RAG, download the RAG documentation from this [Google Drive link](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Tn6J_JKVefFZRgZbjns93KLBtI9ullRv\u002Fview?usp=sharing). After downloading, unzip the file. For example, if you unzip it to `data\u002Frag\u002Fmanim_docs`, then you should set `--manim_docs_path` to `data\u002Frag\u002Fmanim_docs`. The vector database will be created the first time you run with RAG.\n\n```shell\npython generate_video.py \\\n            --model \"openai\u002Fo3-mini\" \\\n            --helper_model \"openai\u002Fo3-mini\" \\\n            --output_dir \"output\u002Fwith_rag\u002Fo3-mini\u002Fvtutorbench_easy\u002Fmath\" \\\n            --topic \"Big O notation\" \\\n            --context \"most common type of asymptotic notation in computer science used to measure worst case complexity\" \\\n            --use_rag \\\n            --chroma_db_path \"data\u002Frag\u002Fchroma_db\" \\\n            --manim_docs_path \"data\u002Frag\u002Fmanim_docs\" \\\n            --embedding_model \"vertex_ai\u002Ftext-embedding-005\"\n```\n\nWe support more options for generation, see below for more details:\n```shell\nusage: generate_video.py [-h]\n                         [--model]\n                         [--topic TOPIC] [--context CONTEXT]\n                         [--helper_model]\n                         [--only_gen_vid] [--only_combine] [--peek_existing_videos] [--output_dir OUTPUT_DIR] [--theorems_path THEOREMS_PATH]\n                         [--sample_size SAMPLE_SIZE] [--verbose] [--max_retries MAX_RETRIES] [--use_rag] [--use_visual_fix_code]\n                         [--chroma_db_path CHROMA_DB_PATH] [--manim_docs_path MANIM_DOCS_PATH]\n                         [--embedding_model {azure\u002Ftext-embedding-3-large,vertex_ai\u002Ftext-embedding-005}] [--use_context_learning]\n                         [--context_learning_path CONTEXT_LEARNING_PATH] [--use_langfuse] [--max_scene_concurrency MAX_SCENE_CONCURRENCY]\n                         [--max_topic_concurrency MAX_TOPIC_CONCURRENCY] [--debug_combine_topic DEBUG_COMBINE_TOPIC] [--only_plan] [--check_status]\n                         [--only_render] [--scenes SCENES [SCENES ...]]\n\nGenerate Manim videos using AI\n\noptions:\n  -h, --help            show this help message and exit\n  --model               Select the AI model to use\n  --topic TOPIC         Topic to generate videos for\n  --context CONTEXT     Context of the topic\n  --helper_model        Select the helper model to use\n  --only_gen_vid        Only generate videos to existing plans\n  --only_combine        Only combine videos\n  --peek_existing_videos, --peek\n                        Peek at existing videos\n  --output_dir OUTPUT_DIR\n                        Output directory\n  --theorems_path THEOREMS_PATH\n                        Path to theorems json file\n  --sample_size SAMPLE_SIZE, --sample SAMPLE_SIZE\n                        Number of theorems to sample\n  --verbose             Print verbose output\n  --max_retries MAX_RETRIES\n                        Maximum number of retries for code generation\n  --use_rag, --rag      Use Retrieval Augmented Generation\n  --use_visual_fix_code, --visual_fix_code\n                        Use VLM to fix code with rendered visuals\n  --chroma_db_path CHROMA_DB_PATH\n                        Path to Chroma DB\n  --manim_docs_path MANIM_DOCS_PATH\n                        Path to manim docs\n  --embedding_model {azure\u002Ftext-embedding-3-large,vertex_ai\u002Ftext-embedding-005}\n                        Select the embedding model to use\n  --use_context_learning\n                        Use context learning with example Manim code\n  --context_learning_path CONTEXT_LEARNING_PATH\n                        Path to context learning examples\n  --use_langfuse        Enable Langfuse logging\n  --max_scene_concurrency MAX_SCENE_CONCURRENCY\n                        Maximum number of scenes to process concurrently\n  --max_topic_concurrency MAX_TOPIC_CONCURRENCY\n                        Maximum number of topics to process concurrently\n  --debug_combine_topic DEBUG_COMBINE_TOPIC\n                        Debug combine videos\n  --only_plan           Only generate scene outline and implementation plans\n  --check_status        Check planning and code status for all theorems\n  --only_render         Only render scenes without combining videos\n  --scenes SCENES [SCENES ...]\n                        Specific scenes to process (if theorems_path is provided)\n```\n\n## Evaluation\nNote that Gemini and GPT4o is required for evaluation.\n\nCurrently, evaluation requires a video file and a subtitle file (SRT format).\n\nVideo evaluation:\n```shell\nusage: evaluate.py [-h]\n                   [--model_text {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}]\n                   [--model_video {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-2.0-flash-exp,gemini\u002Fgemini-2.0-pro-exp-02-05}]\n                   [--model_image {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}]\n                   [--eval_type {text,video,image,all}] --file_path FILE_PATH --output_folder OUTPUT_FOLDER [--retry_limit RETRY_LIMIT] [--combine] [--bulk_evaluate] [--target_fps TARGET_FPS]\n                   [--use_parent_folder_as_topic] [--max_workers MAX_WORKERS]\n\nAutomatic evaluation of theorem explanation videos with LLMs\n\noptions:\n  -h, --help            show this help message and exit\n  --model_text {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}\n                        Select the AI model to use for text evaluation\n  --model_video {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-2.0-flash-exp,gemini\u002Fgemini-2.0-pro-exp-02-05}\n                        Select the AI model to use for video evaluation\n  --model_image {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}\n                        Select the AI model to use for image evaluation\n  --eval_type {text,video,image,all}\n                        Type of evaluation to perform\n  --file_path FILE_PATH\n                        Path to a file or a theorem folder\n  --output_folder OUTPUT_FOLDER\n                        Directory to store the evaluation files\n  --retry_limit RETRY_LIMIT\n                        Number of retry attempts for each inference\n  --combine             Combine all results into a single JSON file\n  --bulk_evaluate       Evaluate a folder of theorems together\n  --target_fps TARGET_FPS\n                        Target FPS for video processing. If not set, original video FPS will be used\n  --use_parent_folder_as_topic\n                        Use parent folder name as topic name for single file evaluation\n  --max_workers MAX_WORKERS\n                        Maximum number of concurrent workers for parallel processing\n```\n* For `file_path`, it is recommended to pass a folder containing both an MP4 file and an SRT file.\n\n## Misc: Modify the system prompt in TheoremExplainAgent\n\nIf you want to modify the system prompt, you need to:\n\n1. Modify files in `task_generator\u002Fprompts_raw` folder.\n2. Run `task_generator\u002Fparse_prompt.py` to rebuild the `__init__.py` file.\n\n```python\ncd task_generator\npython parse_prompt.py\ncd ..\n```\n\n## TheoremExplainBench (TEB)\n\nTheoremExplainBench can be found on https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FTIGER-Lab\u002FTheoremExplainBench.\n\nHow to use:\n```python\nimport datasets\ndataset = datasets.load_dataset(\"TIGER-Lab\u002FTheoremExplainBench\")\n```\n\nDataset info:\n```shell\nDatasetDict({\n    train: Dataset({\n        features: ['uid', 'subject', 'difficulty', 'theorem', 'description', 'subfield'],\n        num_rows: 240\n    })\n})\n```\n\n## ❓ FAQ\n\nThe FAQ should cover the most common errors you could encounter. If you see something new, report it on issues.\n\nQ: Error `src.utils.kokoro_voiceover import KokoroService  # You MUST import like this as this is our custom voiceover service. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'src'`. \u003Cbr>\nA: Please run `export PYTHONPATH=$(pwd):$PYTHONPATH` when you start a new terminal. \u003Cbr>\n\nQ: Error `Files not found` \u003Cbr>\nA: Check your Manim installation. \u003Cbr>\n\nQ: Error `latex ...` \u003Cbr>\nA: Check your latex installation. \u003Cbr>\n\nQ: The output log is not showing response? \u003Cbr>\nA: It could be API-related issues. Make sure your `.env` file is properly configured (fill in your API keys), or you can enable litellm debug mode to figure out the issues. \u003Cbe>\n\nQ: Plans \u002F Scenes are missing? \u003Cbr>\nA: It could be API-related issues. Make sure your `.env` file is properly configured (fill in your API keys), or you can enable litellm debug mode to figure out the issues. \u003Cbr>\n\n\n## 🖊️ Citation\n\nPlease kindly cite our paper if you use our code, data, models or results:\n```bibtex\n@misc{ku2025theoremexplainagentmultimodalexplanationsllm,\n      title={TheoremExplainAgent: Towards Multimodal Explanations for LLM Theorem Understanding}, \n      author={Max Ku and Thomas Chong and Jonathan Leung and Krish Shah and Alvin Yu and Wenhu Chen},\n      year={2025},\n      eprint={2502.19400},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400}, \n}\n```\n\n## 🎫 License\n\nThis project is released under the [the MIT License](LICENSE).\n\n## ⭐ Star History\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTIGER-AI-Lab_TheoremExplainAgent_readme_94c31fada779.png)](https:\u002F\u002Fstar-history.com\u002F#TIGER-AI-Lab\u002FTheoremExplainAgent&Date)\n\n## 💞 Acknowledgements\n\nWe want to thank [Votee AI](https:\u002F\u002Fvotee.ai\u002F) for sponsoring API keys to access the close-sourced models.\n\nThe code is built upon the below repositories, we thank all the contributors for open-sourcing.\n* [Manim Community](https:\u002F\u002Fwww.manim.community\u002F)\n* [kokoro-manim-voiceover](https:\u002F\u002Fgithub.com\u002Fxposed73\u002Fkokoro-manim-voiceover)\n* [manim-physics](https:\u002F\u002Fgithub.com\u002FMatheart\u002Fmanim-physics)\n* [manim-Chemistry](https:\u002F\u002Fgithub.com\u002FUnMolDeQuimica\u002Fmanim-Chemistry)\n* [ManimML](https:\u002F\u002Fgithub.com\u002Fhelblazer811\u002FManimML)\n* [manim-dsa](https:\u002F\u002Fgithub.com\u002FF4bbi\u002Fmanim-dsa)\n* [manim-circuit](https:\u002F\u002Fgithub.com\u002FMr-FuzzyPenguin\u002Fmanim-circuit)\n\n## 🚨 Disclaimer\n\n**This work is intended for research purposes only. The authors do not encourage or endorse the use of this codebase for commercial applications. The code is provided \"as is\" without any warranties, and users assume all responsibility for its use.**\n\nTested Environment: MacOS, Linux\n","# 定理解释代理 (TEA) 🍵\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2502.19400-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400)\n\u003Ca href='https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2502.19400'>\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Paper&message=Huggingface&color=orange'>\u003C\u002Fa> \n\n[**🌐 主页**](https:\u002F\u002Ftiger-ai-lab.github.io\u002FTheoremExplainAgent\u002F)  | [**📖 arXiv**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400) | [**🤗 HuggingFace 数据集**](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FTIGER-Lab\u002FTheoremExplainBench) | [🎥视频数据](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F18kmzXvbxaFGyJw-g51jnq9m93v_ez4aJ\u002Fview) | [**▶️ YouTube**](https:\u002F\u002Fyoutu.be\u002F0G9YO637IVE)\n\n[![contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002FTIGER-AI-Lab\u002FTheoremExplainAgent)](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fgraphs\u002Fcontributors)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FTIGER-AI-Lab\u002FTheoremExplainAgent.svg)](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fblob\u002Fmain\u002FLICENSE)\n[![GitHub](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?style=social)](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent)\n![Hits](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTIGER-AI-Lab_TheoremExplainAgent_readme_5954c78a6c4f.png)\n\n\n本仓库包含我们论文《TheoremExplainAgent: 面向LLM定理理解的基于视频的多模态解释》的代码库（https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400）。\n\n**ACL 2025 主会**（口头报告）\n\n## 简介\nTheoremExplainAgent 是一种人工智能系统，能够生成长篇的 Manim 视频来直观地解释定理，在展示其深度理解的同时，揭示仅靠文本难以发现的推理漏洞。\n\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F17f2f4f2-8f2c-4abc-b377-ac92ebda69f3\n\n\n## 📰 新闻\n* 2025年6月24日：论文被选为口头报告（前3%）。\n* 2025年6月8日：我们发布了生成的视频数据，供研究人员作为基线参考。\n* 2025年5月15日：论文被接受至 ACL 2025 主会。\n* 2025年3月3日：生成代码和评估代码发布。感谢大家的耐心等待！\n\u003C!--* 2025年3月3日：在没有代码的情况下达到404颗星。-->\n* 2025年2月27日：论文已在 [Arxiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400) 上发布。感谢 AK 将我们的论文刊登在 [HF Daily](https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2502.19400) 上。\n\n## 下载生成的视频数据\n如果您只想试用代码，请跳过本节。\n如果您是研究人员，只需要这些基线视频作为对比基准，请在此处下载：\n```shell\nwget --save-cookies \u002Ftmp\u002Fcookies.txt --keep-session-cookies --no-check-certificate 'https:\u002F\u002Fdocs.google.com\u002Fuc?export=download&id=18kmzXvbxaFGyJw-g51jnq9m93v_ez4aJ' -O \u002Ftmp\u002Fgdrive.html && wget --load-cookies \u002Ftmp\u002Fcookies.txt -O baseline_videos.zip \"https:\u002F\u002Fdrive.usercontent.google.com\u002Fdownload?id=18kmzXvbxaFGyJw-g51jnq9m93v_ez4aJ&export=download&confirm=$(sed -rn 's\u002F.*name=\"confirm\" value=\"([^\"]+)\".*\u002F\\\\1\u002Fp' \u002Ftmp\u002Fgdrive.html)&uuid=$(sed -rn 's\u002F.*name=\"uuid\" value=\"([^\"]+)\".*\u002F\\\\1\u002Fp' \u002Ftmp\u002Fgdrive.html)\" && rm \u002Ftmp\u002Fgdrive.html \u002Ftmp\u002Fcookies.txt\n```\n\n## 安装\n\n> **如果您遇到任何问题，请查看此 README 文档中的【FAQ】部分**\u003Cbr>\n> **如果仍无法解决，请创建一个 issue**\n\n1. 设置 conda 环境\n```shell\nconda create --name tea python=3.12.8\nconda activate tea\npip install -r requirements.txt\n```\n\n2. 您可能还需要安装 LaTeX 和其他 Manim Community 的依赖项。更多详情请参阅 [Manim 安装文档](https:\u002F\u002Fdocs.manim.community\u002Fen\u002Fstable\u002Finstallation.html)。\n```shell\n# 如果您使用的是 Linux Ubuntu，可能需要以下依赖：\nsudo apt-get install portaudio19-dev\nsudo apt-get install libsdl-pango-dev\n```\n\n3. 接着使用以下命令下载 Kokoro 模型和语音文件，以启用 TTS 服务。\n\n```shell\nmkdir -p models && wget -P models https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fkokoro-v0_19.onnx && wget -P models https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fvoices.bin\n```\n\n4. 根据 `.env.template` 文件创建 `.env` 文件，并按照您选择使用的模型填写环境变量。\n可参考 [LiteLLM](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders) 文档。\n\n```shell\ntouch .env\n```\n然后打开 `.env` 文件，使用您喜欢的文本编辑器进行编辑。\n\n您的 `.env` 文件应如下所示：\n```shell\n# OpenAI\nOPENAI_API_KEY=\"\"\n\n# Azure OpenAI\nAZURE_API_KEY=\"\"\nAZURE_API_BASE=\"\"\nAZURE_API_VERSION=\"\"\n\n# Google Vertex AI\nVERTEXAI_PROJECT=\"\"\nVERTEXAI_LOCATION=\"\"\nGOOGLE_APPLICATION_CREDENTIALS=\"\"\n\n# Google Gemini\nGEMINI_API_KEY=\"\"\n\n...\n\n# Kokoro TTS 设置\nKOKORO_MODEL_PATH=\"models\u002Fkokoro-v0_19.onnx\"\nKOKORO_VOICES_PATH=\"models\u002Fvoices.bin\"\nKOKORO_DEFAULT_VOICE=\"af\"\nKOKORO_DEFAULT_SPEED=\"1.0\"\nKOKORO_DEFAULT_LANG=\"en-us\"\n```\n请根据您要使用的模型填写相应的 API 密钥。\n\n5. 配置 Python 路径。请注意，您需要配置 Python 路径才能正常运行。否则可能会遇到导入问题（例如无法导入 src 等）。\n```shell\nexport PYTHONPATH=$(pwd):$PYTHONPATH\n```\n\n6. （可选）若需设置 RAG，请参阅 [https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?tab=readme-ov-file#generation-with-rag](https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent?tab=readme-ov-file#generation-with-rag)。\n\n> **如果您遇到任何问题，请查看此 README 文档中的【FAQ】部分**\u003Cbr>\n> **如果仍无法解决，请创建一个 issue**\n\n## 生成\n\n### 支持的模型\n\u003C!--您可以自定义允许使用的模型，方法是编辑 `src\u002Futils\u002Fallowed_models.json` 文件。该文件指定了系统可以使用的 `model` 和 `helper_model`。--> \n模型命名遵循 LiteLLM 规范。有关模型命名的详细信息，请参阅 [LiteLLM 文档](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders)。\n\n### 单主题生成\n```shell\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fyour_exp_name\" \\\n      --topic \"your_topic\" \\\n      --context \"description of your topic, e.g. 'This is a topic about the properties of a triangle'\" \\\n```\n\n示例：\n```shell\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fmy_exp_name\" \\\n      --topic \"大 O 记号\" \\\n      --context \"计算机科学中用于衡量最坏情况复杂度最常见的渐近符号\" \\\n```\n\n### 批量生成\n```shell\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fmy_exp_name\" \\\n      --theorems_path data\u002Fthb_easy\u002Fmath.json \\\n      --max_scene_concurrency 7 \\\n      --max_topic_concurrency 20 \\\n```\n\n### 使用 RAG 生成视频\n在使用 RAG 之前，请从此 [Google Drive 链接](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Tn6J_JKVefFZRgZbjns93KLBtI9ullRv\u002Fview?usp=sharing) 下载 RAG 文档。下载后，请解压文件。例如，如果将其解压到 `data\u002Frag\u002Fmanim_docs`，则应将 `--manim_docs_path` 设置为 `data\u002Frag\u002Fmanim_docs`。向量数据库将在首次运行 RAG 时创建。\n\n```shell\npython generate_video.py \\\n            --model \"openai\u002Fo3-mini\" \\\n            --helper_model \"openai\u002Fo3-mini\" \\\n            --output_dir \"output\u002Fwith_rag\u002Fo3-mini\u002Fvtutorbench_easy\u002Fmath\" \\\n            --topic \"大 O 表示法\" \\\n            --context \"计算机科学中用于衡量最坏情况复杂度的最常见的渐近符号类型\" \\\n            --use_rag \\\n            --chroma_db_path \"data\u002Frag\u002Fchroma_db\" \\\n            --manim_docs_path \"data\u002Frag\u002Fmanim_docs\" \\\n            --embedding_model \"vertex_ai\u002Ftext-embedding-005\"\n```\n\n我们支持更多生成选项，详情如下：\n```shell\nusage: generate_video.py [-h]\n                         [--model]\n                         [--topic TOPIC] [--context CONTEXT]\n                         [--helper_model]\n                         [--only_gen_vid] [--only_combine] [--peek_existing_videos] [--output_dir OUTPUT_DIR] [--theorems_path THEOREMS_PATH]\n                         [--sample_size SAMPLE_SIZE] [--verbose] [--max_retries MAX_RETRIES] [--use_rag] [--use_visual_fix_code]\n                         [--chroma_db_path CHROMA_DB_PATH] [--manim_docs_path MANIM_DOCS_PATH]\n                         [--embedding_model {azure\u002Ftext-embedding-3-large,vertex_ai\u002Ftext-embedding-005}] [--use_context_learning]\n                         [--context_learning_path CONTEXT_LEARNING_PATH] [--use_langfuse] [--max_scene_concurrency MAX_SCENE_CONCURRENCY]\n                         [--max_topic_concurrency MAX_TOPIC_CONCURRENCY] [--debug_combine_topic DEBUG_COMBINE_TOPIC] [--only_plan] [--check_status]\n                         [--only_render] [--scenes SCENES [SCENES ...]]\n\n使用 AI 生成 Manim 视频\n\noptions:\n  -h, --help            显示此帮助信息并退出\n  --model               选择要使用的 AI 模型\n  --topic TOPIC         要生成视频的主题\n  --context CONTEXT     主题的背景信息\n  --helper_model        选择要使用的辅助模型\n  --only_gen_vid        仅根据现有计划生成视频\n  --only_combine        仅合并视频\n  --peek_existing_videos, --peek\n                        查看现有视频\n  --output_dir OUTPUT_DIR\n                        输出目录\n  --theorems_path THEOREMS_PATH\n                        定理 JSON 文件的路径\n  --sample_size SAMPLE_SIZE, --sample SAMPLE_SIZE\n                        要采样的定理数量\n  --verbose             打印详细输出\n  --max_retries MAX_RETRIES\n                        代码生成的最大重试次数\n  --use_rag, --rag      使用检索增强生成\n  --use_visual_fix_code, --visual_fix_code\n                        使用 VLM 根据渲染后的画面修复代码\n  --chroma_db_path CHROMA_DB_PATH\n                        Chroma DB 的路径\n  --manim_docs_path MANIM_DOCS_PATH\n                        Manim 文档的路径\n  --embedding_model {azure\u002Ftext-embedding-3-large,vertex_ai\u002Ftext-embedding-005}\n                        选择要使用的嵌入模型\n  --use_context_learning\n                        使用示例 Manim 代码进行上下文学习\n  --context_learning_path CONTEXT_LEARNING_PATH\n                        上下文学习示例的路径\n  --use_langfuse        启用 Langfuse 日志记录\n  --max_scene_concurrency MAX_SCENE_CONCURRENCY\n                        可同时处理的最大场景数\n  --max_topic_concurrency MAX_TOPIC_CONCURRENCY\n                        可同时处理的最大主题数\n  --debug_combine_topic DEBUG_COMBINE_TOPIC\n                        调试合并视频\n  --only_plan           仅生成场景大纲和实现计划\n  --check_status        检查所有定理的规划和代码状态\n  --only_render         仅渲染场景，不合并视频\n  --scenes SCENES [SCENES ...]\n                        要处理的具体场景（如果提供了 theorems_path）\n```\n\n## 评估\n请注意，评估需要使用 Gemini 和 GPT4o。\n\n目前，评估需要一个视频文件和一个字幕文件（SRT 格式）。\n\n视频评估：\n```shell\n用法：evaluate.py [-h]\n                   [--model_text {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}]\n                   [--model_video {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-2.0-flash-exp,gemini\u002Fgemini-2.0-pro-exp-02-05}]\n                   [--model_image {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}]\n                   [--eval_type {text,video,image,all}] --file_path FILE_PATH --output_folder OUTPUT_FOLDER [--retry_limit RETRY_LIMIT] [--combine] [--bulk_evaluate] [--target_fps TARGET_FPS]\n                   [--use_parent_folder_as_topic] [--max_workers MAX_WORKERS]\n\n使用 LLM 自动评估定理解释视频\n\n选项：\n  -h, --help            显示此帮助消息并退出\n  --model_text {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}\n                        选择用于文本评估的 AI 模型\n  --model_video {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-2.0-flash-exp,gemini\u002Fgemini-2.0-pro-exp-02-05}\n                        选择用于视频评估的 AI 模型\n  --model_image {gemini\u002Fgemini-1.5-pro-002,gemini\u002Fgemini-1.5-flash-002,gemini\u002Fgemini-2.0-flash-001,vertex_ai\u002Fgemini-1.5-flash-002,vertex_ai\u002Fgemini-1.5-pro-002,vertex_ai\u002Fgemini-2.0-flash-001,openai\u002Fo3-mini,gpt-4o,azure\u002Fgpt-4o,azure\u002Fgpt-4o-mini,bedrock\u002Fanthropic.claude-3-5-sonnet-20240620-v1:0,bedrock\u002Fanthropic.claude-3-5-sonnet-20241022-v2:0,bedrock\u002Fanthropic.claude-3-5-haiku-20241022-v1:0,bedrock\u002Fus.anthropic.claude-3-7-sonnet-20250219-v1:0}\n                        选择用于图像评估的 AI 模型\n  --eval_type {text,video,image,all}\n                        要执行的评估类型\n  --file_path FILE_PATH\n                        文件或定理文件夹的路径\n  --output_folder OUTPUT_FOLDER\n                        存储评估文件的目录\n  --retry_limit RETRY_LIMIT\n                        每次推理的重试次数\n  --combine             将所有结果合并到一个 JSON 文件中\n  --bulk_evaluate       一起评估一个定理文件夹\n  --target_fps TARGET_FPS\n                        视频处理的目标帧率。如果不设置，则使用原始视频的帧率\n  --use_parent_folder_as_topic\n                        对单个文件进行评估时，将父文件夹名称用作主题名称\n  --max_workers MAX_WORKERS\n                        并行处理的最大工作线程数\n```\n* 对于 `file_path`，建议传递一个同时包含 MP4 文件和 SRT 文件的文件夹。\n\n## 杂项：修改 TheoremExplainAgent 中的系统提示\n\n如果您想修改系统提示，您需要：\n\n1. 修改 `task_generator\u002Fprompts_raw` 文件夹中的文件。\n2. 运行 `task_generator\u002Fparse_prompt.py` 以重新构建 `__init__.py` 文件。\n\n```python\ncd task_generator\npython parse_prompt.py\ncd ..\n```\n\n## TheoremExplainBench (TEB)\n\nTheoremExplainBench 可以在 https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FTIGER-Lab\u002FTheoremExplainBench 上找到。\n\n使用方法：\n```python\nimport datasets\ndataset = datasets.load_dataset(\"TIGER-Lab\u002FTheoremExplainBench\")\n```\n\n数据集信息：\n```shell\nDatasetDict({\n    train: Dataset({\n        features: ['uid', 'subject', 'difficulty', 'theorem', 'description', 'subfield'],\n        num_rows: 240\n    })\n})\n```\n\n## ❓ 常见问题解答\n\n常见问题解答应涵盖您可能遇到的最常见错误。如果您遇到新的问题，请在 issues 中报告。\n\n问：错误 `src.utils.kokoro_voiceover import KokoroService  # 您必须这样导入，因为这是我们的自定义配音服务。 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: 没有名为 'src' 的模块`。\u003Cbr>\n答：请在启动新终端时运行 `export PYTHONPATH=$(pwd):$PYTHONPATH`。\u003Cbr>\n\n问：错误 `未找到文件`。\u003Cbr>\n答：请检查您的 Manim 安装。\u003Cbr>\n\n问：错误 `latex ...`。\u003Cbr>\n答：请检查您的 LaTeX 安装。\u003Cbr>\n\n问：输出日志没有显示响应？\u003Cbr>\n答：这可能是 API 相关的问题。请确保您的 `.env` 文件配置正确（填写您的 API 密钥），或者您可以启用 litellm 调试模式来找出问题所在。\u003Cbe>\n\n问：计划 \u002F 场景缺失？\u003Cbr>\n答：这可能是 API 相关的问题。请确保您的 `.env` 文件配置正确（填写您的 API 密钥），或者您可以启用 litellm 调试模式来找出问题所在。\u003Cbr>\n\n\n## 🖊️ 引用\n\n如果您使用我们的代码、数据、模型或结果，请务必引用我们的论文：\n```bibtex\n@misc{ku2025theoremexplainagentmultimodalexplanationsllm,\n      title={TheoremExplainAgent: 向多模态解释迈进——用于 LLM 定理理解}, \n      author={Max Ku 和 Thomas Chong 和 Jonathan Leung 和 Krish Shah 和 Alvin Yu 和 Wenhu Chen},\n      year={2025},\n      eprint={2502.19400},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.19400}, \n}\n```\n\n## 🎫 许可证\n\n本项目采用 [MIT 许可证](LICENSE) 发布。\n\n## ⭐ 星标历史\n\n[![星标历史图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTIGER-AI-Lab_TheoremExplainAgent_readme_94c31fada779.png)](https:\u002F\u002Fstar-history.com\u002F#TIGER-AI-Lab\u002FTheoremExplainAgent&Date)\n\n## 💞 致谢\n\n我们感谢 [Votee AI](https:\u002F\u002Fvotee.ai\u002F) 捐赠了用于访问闭源模型的 API 密钥。\n\n本代码基于以下仓库构建，我们感谢所有贡献者将其开源：\n* [Manim Community](https:\u002F\u002Fwww.manim.community\u002F)\n* [kokoro-manim-voiceover](https:\u002F\u002Fgithub.com\u002Fxposed73\u002Fkokoro-manim-voiceover)\n* [manim-physics](https:\u002F\u002Fgithub.com\u002FMatheart\u002Fmanim-physics)\n* [manim-Chemistry](https:\u002F\u002Fgithub.com\u002FUnMolDeQuimica\u002Fmanim-Chemistry)\n* [ManimML](https:\u002F\u002Fgithub.com\u002Fhelblazer811\u002FManimML)\n* [manim-dsa](https:\u002F\u002Fgithub.com\u002FF4bbi\u002Fmanim-dsa)\n* [manim-circuit](https:\u002F\u002Fgithub.com\u002FMr-FuzzyPenguin\u002Fmanim-circuit)\n\n## 🚨 免责声明\n\n**本作品仅用于研究目的。作者不鼓励也不支持将此代码库用于商业用途。代码按“原样”提供，不提供任何担保，用户需自行承担使用该代码的所有责任。**\n\n测试环境：MacOS、Linux","# TheoremExplainAgent (TEA) 快速上手指南\n\nTheoremExplainAgent 是一个 AI 系统，能够生成长格式的 Manim 动画视频，以可视化方式解释数学定理，展示大模型对定理的深度理解。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**: 推荐 Linux (Ubuntu)，Windows\u002FmacOS 可能需要额外配置 Manim 依赖。\n- **Python 版本**: 3.12.8 (必须严格匹配)。\n- **磁盘空间**: 需预留足够空间存放模型文件及生成的视频数据。\n\n### 前置依赖\n在开始安装前，请确保系统已安装以下基础工具：\n- **Conda**: 用于管理 Python 环境。\n- **LaTeX**: Manim 渲染视频所必需（如 `texlive`）。\n- **系统库 (Ubuntu)**:\n  ```bash\n  sudo apt-get update\n  sudo apt-get install portaudio19-dev libsdl-pango-dev\n  ```\n  *注：其他 Linux 发行版或 macOS 用户请参考 [Manim 官方安装文档](https:\u002F\u002Fdocs.manim.community\u002Fen\u002Fstable\u002Finstallation.html) 安装对应依赖。*\n\n## 安装步骤\n\n### 1. 创建并激活 Conda 环境\n```bash\nconda create --name tea python=3.12.8\nconda activate tea\n```\n\n### 2. 安装 Python 依赖\n```bash\npip install -r requirements.txt\n```\n*国内用户建议使用清华或阿里镜像源加速安装：*\n```bash\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 3. 下载 TTS 模型 (Kokoro)\n下载语音合成所需的模型文件和声音配置文件：\n```bash\nmkdir -p models \nwget -P models https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fkokoro-v0_19.onnx \nwget -P models https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fvoices.bin\n```\n*若下载速度慢，可手动在浏览器下载后放入 `models` 目录。*\n\n### 4. 配置环境变量\n复制模板文件并编辑 `.env`，填入你所使用的 LLM API Key（支持 OpenAI, Azure, Google Vertex\u002FGemini 等）：\n```bash\ntouch .env\n```\n使用文本编辑器打开 `.env`，参考以下格式填写：\n```shell\n# OpenAI 示例\nOPENAI_API_KEY=\"sk-...\"\n\n# Google Gemini 示例\nGEMINI_API_KEY=\"...\"\n\n# Kokoro TTS 设置 (通常无需修改，除非路径变动)\nKOKORO_MODEL_PATH=\"models\u002Fkokoro-v0_19.onnx\"\nKOKORO_VOICES_PATH=\"models\u002Fvoices.bin\"\nKOKORO_DEFAULT_VOICE=\"af\"\nKOKORO_DEFAULT_SPEED=\"1.0\"\nKOKORO_DEFAULT_LANG=\"en-us\"\n```\n*详细提供商配置请参考 [LiteLLM 文档](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders)。*\n\n### 5. 配置 Python 路径\n为避免导入错误，需将当前项目路径加入 `PYTHONPATH`：\n```bash\nexport PYTHONPATH=$(pwd):$PYTHONPATH\n```\n*建议将此命令添加到 `~\u002F.bashrc` 或 `~\u002F.zshrc` 中，或在每次激活环境后执行。*\n\n## 基本使用\n\n### 生成单个定理视频\n使用 `generate_video.py` 脚本，指定模型、主题和上下文描述即可生成视频。\n\n**示例：生成关于“大 O 表示法”的解释视频**\n```bash\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fmy_exp_name\" \\\n      --topic \"Big O notation\" \\\n      --context \"most common type of asymptotic notation in computer science used to measure worst case complexity\"\n```\n\n### 参数说明\n- `--model`: 主推理模型（遵循 LiteLLM 命名规范，如 `openai\u002Fgpt-4o`, `gemini\u002Fgemini-1.5-pro`）。\n- `--helper_model`: 辅助模型，可用于代码校验或子任务。\n- `--topic`: 定理或知识点的名称。\n- `--context`: 对该主题的简要描述，帮助模型更好地理解背景。\n- `--output_dir`: 视频及中间文件的输出目录。\n\n### 批量生成（可选）\n若需批量处理预定义的定理列表（JSON 格式）：\n```bash\npython generate_video.py \\\n      --model \"openai\u002Fo3-mini\" \\\n      --helper_model \"openai\u002Fo3-mini\" \\\n      --output_dir \"output\u002Fbatch_exp\" \\\n      --theorems_path data\u002Fthb_easy\u002Fmath.json \\\n      --max_scene_concurrency 7 \\\n      --max_topic_concurrency 20\n```\n\n> **提示**: 生成过程依赖所选模型的 API 响应速度及本地 GPU\u002FCPU 渲染能力。如遇渲染错误，请检查 LaTeX 及 Manim 依赖是否安装完整。","一位数学教育博主正在制作关于“斯托克斯定理”的深度科普视频，试图向观众直观展示向量场在曲面与边界曲线间的积分关系。\n\n### 没有 TheoremExplainAgent 时\n- **抽象难懂**：仅靠口播和静态公式，观众难以在脑海中构建三维空间中曲面法向量与边界切向量的动态关联，导致完播率极低。\n- **制作门槛高**：若要手动制作高质量动画，博主需精通 Manim 引擎或 After Effects，编写数百行代码逐帧绘制几何变换，耗时数天甚至数周。\n- **逻辑隐蔽错误**：纯文本推导容易掩盖推理漏洞，博主可能在未察觉的情况下混淆了积分方向或适用条件，直到发布后被专业观众指出。\n- **多模态割裂**：配音、字幕与画面往往分开制作，难以保证语音讲解的节奏与图形变化的瞬间完美同步，影响学习体验。\n\n### 使用 TheoremExplainAgent 后\n- **视觉化呈现**：TheoremExplainAgent 自动生成包含完整推导过程的长视频，动态演示曲面收缩为边界曲线的连续变形过程，让抽象概念一目了然。\n- **自动化生产**：只需输入定理描述，系统即可调用 Manim 引擎自动编排场景、生成图形并合成 Kokoro 语音，将数天的工作量压缩至分钟级。\n- **深度推理验证**：系统在生成视频过程中通过多模态对齐自我审视，主动发现并修正了初始提示中关于“右手定则”方向的逻辑瑕疵，确保内容严谨。\n- **音画完美同步**：生成的视频中，关键公式的高亮、图形的旋转与语音解说严格对应，实现了真正的多模态融合教学。\n\nTheoremExplainAgent 通过将深奥的数学证明转化为直观的动态视频，不仅极大降低了高阶知识的生产成本，更以视觉化的方式揭示了纯文本无法发现的逻辑细节。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTIGER-AI-Lab_TheoremExplainAgent_7dfd51b6.png","TIGER-AI-Lab","TIGER Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FTIGER-AI-Lab_41df1eb9.jpg","Our lab is currently based in UWaterloo, focusing on Text and Image Generative Research",null,"wenhuchen@uwaterloo.ca","https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab",[80],{"name":81,"color":82,"percentage":83},"Python","#3572A5",100,1478,196,"2026-04-14T15:36:55","MIT",4,"Linux, macOS, Windows","未说明 (主要依赖外部 API 模型如 OpenAI\u002FGemini，本地仅运行 Kokoro TTS ONNX 模型和 Manim 渲染，通常无需专用 GPU，但视频渲染可能受益于 GPU 加速)","未说明 (建议 16GB+ 以支持多并发场景生成和视频渲染)",{"notes":93,"python":94,"dependencies":95},"1. 必须安装 LaTeX 和 Manim Community 的系统依赖（Linux 下需额外安装 portaudio 和 libsdl-pango）。2. 需配置 .env 文件填入 LLM (如 OpenAI, Gemini) 和 TTS 的 API Key 或本地路径。3. 需手动下载 Kokoro TTS 模型文件 (onnx 和 voices.bin)。4. 若使用 RAG 功能，需额外下载并解压 Manim 文档数据集。5. 评估功能强制要求拥有 Gemini 或 GPT-4o 的访问权限。","3.12.8",[96,97,98,99,100,101,102],"manim","kokoro-onnx","litellm","chromadb","portaudio19-dev (Linux)","libsdl-pango-dev (Linux)","latex (系统级依赖)",[35,13,104,14],"视频",[106,96,107,108,109],"llm-agents","manim-animations","manim-video","rag","2026-03-27T02:49:30.150509","2026-04-16T16:09:15.574558",[113,118,123,128,133,137],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},36019,"项目源代码何时开源？是否有具体的发布计划？","维护者已制定并在两周内执行了开源计划，目前以下内容均已发布：\n1. 定理数据集 (Theorem Dataset)\n2. TheoremExplainBench 评估代码\n3. TheoremExplainAgent 生成的视频（供研究人员基准测试使用）\n4. 用于运行新视频的 TheoremExplainAgent 源代码。","https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fissues\u002F1",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},36020,"运行脚本时遇到导入错误或场景代码未生成，如何解决？","这通常是因为 Python 路径未正确配置。在启动新终端运行项目前，必须执行以下命令将当前目录添加到 PYTHONPATH 中：\n\n对于 Linux\u002FMac:\nexport PYTHONPATH=$(pwd):$PYTHONPATH\n\n对于 Windows (PowerShell):\n$env:PYTHONPATH = (Get-Location).Path + \";\" + $env:PYTHONPATH\n\n如果不执行此步骤，可能会遇到模块导入失败或无法生成场景代码的问题。","https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fissues\u002F6",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},36021,"遇到 \"ValueError: latex error converting to dvi\" 错误怎么办？","该错误表明 LaTeX 没有正确安装或配置。请检查并重新安装 LaTeX 以及 Manim。确保安装版本与操作系统兼容，并且环境变量配置正确。重新安装后通常能解决此问题。","https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fissues\u002F9",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},36022,"视频与音频合成阶段耗时过长（如接近 30 分钟）且无输出，原因是什么？","该项目使用 Kokoro 进行语音合成 (TTS)。如果视频合成阶段耗时异常，通常是因为 ffmpeg 未正确安装或配置。请检查系统中 ffmpeg 的路径是否已添加到环境变量，并确保其版本兼容。","https:\u002F\u002Fgithub.com\u002FTIGER-AI-Lab\u002FTheoremExplainAgent\u002Fissues\u002F14",{"id":134,"question_zh":135,"answer_zh":136,"source_url":122},36023,"如何在非 Conda 环境（如原生 Windows 或 Mac）中下载并配置 Kokoro 语音模型文件？","如果不使用 Conda，需要手动下载模型文件到项目的 `models` 目录。\n\nWindows (PowerShell) 命令示例:\nNew-Item -ItemType Directory -Path \"models\"; Invoke-WebRequest -Uri \"https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fkokoro-v0_19.onnx\" -OutFile \"models\u002Fkokoro-v0_19.onnx\"; Invoke-WebRequest -Uri \"https:\u002F\u002Fgithub.com\u002Fthewh1teagle\u002Fkokoro-onnx\u002Freleases\u002Fdownload\u002Fmodel-files\u002Fvoices.bin\" -OutFile \"models\u002Fvoices.bin\"\n\n下载完成后，请确保同时正确设置了 PYTHONPATH 环境变量。",{"id":138,"question_zh":139,"answer_zh":140,"source_url":122},36024,"在 Windows 上运行项目需要哪些额外的系统配置？","在 Windows 上运行该项目（不使用 WSL 时），除了安装 Python 依赖外，还需要：\n1. 安装适用于 Windows 的 LaTeX 发行版。\n2. 安装 ffmpeg 并将其添加到系统环境变量。\n3. 正确安装 Manim (`pip install manim`)。\n4. 按照项目要求手动配置 PYTHONPATH 环境变量。\n5. 确保所有工具的路径都对系统可见，以避免渲染或转换错误。",[]]