项目简介
汇集 100+ 可运行的 AI 智能体与 RAG 模板,涵盖多智能体、语音 AI 等,每个模板提供完整源代码,支持多种大模型,Apache-2.0 许可。
README 预览
\n \n \n \n\n\n\n \n \n \n \n \n \n\n\n\n \n Deutsch | \n Español | \n français | \n 日本語 | \n 한국어 | \n Português | \n Русский | \n 中文\n\n\n\n\n\n\n# 🌟 Awesome LLM Apps\n\n100+ AI Agent & RAG apps you can actually run — clone, customize, ship.\nAI Agents · Always-on Agents · Multi-agent Teams · MCP Agents · RAG · Voice Agents · Agent Skills · Fine-tuning\n\n\nFree step-by-step tutorials on Unwind AI\nWorks with Claude · Gemini · OpenAI · xAI · Qwen · Llama\n\n\n\n\n\n\n\n\n\n\n\n 🚀 Quick Start \n 📂 Browse Templates \n 📚 Step-by-Step Tutorials \n\n\n\n \n\n\n\n\n---\n\n## 💡 Why this exists\n\nYou shouldn't have to rebuild the same RAG pipeline, agent loop, or MCP integration from scratch every time you start a new LLM project.\n\n**Awesome LLM Apps is a cookbook of ready-to-run templates** - starter code you can fork, customize, and ship as a production LLM app. Every template here is self-contained with full source code, not collected from elsewhere.\n\n- 🛠️ **Hand-built, not curated** - every template is original work, tested end-to-end before it ships.\n- 🧪 **Runs in 3 commands** - no broken `requirements.txt`, no "figure it out yourself" scaffolding.\n- 🧠 **Covers the modern AI stack** - AI Agents, Always-on Agents, Multi-agent Teams, MCP Agents, Voice AI Agents, RAG, Agent Skills, Fine-tuning.\n- 🌐 **Provider-agnostic** - switch between Claude, Gemini, GPT, Llama, Qwen, xAI and others with a config change.\n- 📚 **Step-by-step tutorials** - every featured template has a free walkthrough on [Unwind AI](https://www.theunwindai.com).\n- 💸 **Apache-2.0** - fork it, ship it, sell it. No paywall, no signup, no telemetry.\n\n> ⭐ **If this saves you time, [star the repo](https://github.com/Shubhamsaboo/awesome-llm-apps/stargazers) - that's how the next developer discovers it.**\n\n## 🚀 Quick Start\n\nRun your first agent in **30 seconds**:\n\n```bash\ngit clone https://github.com/Shubhamsaboo/a
常见问题 (4)
故障排除为什么我的 Unsloth 微调模型在推理时会崩溃?如何修复 SFTTrainer 的 tokenizer 设置?
需要进行两项修复:(1) 将 tokenizer 显式传递给 trainer:SFTTrainer(model=model, tokenizer=tokenizer, ...),以便正确处理你的聊天模板中的 padding 和特殊 token。同时添加 data_collator=DataCollatorForSeq2Seq(tokenizer=tokenizer),使损失仅在生成的答案上计算,而不是在 prompt 上计算。(2) 训练完成后,同时保存模型和 tokenizer:model.save_pretrained("finetuned_model") 和 tokenizer.save_pretrained("finetuned_model")。如果跳过 tokenizer 的保存,会丢失已应用的聊天模板(例如 llama-3.1),从而导致推理失败。另请注意,较新版本的 TRL 在 args 参数中使用 SFTConfig 而非 TrainingArguments。
故障排除为什么使用 exp(-distance) 作为相似度分数时,FAISS L2 语义搜索不返回任何结果?
exp(-distance) 在数学上不适用于 FAISS L2 距离(IndexFlatL2/HNSW-L2/IVF-L2),因此真实匹配无法通过 85% 的阈值,而完全匹配(distance=0)的得分反而为 0。请将其替换为正确的 L2 到余弦相似度的转换:对于归一化的嵌入向量,cosine_similarity = 1 - (distance**2) / 2。此问题已在 PR #1156(于 2026-09-14 合并)中修复,修复方式是在 beifong/tools/embedding_search.py 中新增 l2_distance_to_cosine_similarity 函数——请更新到包含该 PR 的版本,或在与相似度阈值进行比较之前,在你自己的代码中应用相同的转换。
故障排除为什么 AI News and Podcast Agents 应用即使在播客脚本为空或缺少部分内容时仍报告成功?
这是由 advanced_ai_agents/multi_agent_apps/ai_news_and_podcast_agents/beifong/agents/script_agent.py(第 129–134 行)中的一个布尔逻辑 bug 引起的。失败检查使用了 and 而不是 or,使其成为死代码:
# Buggy
if not session_state["generated_script"] and not session_state["generated_script"].get("sections"):
使用 and 时,当 generated_script 有效但没有 sections 时,第一个条件为 False,因此整个检查会被跳过——不完整的脚本会被当作成功处理。而当 generated_script 为 None 时,第二个条件可能会在 .get() 上抛出 AttributeError。
**修复:**将 and 替换为 or,这样当脚本缺失或没有 sections 时,失败分支就会触发:
if not session_state.get("generated_script") or not session_state["generated_script"].get("sections"):
return "Failed to generate podcast script."
使用 or 时,Python 会安全地短路求值:如果脚本为 None/空,第一个条件为 True,.get() 永远不会在无效值上被调用。
故障排除如何修复 ai-deep-research-agent Dockerfile 中生命周期已结束的 node:20-slim 基础镜像?
将 generative_ui_agents/ai-deep-research-agent/Dockerfile 中的基础镜像从 node:20-slim 更新为当前仍在支持的版本线:node:22-slim、node:24-slim 或 node:26-slim。Node 20 已于 2026-04-30 终止支持(EOL),不再接收安全补丁——2026 年 6 月和 7 月的 Node 安全版本仅修复了 22.x/24.x/26.x 中的高危(HIGH)CVE(例如 CVE-2026-48933、CVE-2026-48618),而已 EOL 的版本线将永久暴露于这些漏洞之下。由于该 Dockerfile 采用单阶段构建,基础镜像就是最终发布镜像中的内容。请注意,Dependabot 的 docker 生态系统不会对 EOL 基础镜像发出告警,因此过时的标签不会产生任何警告——必须手动进行更改并重新构建镜像。