Browse Source

feat: 更新文档

master
yuanjs@qutke.com 4 weeks ago
parent
commit
740fccb6e4
  1. 58
      README.md
  2. BIN
      img/1-21919531.png
  3. BIN
      img/1-3069367.png
  4. BIN
      img/1-3135889.png
  5. BIN
      img/1-3222765.png
  6. BIN
      img/1-3479667.png
  7. BIN
      img/1-3677655.png
  8. BIN
      img/12.png
  9. BIN
      img/3-3070285.png
  10. BIN
      img/image-20250328123503960.png
  11. BIN
      img/image-20250329170410782.png
  12. BIN
      img/image-20250329170551464.png
  13. BIN
      img/image-20250329175530690.png
  14. BIN
      img/image-20250329181733895.png
  15. BIN
      img/image-20250331231807616.png
  16. BIN
      img/image-20250401104847864.png
  17. BIN
      img/image-20250404162420533.png
  18. BIN
      img/image-20250404162459285.png
  19. BIN
      img/image-20250414104551285.png
  20. BIN
      img/image-20250418190055953.png
  21. BIN
      img/image-20250421203059141.png
  22. BIN
      img/image-20250421213741268.png
  23. BIN
      img/image-20250427120524719.png
  24. BIN
      img/tool_invocation-7f277888701ee431a17607f1a035c080-20250328134624442.png
  25. BIN
      img/tool_results-71b4b90f33a56563c102d91e7821a993.png
  26. 36
      src/test/java/org/ycloud/aipan/ChangeImages.java

58
README.md

