From 0513f4ffebdb0d9b8b8fe5f3b1b6bb7f9734d898 Mon Sep 17 00:00:00 2001 From: "2287551746@qq.com" <2287551746@example.com> Date: Fri, 7 Nov 2025 11:02:15 +0800 Subject: [PATCH] 2025.11.7 --- 07_rag_advanced/04_memory_rag_agent.py | 1 + README.md | 36 +++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/07_rag_advanced/04_memory_rag_agent.py b/07_rag_advanced/04_memory_rag_agent.py index 7069c85..c362201 100644 --- a/07_rag_advanced/04_memory_rag_agent.py +++ b/07_rag_advanced/04_memory_rag_agent.py @@ -32,6 +32,7 @@ def build_rag_chain(llm_instance): if not os.path.exists(Persist_directory): raise FileNotFoundError(f'索引目录{Persist_directory}未找到,请先运行 build_index.py') + # 链接向量数据库 embedding_model = HuggingFaceEmbeddings(model_name=Embedding_model) db = Chroma( persist_directory=Persist_directory, diff --git a/README.md b/README.md index 4236d1c..4f75610 100644 --- a/README.md +++ b/README.md @@ -23,24 +23,24 @@ > 💡 每个模块对应独立目录(含代码、说明与示例),可独立运行与学习。 > 🔥 已更新至 07 Rag 进阶篇,持续更新中! -| 章节 | 模块 | 博客 | 核心关键词 | 难度 | -|:-----------:|:--------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------:|:------------------------------------------|:----:| -| 🏗️ **基础篇** | [01 Agent 入门 & 环境搭建](https://github.com/Annyfee/agent-craft/tree/main/01_agent_introduction) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153729555) | OpenAI API | ⭐ | -| | [02 LLM 基础调用](https://github.com/Annyfee/agent-craft/tree/main/02_llm_fundamentals) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153735431) | LLM API 调用 · prompt · 上下文记忆 | ⭐ | -| | [03 Function Calling 与工具调用](https://github.com/Annyfee/agent-craft/tree/main/03_function_calling_tools) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153866573) | Function Call · 工具函数封装 | ⭐⭐ | -| ⚙️ **框架篇** | [04 LangChain 基础篇](https://github.com/Annyfee/agent-craft/tree/main/04_langchain_basics) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153978186) | LLM · Prompt · Chain · Memory | ⭐⭐ | -| | [05 LangChain 进阶篇](https://github.com/Annyfee/agent-craft/tree/main/05_langchain_advanced) | [🏠](https://blog.csdn.net/2401_87328929/article/details/154064397) | Agents · 缓存 · 流式输出 | ⭐⭐⭐ | -| | [06 RAG 基础篇](https://github.com/Annyfee/agent-craft/tree/main/06_rag_basics) | [🏠](https://blog.csdn.net/2401_87328929/article/details/154230067) | RAG概念 · Split · Embedding · FAISS · RAG 链 | ⭐⭐ | -| | [07 RAG 进阶篇](https://github.com/Annyfee/agent-craft/tree/main/07_rag_advanced) | [🏠](https://blog.csdn.net/2401_87328929/article/details/154408744) | Chroma · Reranker · RAG工具化 · 集成 | ⭐⭐⭐ | -| | 08 LangGraph 入门 | 🚧撰写中 | Flow · Node · Edge 控制 | ⭐⭐⭐ | -| 🧠 **智能篇** | 09 MCP 基础 | 🚧 | MCP 协议 · 客户端安装 | ⭐⭐ | -| | 10 MCP 进阶 | 🚧 | 在线模型接入 · 多轮任务 | ⭐⭐⭐ | -| | 11 MCP 高级 | 🚧 | 多服务组合 · 并发调用 | ⭐⭐⭐⭐ | -| | 12 多步骤任务规划(MCP Task Planning) | 🚧 | Task Planning · CoT | ⭐⭐⭐ | -| | 13 多智能体协作 | 🚧 | Multi-Agent · 通信机制 | ⭐⭐⭐⭐ | -| | 14 综合案例实战 | 🚧 | LangChain + RAG + Tool + Memory | ⭐⭐⭐⭐ | -| 🚀 **工程篇** | 15 部署与本地化 | 🚧 | Ollama · LM Studio · API代理 | ⭐⭐⭐ | -| | 16 Agent SDK 封装 | 🚧 | 模块化封装 · SDK 架构 | ⭐⭐⭐⭐ | +| 章节 | 模块 | 博客 | 核心关键词 | 难度 | +|:-----------:|:--------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------:|:----------------------------------------------------|:-----:| +| 🏗️ **基础篇** | [01 Agent 入门 & 环境搭建](https://github.com/Annyfee/agent-craft/tree/main/01_agent_introduction) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153729555) | OpenAI API | ⭐ | +| | [02 LLM 基础调用](https://github.com/Annyfee/agent-craft/tree/main/02_llm_fundamentals) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153735431) | LLM API 调用 · prompt · 上下文记忆 | ⭐ | +| | [03 Function Calling 与工具调用](https://github.com/Annyfee/agent-craft/tree/main/03_function_calling_tools) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153866573) | Function Call · 工具函数封装 | ⭐⭐ | +| ⚙️ **框架篇** | [04 LangChain 基础篇](https://github.com/Annyfee/agent-craft/tree/main/04_langchain_basics) | [🏠](https://blog.csdn.net/2401_87328929/article/details/153978186) | LLM · Prompt · Chain · Memory | ⭐⭐ | +| | [05 LangChain 进阶篇](https://github.com/Annyfee/agent-craft/tree/main/05_langchain_advanced) | [🏠](https://blog.csdn.net/2401_87328929/article/details/154064397) | Agents · 缓存 · 流式输出 | ⭐⭐⭐ | +| | [06 RAG 基础篇](https://github.com/Annyfee/agent-craft/tree/main/06_rag_basics) | [🏠](https://blog.csdn.net/2401_87328929/article/details/154230067) | RAG概念 · Split · Embedding · FAISS · RAG 链 | ⭐⭐ | +| | [07 RAG 进阶篇](https://github.com/Annyfee/agent-craft/tree/main/07_rag_advanced) | [🏠](https://blog.csdn.net/2401_87328929/article/details/154408744) | Chroma · Reranker · RAG工具化 · 集成 | ⭐⭐⭐ | +| | 08 LangGraph 基础 | 🚧撰写中 | `State` · `Node` · `Conditional Edge` · RAG+反思 | ⭐⭐⭐ | +| | 09 LangGraph 进阶 | 🚧 | `Multi-Agent` · `Human-in-the-Loop` · “总控-员工”架构 | ⭐⭐⭐⭐ | +| 🧠 **智能篇** | 10 MCP 基础 (Client) | 🚧 | `MCP` 协议 · `CherryStudio` · 消费公共 MCP | ⭐⭐⭐ | +| | 11 MCP 进阶 (Server) | 🚧 | `Streamable HTTP` · `src layout` · 构建私有 MCP | ⭐⭐⭐⭐ | +| | 12 Swarm & Agents SDK | 🚧 | `Swarm` · `Handoff` · “航空公司客服”项目 | ⭐⭐⭐⭐ | +| 🏁 **实战篇** | 13 Streamlit 快速入门 | 🚧 | `st.chat_input` · `st.session_state` · 封装 RAG Agent | ⭐⭐⭐ | +| | 14 综合实战项目 | 🚧 | "后端双模" (LangGraph+Swarm) + RAG + MCP + Vercel | ⭐⭐⭐⭐⭐ | +| 🚀 **工程篇** | 15 部署与本地化 | 🚧 | `Ollama` · `LM Studio` · `LangServe` | ⭐⭐⭐ | +| | **16 项目打包与发布** | 🚧 | `pyproject.toml` · `pip build` · `setuptools` · 发布 | ⭐⭐⭐⭐ | ---