File tree 8 files changed +384
-0
lines changed
8 files changed +384
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "label" : " Coze教程" ,
3
+ "position" : 10 ,
4
+ "link" : {
5
+ "type" : " generated-index" ,
6
+ "description" : " 学习如何使用Coze创建各类实用的AI工作流,实现自动化处理和分析。" ,
7
+ "slug" : " /category/coze"
8
+ }
9
+ }
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 3
3
+ title : 网页抓取配置
4
+ description : 配置Browse节点实现网页内容的自动获取
5
+ ---
6
+
7
+ # 网页抓取配置
8
+
9
+ ## Browse节点概述
10
+
11
+ Browse节点负责获取网页内容,是工作流的第一个处理环节。它能够:
12
+ - 访问指定URL
13
+ - 提取网页内容
14
+ - 处理不同类型的网页
15
+
16
+ ## 节点配置
17
+
18
+ ### 基本设置
19
+ 1 . 添加Browse节点
20
+ 2 . 连接到Start节点
21
+
22
+ ### 参数配置
23
+ 1 . url参数:
24
+ ``` typescript
25
+ // 使用变量引用输入
26
+ {{input }}
27
+ ```
28
+
29
+ 2 . enforce_crawl参数:
30
+ ``` typescript
31
+ // 设置为true以确保完整抓取
32
+ true
33
+ ```
34
+
35
+ ### 输出说明
36
+ Browse节点会输出以下字段:
37
+ - code:状态码
38
+ - message:状态信息
39
+ - plugin_observation:网页内容
40
+ - observation:实际内容
41
+ - natural_language_desc:描述信息
42
+
43
+ ## 调试技巧
44
+
45
+ ### 常见问题
46
+ 1 . URL无法访问
47
+ - 检查URL格式
48
+ - 确认网页可访问性
49
+
50
+ 2 . 内容获取不完整
51
+ - 检查enforce_crawl设置
52
+ - 调整等待时间
53
+
54
+ ### 测试方法
55
+ 1 . 使用简单的测试URL
56
+ 2 . 检查输出内容完整性
57
+ 3 . 验证字段格式
58
+
59
+ 下一步,我们将配置LLM节点,对获取的内容进行处理。
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 2
3
+ title : 环境准备
4
+ description : 配置Coze工作流开发所需的环境和服务
5
+ ---
6
+
7
+ # 环境准备
8
+
9
+ ## Notion配置
10
+
11
+ ### 创建集成
12
+ 1 . 访问 [ Notion Developers] ( https://developers.notion.com/ )
13
+ 2 . 点击"Create new integration"
14
+ 3 . 填写集成名称(如"Article Summary")
15
+ 4 . 选择关联的工作区
16
+ 5 . 获取Integration Token并保存
17
+
18
+ ### 页面授权
19
+ 1 . 在Notion中创建新页面
20
+ 2 . 点击右上角"Share"按钮
21
+ 3 . 在弹出菜单中选择"Invite"
22
+ 4 . 找到并选择你创建的集成
23
+ 5 . 点击"Invite"确认
24
+
25
+ ### 获取Page ID
26
+ 1 . 打开目标Notion页面
27
+ 2 . 从浏览器地址栏复制URL
28
+ 3 . 提取32位字符串格式的page_id
29
+
30
+ ## Coze配置
31
+
32
+ ### 创建项目
33
+ 1 . 登录Coze平台
34
+ 2 . 创建新的工作流项目
35
+ 3 . 设置基本项目信息
36
+
37
+ ### 节点准备
38
+ 1 . 添加必要的节点:
39
+ - Browse节点:用于网页抓取
40
+ - LLM节点:用于生成摘要
41
+ - Text Processing节点:用于文本处理
42
+ - Write Page节点:用于Notion集成
43
+
44
+ ## 验证配置
45
+
46
+ ### 检查清单
47
+ - [ ] Notion集成已创建
48
+ - [ ] Integration Token已保存
49
+ - [ ] 目标页面已授权
50
+ - [ ] Page ID已获取
51
+ - [ ] Coze项目已创建
52
+ - [ ] 必要节点已添加
53
+
54
+ 准备工作完成后,我们就可以开始配置具体的节点了。
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 1
3
+ ---
4
+
5
+ # Coze工作流开发
6
+
7
+ 在本教程中,我们将学习如何在Coze平台创建一个文章摘要工作流。通过以下章节,你将掌握完整的工作流开发流程:
8
+
9
+ - [ 环境准备] ( ./environment-setup.mdx ) - 配置必要的开发环境和第三方服务
10
+ - [ 网页抓取配置] ( ./browse-node-setup.mdx ) - 设置Browse节点实现网页内容获取
11
+ - [ AI摘要生成] ( ./llm-node-setup.mdx ) - 配置LLM节点实现智能摘要
12
+ - [ 文本处理与存储] ( ./text-processing-setup.mdx ) - 设置文本处理和Notion集成
13
+ - [ 测试与优化] ( ./testing-optimization.mdx ) - 工作流测试和性能优化
14
+
15
+ 完成本教程后,你将能够:
16
+ - 创建完整的Coze工作流
17
+ - 实现网页内容的自动获取
18
+ - 使用AI生成高质量摘要
19
+ - 将数据保存到Notion
20
+ - 处理常见的错误和异常
21
+
22
+ 让我们开始吧!
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 4
3
+ title : AI摘要生成
4
+ description : 配置LLM节点实现智能文章摘要
5
+ ---
6
+
7
+ # AI摘要生成
8
+
9
+ ## LLM节点配置
10
+
11
+ ### 基本设置
12
+ 1 . 添加LLM节点
13
+ 2 . 连接到Browse节点
14
+
15
+ ### 输入配置
16
+ ``` typescript
17
+ // 设置输入参数
18
+ input : {{browse .plugin_observation .observation }}
19
+ ```
20
+
21
+ ### System Prompt
22
+ ``` text
23
+ You are a professional article summarizer. Your task is to read the provided article and create a CONCISE summary that:
24
+ - Captures only the most essential points (max 2-3 key points)
25
+ - Uses very concise language
26
+ - Keeps the total output under 1500 characters
27
+ - Maintains clarity while being brief
28
+ - Includes a short title
29
+
30
+ Format your response as:
31
+ Title: [Short Article Title]
32
+ Summary: [Your concise summary in 1-2 paragraphs]
33
+ Key Points:
34
+ - [Point 1]
35
+ - [Point 2]
36
+ - [Point 3]
37
+ ```
38
+
39
+ ### User Prompt
40
+ ``` text
41
+ Please provide a summary of the following article:
42
+ {{input}}
43
+ ```
44
+
45
+ ## 优化策略
46
+
47
+ ### 提示词调优
48
+ 1 . 控制输出长度
49
+ - 设定字符限制
50
+ - 指定段落数量
51
+
52
+ 2 . 调整输出结构
53
+ - 明确标题要求
54
+ - 规范关键点格式
55
+
56
+ ### 质量控制
57
+ 1 . 增加相关性要求
58
+ 2 . 保持客观性
59
+ 3 . 确保完整性
60
+
61
+ ## 测试验证
62
+
63
+ ### 测试用例
64
+ 1 . 使用不同类型的文章
65
+ 2 . 检查输出格式
66
+ 3 . 验证字符数限制
67
+
68
+ ### 优化方向
69
+ 1 . 根据测试结果调整prompt
70
+ 2 . 优化输出结构
71
+ 3 . 提升摘要质量
72
+
73
+ 下一步,我们将配置Text Processing节点,对AI生成的摘要进行格式化处理。
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 6
3
+ title : 测试与优化
4
+ description : 工作流测试和性能优化指南
5
+ ---
6
+
7
+ # 测试与优化
8
+
9
+ ## 整体测试
10
+
11
+ ### 功能测试
12
+ 1 . 输入验证
13
+ - 测试不同URL格式
14
+ - 验证错误处理
15
+
16
+ 2 . 流程验证
17
+ - 检查节点连接
18
+ - 验证数据传递
19
+
20
+ ### 性能测试
21
+ 1 . 响应时间
22
+ 2 . 资源使用
23
+ 3 . 并发处理
24
+
25
+ ## 问题排查
26
+
27
+ ### 常见错误
28
+ 1 . URL无法访问
29
+ - 检查网络连接
30
+ - 验证URL有效性
31
+
32
+ 2 . 内容处理失败
33
+ - 检查内容格式
34
+ - 调整处理逻辑
35
+
36
+ 3 . Notion写入错误
37
+ - 验证权限设置
38
+ - 检查内容限制
39
+
40
+ ### 优化方案
41
+ 1 . 提高稳定性
42
+ - 添加重试机制
43
+ - 优化错误处理
44
+
45
+ 2 . 改善性能
46
+ - 调整超时设置
47
+ - 优化资源使用
48
+
49
+ ## 维护建议
50
+
51
+ ### 日常维护
52
+ 1 . 定期检查
53
+ - 验证功能完整性
54
+ - 检查错误日志
55
+
56
+ 2 . 更新优化
57
+ - 更新提示词
58
+ - 优化处理逻辑
59
+
60
+ ### 扩展建议
61
+ 1 . 功能扩展
62
+ - 添加多平台支持
63
+ - 实现批量处理
64
+
65
+ 2 . 性能提升
66
+ - 优化处理流程
67
+ - 提升响应速度
68
+
69
+ ## 最佳实践
70
+
71
+ ### 开发建议
72
+ 1 . 模块化设计
73
+ 2 . 清晰的错误处理
74
+ 3 . 完整的测试覆盖
75
+
76
+ ### 使用技巧
77
+ 1 . 合理的提示词
78
+ 2 . 适当的格式化
79
+ 3 . 有效的错误处理
80
+
81
+ 至此,我们完成了整个工作流的开发和优化。你可以根据实际需求继续改进和扩展功能。
Original file line number Diff line number Diff line change
1
+ ---
2
+ sidebar_position : 5
3
+ title : 文本处理与存储
4
+ description : 设置Text Processing节点和Notion集成
5
+ ---
6
+
7
+ # 文本处理与存储
8
+
9
+ ## Text Processing配置
10
+
11
+ ### 节点设置
12
+ 1 . 添加Text Processing节点
13
+ 2 . 连接到LLM节点
14
+
15
+ ### 参数配置
16
+ 1 . 输入设置:
17
+ ``` typescript
18
+ String1 : {{llm .output .output }}
19
+ ```
20
+
21
+ 2 . 格式模板:
22
+ ``` text
23
+ =========================================
24
+ 文章摘要
25
+ =========================================
26
+
27
+ {{String1}}
28
+ =========================================
29
+ ```
30
+
31
+ ## Notion集成
32
+
33
+ ### Write Page节点配置
34
+ 1 . 添加Write Page节点
35
+ 2 . 连接到Text Processing节点
36
+
37
+ ### 参数设置
38
+ ``` typescript
39
+ page_id : " 你的Notion页面ID"
40
+ text : {{Text Processing .output }}
41
+ ```
42
+
43
+ ## 错误处理
44
+
45
+ ### 常见问题
46
+ 1 . Notion API限制
47
+ - 处理字符数超限
48
+ - 调整格式化模板
49
+
50
+ 2 . 权限问题
51
+ - 检查页面权限
52
+ - 验证Token有效性
53
+
54
+ ### 优化建议
55
+ 1 . 启用异常忽略
56
+ 2 . 添加错误日志
57
+ 3 . 实现重试机制
58
+
59
+ ## 格式优化
60
+
61
+ ### 文本样式
62
+ 1 . 调整分隔符
63
+ 2 . 优化排版
64
+ 3 . 增加可读性
65
+
66
+ ### 存储结构
67
+ 1 . 组织层次
68
+ 2 . 添加元数据
69
+ 3 . 便于检索
70
+
71
+ 下一步,我们将进行整体测试和优化。
You can’t perform that action at this time.
0 commit comments