@ -10927,7 +10927,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 类比:一个具备自主决策能力的虚拟助手,能根据目标自主调用工具完成任务 * 类比:一个具备自主决策能力的虚拟助手,能根据目标自主调用工具完成任务
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/1-3069367.png" alt="1" style="zoom:50%;" /> <img src="./img/1-3069367.png" alt="1" style="zoom:50%;" />
@ -10941,7 +10941,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
| 输出形式 | 自然语言 | 结构化动作序列 | | 输出形式 | 自然语言 | 结构化动作序列 |
| 应用场景 | 内容创作/问答 | 复杂任务自动化 | | 应用场景 | 内容创作/问答 | 复杂任务自动化 |
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/3-3070285.png" alt="3" style="zoom:50%;" /> <img src="./img/3-3070285.png" alt="3" style="zoom:50%;" />
* 常规大模型和Agent案例场景对比 * 常规大模型和Agent案例场景对比
@ -11117,7 +11117,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 简单定义, **需要加上文档字符串注释描述,AI才知道工具的用途** * 简单定义, **需要加上文档字符串注释描述,AI才知道工具的用途**
``` ```python
from langchain_core.tools import tool from langchain_core.tools import tool
@tool @tool
@ -11380,9 +11380,9 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
最终结果: content='3 乘以 12 的结果是 36。' additional_kwargs={'refusal': None} response_metadata={'token_usage': {'completion_tokens': 16, 'prompt_tokens': 272, 'total_tokens': 288, 'completion_tokens_details': None, 'prompt_tokens_details': {'audio_tokens': None, 'cached_tokens': 0}}, 'model_name': 'qwen-plus', 'system_fingerprint': None, 'id': 'chatcmpl-b499cd0b-29d4-9d83-8473-e41d7214223d', 'finish_reason': 'stop', 'logprobs': None} id='run-8046aa25-091a-4df3-a49a-aa36811c8d44-0' usage_metadata={'input_tokens': 272, 'output_tokens': 16, 'total_tokens': 288, 'input_token_details': {'cache_read': 0}, 'output_token_details': {}} 最终结果: content='3 乘以 12 的结果是 36。' additional_kwargs={'refusal': None} response_metadata={'token_usage': {'completion_tokens': 16, 'prompt_tokens': 272, 'total_tokens': 288, 'completion_tokens_details': None, 'prompt_tokens_details': {'audio_tokens': None, 'cached_tokens': 0}}, 'model_name': 'qwen-plus', 'system_fingerprint': None, 'id': 'chatcmpl-b499cd0b-29d4-9d83-8473-e41d7214223d', 'finish_reason': 'stop', 'logprobs': None} id='run-8046aa25-091a-4df3-a49a-aa36811c8d44-0' usage_metadata={'input_tokens': 272, 'output_tokens': 16, 'total_tokens': 288, 'input_token_details': {'cache_read': 0}, 'output_token_details': {}}
``` ```
![Diagram of a tool call invocation](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/tool_invocation-7f277888701ee431a17607f1a035c080-20250328134624442.png) ![Diagram of a tool call invocation](./img/tool_invocation-7f277888701ee431a17607f1a035c080-20250328134624442.png)
![Diagram of a tool call result](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/tool_results-71b4b90f33a56563c102d91e7821a993.png) ![Diagram of a tool call result](./img/tool_results-71b4b90f33a56563c102d91e7821a993.png)
* 完整案例实战 * 完整案例实战
@ -11471,7 +11471,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 地址(失效忽略即可):https://python.langchain.com/docs/integrations/tools/ * 地址(失效忽略即可):https://python.langchain.com/docs/integrations/tools/
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/1-3135889.png" alt="1" style="zoom:50%;" /> <img src="./img/1-3135889.png" alt="1" style="zoom:50%;" />
* 如何使用内置工具包【联网搜索例子】 * 如何使用内置工具包【联网搜索例子】
@ -11481,7 +11481,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 搜索工具:选择 SearchApi,注册时100次免费搜索,注册账号获取 APIKEY * 搜索工具:选择 SearchApi,注册时100次免费搜索,注册账号获取 APIKEY
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250328123503960.png" alt="image-20250328123503960" style="zoom:50%;" /> <img src="./img/image-20250328123503960.png" alt="image-20250328123503960" style="zoom:50%;" />
* 编写代码 * 编写代码
@ -11646,7 +11646,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 交互流程图 * 交互流程图
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/1-3222765.png" alt="1" style="zoom:50%;" /> <img src="./img/1-3222765.png" alt="1" style="zoom:50%;" />
* 步骤思路 * 步骤思路
@ -11891,7 +11891,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 注册地址:https://smith.langchain.com/ * 注册地址:https://smith.langchain.com/
![image-20250329170410782](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250329170410782.png) ![image-20250329170410782](./img/image-20250329170410782.png)
* 配置项目前准备 * 配置项目前准备
@ -11905,7 +11905,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 配置项目名称(不存在的话会自动新建) * 配置项目名称(不存在的话会自动新建)
![image-20250329170551464](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250329170551464.png) ![image-20250329170551464](./img/image-20250329170551464.png)
#### 大模型调用接入LangSmith分析实战 #### 大模型调用接入LangSmith分析实战
@ -11962,11 +11962,11 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
print(resp.content) print(resp.content)
``` ```
![image-20250329175530690](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250329175530690.png) ![image-20250329175530690](./img/image-20250329175530690.png)
* 进阶案例测试【选择之前的案例代码-43.2】 * 进阶案例测试【选择之前的案例代码-43.2】
![image-20250329181733895](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250329181733895.png) ![image-20250329181733895](./img/image-20250329181733895.png)
### 模型Agent智能体进阶开发实战 ### 模型Agent智能体进阶开发实战
@ -12379,7 +12379,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 其他方法:如 `create_json_agent`(处理 JSON )、`create_openai_tools_agent`(适配 OpenAI 工具调用格式) * 其他方法:如 `create_json_agent`(处理 JSON )、`create_openai_tools_agent`(适配 OpenAI 工具调用格式)
![12](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/12.png) ![12](./img/12.png)
* `initialize_agent` 方法介绍 * `initialize_agent` 方法介绍
@ -12825,7 +12825,7 @@ public JsonData list(@RequestParam(value = "parent_id")Long parentId){
* 功能效果演示 * 功能效果演示
![image-20250331231807616](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250331231807616.png) ![image-20250331231807616](./img/image-20250331231807616.png)
* 编码实战 * 编码实战
@ -12955,7 +12955,7 @@ tools = [web_search, retriever_tool]
* LangSmith调用链路分析 * LangSmith调用链路分析
![image-20250401104847864](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250401104847864.png) ![image-20250401104847864](./img/image-20250401104847864.png)
* 切换不同创建agent方法和提示词进行测试 * 切换不同创建agent方法和提示词进行测试
@ -13115,7 +13115,7 @@ tools = [web_search, retriever_tool]
* 进阶用法:长期记忆 + 向量数据库 * 进阶用法:长期记忆 + 向量数据库
* 高级用法:多用户隔离记忆(会话级) * 高级用法:多用户隔离记忆(会话级)
![1](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/1-3479667.png) ![1](./img/1-3479667.png)
@ -13878,7 +13878,7 @@ tools = [web_search, retriever_tool]
* `RedisChatMessageHistory` 存储介绍 * `RedisChatMessageHistory` 存储介绍
![1](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/1-3677655.png) ![1](./img/1-3677655.png)
* 内置的 Redis 消息历史存储工具,将会话记录以结构化形式保存至 Redis * 内置的 Redis 消息历史存储工具,将会话记录以结构化形式保存至 Redis
@ -13893,9 +13893,9 @@ tools = [web_search, retriever_tool]
* LangChain 的 `RedisChatMessageHistory` 等组件默认依赖 JSON 格式存储对话历史,ReJSON 提供天然的兼容性 * LangChain 的 `RedisChatMessageHistory` 等组件默认依赖 JSON 格式存储对话历史,ReJSON 提供天然的兼容性
* 数据存储结构 * 数据存储结构
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250404162459285.png" alt="image-20250404162459285" style="zoom:80%;" /> <img src="./img/image-20250404162459285.png" alt="image-20250404162459285" style="zoom:80%;" />
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250404162420533.png" alt="image-20250404162420533" style="zoom:70%;" /> <img src="./img/image-20250404162420533.png" alt="image-20250404162420533" style="zoom:70%;" />
@ -14130,7 +14130,7 @@ tools = [web_search, retriever_tool]
``` ```
### 第四十八章 大模型服务必备FastAPI Web框架 ### 大模型服务必备FastAPI Web框架
#### Python Web框架Fast API技术介绍 #### Python Web框架Fast API技术介绍
@ -15341,7 +15341,7 @@ tools = [web_search, retriever_tool]
* 智能体业务架构图 * 智能体业务架构图
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250418190055953.png" alt="image-20250418190055953" style="zoom:50%;" /> <img src="./img/image-20250418190055953.png" alt="image-20250418190055953" style="zoom:50%;" />
* 项目依赖环境创建 * 项目依赖环境创建
@ -15442,7 +15442,7 @@ tools = [web_search, retriever_tool]
* 打开 首选项 --> 设置 --> 搜索框中 搜索 files.exclude --> 点击 "添加模式" 按钮 * 打开 首选项 --> 设置 --> 搜索框中 搜索 files.exclude --> 点击 "添加模式" 按钮
* 输入想要隐藏的文件夹, 如python经常生成的缓存文件夹, 输入 `**/__pycache`__ 即可隐藏 `__pycache__` 文件夹. * 输入想要隐藏的文件夹, 如python经常生成的缓存文件夹, 输入 `**/__pycache`__ 即可隐藏 `__pycache__` 文件夹.
![image-20250414104551285](D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250414104551285.png) ![image-20250414104551285](./img/image-20250414104551285.png)
@ -15837,7 +15837,7 @@ tools = [web_search, retriever_tool]
* 采用Redis进行持久化用户的聊天记录 * 采用Redis进行持久化用户的聊天记录
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250421203059141.png" alt="image-20250421203059141" style="zoom:50%;" /> <img src="./img/image-20250421203059141.png" alt="image-20250421203059141" style="zoom:50%;" />
* **数据结构**聊天历史:JSON数组,每个元素为一条消息,包含以下字段 * **数据结构**聊天历史:JSON数组,每个元素为一条消息,包含以下字段
@ -16323,11 +16323,9 @@ tools = [web_search, retriever_tool]
* 查看Redis的数据存储:聊天记录和摘要 * 查看Redis的数据存储:聊天记录和摘要
* 拓展:不用每次都生成摘要,可以配置进阶策略,比如对话轮次阈值(默认5轮)、关键决策点标记、上下文长度超过XXX * 拓展:不用每次都生成摘要,可以配置进阶策略,比如对话轮次阈值(默认5轮)、关键决策点标记、上下文长度超过XXX
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250421213741268.png" alt="image-20250421213741268" style="zoom:50%;" /> <img src="./img/image-20250421213741268.png" alt="image-20250421213741268" style="zoom:50%;" />
### 第五十二章 AI智能体心实战之AI在线文档助手
### AI智能体心实战之AI在线文档助手
#### AI在线文档助手需求文档和路由开发实战 #### AI在线文档助手需求文档和路由开发实战
@ -16352,7 +16350,7 @@ tools = [web_search, retriever_tool]
* 选择网盘里面的相关资源,则需要登录;选择好文件后调用存储接口获取临时访问地址 * 选择网盘里面的相关资源,则需要登录;选择好文件后调用存储接口获取临时访问地址
* 智能体接受的是在线可以访问的地址,即可实现对应的在线文档解析 * 智能体接受的是在线可以访问的地址,即可实现对应的在线文档解析
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/image-20250427120524719.png" alt="image-20250427120524719" style="zoom:40%;" /> <img src="./img/image-20250427120524719.png" alt="image-20250427120524719" style="zoom:40%;" />
* 编码实战 * 编码实战
@ -16428,7 +16426,7 @@ tools = [web_search, retriever_tool]
* 目前开发PDF和HTML类型,可以根据业务需求自己拓展更多 * 目前开发PDF和HTML类型,可以根据业务需求自己拓展更多
<img src="D:/学习/2025/AI智能化云盘学习笔记/笔记/img/1-21919531.png" alt="image-20250427125855187" style="zoom:50%;" /> <img src="./img/1-21919531.png" alt="image-20250427125855187" style="zoom:50%;" />
* 拓展知识点 * 拓展知识点
@ -16536,7 +16534,7 @@ tools = [web_search, retriever_tool]
* 使用 * 使用
``` ```python
#前面一开始创建项目的时候已经安装了这个依赖 #前面一开始创建项目的时候已经安装了这个依赖
from tqdm import tqdm from tqdm import tqdm
import time import time

BIN
img/1-21919531.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
img/1-3069367.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
img/1-3135889.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
img/1-3222765.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

BIN
img/1-3479667.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
img/1-3677655.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
img/12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
img/3-3070285.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
img/image-20250328123503960.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

BIN
img/image-20250329170410782.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

BIN
img/image-20250329170551464.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 KiB

BIN
img/image-20250329175530690.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 KiB

BIN
img/image-20250329181733895.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 KiB

BIN
img/image-20250331231807616.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

BIN
img/image-20250401104847864.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
img/image-20250404162420533.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
img/image-20250404162459285.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
img/image-20250414104551285.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

BIN
img/image-20250418190055953.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

BIN
img/image-20250421203059141.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

BIN
img/image-20250421213741268.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

BIN
img/image-20250427120524719.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

BIN
img/tool_invocation-7f277888701ee431a17607f1a035c080-20250328134624442.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
img/tool_results-71b4b90f33a56563c102d91e7821a993.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

36
src/test/java/org/ycloud/aipan/ChangeImages.java

@ -0,0 +1,36 @@
package org.ycloud.aipan;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.List;
public class ChangeImages {
private static final Path SOURCE_DIR = Paths.get("D:/学习/2025/AI智能化云盘学习笔记/笔记/img");
private static final Path TARGET_DIR = Paths.get("D:/IdeaProjects/learn/ycloud-aipan/img");
public static void main(String[] args) {
List<String> images = List.of("1-3069367.png", "3-3070285.png");
try {
for (String image : images) {
Path sourceFile = SOURCE_DIR.resolve(image);
Path targetFile = TARGET_DIR.resolve(image);
if (!Files.exists(sourceFile)) {
System.err.println("源文件不存在: " + sourceFile);
continue;
}
if (Files.exists(targetFile)) {
System.out.println("目标文件已存在,跳过: " + targetFile);
continue;
}
Files.move(sourceFile, targetFile, StandardCopyOption.REPLACE_EXISTING);
System.out.println("文件移动成功: " + sourceFile + " -> " + targetFile);
}
} catch (IOException e) {
System.err.println("文件操作发生异常: " + e.getMessage());
}
}
}
Loading…
Cancel
Save