Skip to content

Commit b6f87ac

Browse files
authored
docs: rewrite Output node page with zh/ja translations and glossary updates (#742)
* docs: rewrite Output node page and add API mode glossary terms * translate: sync zh/ja Output node pages with rewritten English source * style: add link spacing rule for ja and expand anchor rule to cover Tab titles * fix: remove trailing whitespace in en and replace em dashes in zh
1 parent 83fc959 commit b6f87ac

6 files changed

Lines changed: 248 additions & 21 deletions

File tree

en/use-dify/nodes/output.mdx

Lines changed: 78 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,88 @@
11
---
22
title: "Output"
3-
description: "Define workflow outputs and termination points"
3+
description: "Return workflow results to the end user or API caller"
44
---
55

6+
Use the Output node to deliver specific variable values from your workflow to the end user or API caller. Add it where you need to surface results.
7+
68
<Info>
7-
The Output node was previously called End. It's now *optional* in a workflow and used only to explicitly output data to the end user.
9+
The Output node was previously named *End* and was required in every workflow.
10+
11+
It is now optional—workflows run successfully without one, but any workflow or branch without an Output node returns no data to the caller.
12+
13+
Output nodes are only available in Workflows. Chatflows use the [Answer](/en/use-dify/nodes/answer) node instead.
14+
</Info>
15+
16+
## Configure Output Variables
17+
18+
Each Output node requires at least one output variable. To add a variable, assign a name and select the source from any upstream node's output.
819

9-
End nodes are only for Workflow applications. Chatflows use the [Answer](/en/use-dify/nodes/answer) node instead to deliver responses during the conversation flow.
20+
<Info>
21+
The variable name you assign becomes the key in API responses.
1022
</Info>
1123

24+
You can add multiple output variables to a single Output node and reorder them by dragging.
25+
26+
## Supported Variable Types
27+
28+
Output variables support the following types:
29+
30+
`string`, `number`, `integer`, `boolean`, `object`, `file`, `array[string]`, `array[number]`, `array[object]`, `array[boolean]`, `array[file]`
31+
32+
## Multiple Output Nodes
33+
34+
A workflow can contain more than one Output node. The Output node does not stop workflow execution—other parallel branches (if any) continue running after it completes.
35+
36+
All output variables from every executed Output node are combined into one final result. Each Output node adds its variables to the result as the workflow reaches it:
37+
38+
- On the **same branch**, variables are added in the order the Output nodes are placed.
39+
40+
- On **parallel branches**, whichever Output node executes first adds its variables first.
41+
42+
<Warning>
43+
Always use unique variable names across all Output nodes in a workflow.
44+
45+
When two Output nodes use the same output variable name, the later one overwrites the earlier value.
46+
</Warning>
47+
48+
## API Response Structure
49+
50+
When you call a workflow through the API, output variables appear in the `outputs` object of the response.
51+
52+
<Tabs>
53+
<Tab title="Blocking Mode">
54+
All outputs return in a single response once the workflow completes:
55+
56+
```json
57+
{
58+
"workflow_run_id": "...",
59+
"status": "succeeded",
60+
"outputs": {
61+
"result_text": "The processed output...",
62+
"score": 95
63+
}
64+
}
65+
```
66+
</Tab>
67+
<Tab title="Streaming Mode">
68+
Outputs arrive in the final `workflow_finished` event:
69+
70+
```json
71+
{
72+
"event": "workflow_finished",
73+
"data": {
74+
"outputs": {
75+
"result_text": "The processed output...",
76+
"score": 95
77+
}
78+
}
79+
}
80+
```
81+
</Tab>
82+
</Tabs>
83+
84+
Each output variable name maps directly to a key in the `outputs` object.
1285

13-
## Output Configuration
14-
In an Output node, you can define what data from your workflow should be returned to users by adding output variables, such as an LLM's response. At least one output variable must be specified; otherwise, nothing will be returned.
86+
## For Workflow Tools
1587

16-
When exposed as a backend service API, workflows without an Output node will not return any values to API callers.
88+
When you [publish a workflow as a tool](/en/use-dify/workspace/tools#workflow-tool), the Output node defines the tool's return schema. Each output variable name becomes a key in the tool's result, accessible to the parent workflow that invokes the tool.

ja/use-dify/nodes/output.mdx

Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,90 @@
11
---
22
title: "出力"
3-
description: "ワークフローの出力と終了ポイントを定義する"
3+
description: "ワークフローの結果をエンドユーザーまたは API 呼び出し元に返す"
44
---
55

6-
<Note> ⚠️ このドキュメントは AI によって自動翻訳されています。不正確な点がある場合は、[英語版](/en/use-dify/nodes/output)を参照してください。</Note>
6+
<Note> ⚠️ このドキュメントは AI によって自動翻訳されています。不正確な点がある場合は、[英語版](/en/use-dify/nodes/output) を参照してください。</Note>
7+
8+
出力ノードは、ワークフロー内の特定の変数値をエンドユーザーまたは API 呼び出し元に返します。結果を表示したい箇所に追加してください。
79

810
<Info>
9-
出力ノードは以前は終了ノードと呼ばれていました。現在、ワークフローでは*オプション*であり、エンドユーザーにデータを明示的に出力する場合にのみ使用されます。
11+
出力ノードは以前「終了」ノードと呼ばれ、すべてのワークフローで必須でした。
12+
13+
現在はオプションです。出力ノードがなくてもワークフローは正常に実行されますが、呼び出し元にデータは返されません。
14+
15+
出力ノードはワークフローアプリケーションでのみ使用できます。チャットフローアプリケーションでは、代わりに [回答](/ja/use-dify/nodes/answer) ノードを使用してください。
16+
</Info>
17+
18+
## 出力変数の設定
19+
20+
各出力ノードには少なくとも 1 つの出力変数が必要です。変数を追加するには、名前を指定し、上流ノードの出力からデータソースを選択します。
1021

11-
終了ノードはワークフローアプリケーション専用です。チャットフローは、会話フロー中に応答を配信するために[回答](/ja/use-dify/nodes/answer)ノードを使用します。
22+
<Info>
23+
設定した変数名は、API レスポンスのキーとして使用されます。
1224
</Info>
1325

26+
1 つの出力ノードに複数の出力変数を追加し、ドラッグで順序を変更できます。
27+
28+
## サポートされる変数型
29+
30+
出力変数は以下の型をサポートしています:
31+
32+
`string``number``integer``boolean``object``file``array[string]``array[number]``array[object]``array[boolean]``array[file]`
33+
34+
## 複数の出力ノード
35+
36+
ワークフローには複数の出力ノードを配置できます。出力ノードはワークフローの実行を停止しません。他の並列ブランチ(ある場合)は、出力ノードの完了後も引き続き実行されます。
37+
38+
実行されたすべての出力ノードの変数は、1 つの最終結果に統合されます。各出力ノードは、ワークフローがそのノードに到達した時点で変数を結果に追加します:
39+
40+
- **同一ブランチ** では、出力ノードの配置順に変数が追加されます。
41+
42+
- **並列ブランチ** では、先に実行が完了した出力ノードの変数から順に追加されます。
43+
44+
<Warning>
45+
ワークフロー内のすべての出力ノードで、変数名が重複しないようにしてください。
46+
47+
2 つの出力ノードが同じ出力変数名を使用している場合、後に実行されたノードの値で上書きされます。
48+
</Warning>
49+
50+
## API レスポンス構造
51+
52+
API 経由でワークフローを呼び出すと、出力変数はレスポンスの `outputs` オブジェクトに含まれます。
53+
54+
<Tabs>
55+
<Tab title="ブロッキングモード">
56+
ワークフロー完了後、すべての出力が単一のレスポンスで返されます:
57+
58+
```json
59+
{
60+
"workflow_run_id": "...",
61+
"status": "succeeded",
62+
"outputs": {
63+
"result_text": "The processed output...",
64+
"score": 95
65+
}
66+
}
67+
```
68+
</Tab>
69+
<Tab title="ストリーミングモード">
70+
出力は最後の `workflow_finished` イベントで到着します:
71+
72+
```json
73+
{
74+
"event": "workflow_finished",
75+
"data": {
76+
"outputs": {
77+
"result_text": "The processed output...",
78+
"score": 95
79+
}
80+
}
81+
}
82+
```
83+
</Tab>
84+
</Tabs>
85+
86+
各出力変数名は、`outputs` オブジェクト内のキーに直接対応します。
1487

15-
## 出力設定
16-
出力ノードでは、LLM の応答などの出力変数を追加することで、ワークフローからユーザーに返すデータを定義できます。少なくとも 1 つの出力変数を指定する必要があります。指定しない場合、何も返されません。
88+
## ワークフローツールとしての公開
1789

18-
バックエンドサービス API として公開される場合、出力ノードのないワークフローは API 呼び出し元に値を返しません
90+
[ワークフローをツールとして公開](/ja/use-dify/workspace/tools#ワークフローツール) すると、出力ノードがツールの返却スキーマを定義します。各出力変数名がツール結果のキーとなり、ツールを呼び出す親ワークフローからアクセスできます

tools/translate/formatting-ja.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ No space is needed when bold text is adjacent to punctuation or the start of a l
7575

7676
## Links
7777

78+
When link text is adjacent to Japanese characters, insert a space on each side:
79+
80+
| Correct | Incorrect |
81+
|:--------|:----------|
82+
| 詳細は [環境変数](/path) を参照してください | 詳細は[環境変数](/path)を参照してください |
83+
| 代わりに [回答](/path) ノードを使用 | 代わりに[回答](/path)ノードを使用 |
84+
85+
No space is needed when link text is adjacent to punctuation.
86+
7887
For cross-links to other documentation pages, change the `/en/` path prefix in the English source to `/ja/`.
7988

8089
### API Reference Cross-Links
@@ -166,7 +175,7 @@ These elements must be translated, not left in English:
166175
- **Frame captions and image alt text:** Translate both `<Frame caption="...">` and `![alt text]`.
167176
- **Bold UI labels:** When a UI label appears in **bold**, use the official Japanese translation from `web/i18n/ja-JP/`. Refer to the glossary.
168177
- **Prompt examples:** Translate natural language text inside code blocks (using です/ます form). Keep variable placeholders (`{{variable_name}}`) unchanged.
169-
- **Cross-reference heading anchors:** When a link includes `#heading-slug`, update the slug to match the translated heading.
178+
- **Cross-reference anchors:** When a link includes `#slug`, update the slug to match the translated text. This applies to both heading anchors and Tab title anchors (Mintlify generates anchors from `<Tab title="...">` values).
170179

171180
## Em Dashes
172181

tools/translate/formatting-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ These elements must be translated, not left in English:
139139
- **Frame captions and image alt text:** Translate both `<Frame caption="...">` and `![alt text]`.
140140
- **Bold UI labels:** When a UI label appears in **bold**, use the official Chinese translation from `web/i18n/zh-Hans/`. Refer to the glossary.
141141
- **Prompt examples:** Translate natural language text inside code blocks. Keep variable placeholders (`{{variable_name}}`) unchanged.
142-
- **Cross-reference heading anchors:** When a link includes `#heading-slug`, update the slug to match the translated heading.
142+
- **Cross-reference anchors:** When a link includes `#slug`, update the slug to match the translated text. This applies to both heading anchors and Tab title anchors (Mintlify generates anchors from `<Tab title="...">` values).
143143

144144
## Em Dashes
145145

writing-guides/glossary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ Terms appear in body text exactly as written in this table. Capitalize them furt
120120
| input field | 输入字段 | 入力フィールド | Form fields where people provide requested information |
121121
| request form | 请求表单 | リクエストフォーム | The form sent to recipients asking for input/review; use "request form" not "request page" |
122122
| Assemble Variable | 变量组装 | 変数アセンブル | On-demand data transformation using natural language descriptions |
123+
| blocking mode | 阻塞式返回 | ブロッキングモード | API `response_mode` value; returns results after execution completes |
124+
| streaming mode | 流式返回 | ストリーミングモード | API `response_mode` value; returns results progressively via SSE |
123125

124126
### Agent
125127

zh/use-dify/nodes/output.mdx

Lines changed: 78 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,90 @@
11
---
22
title: "输出"
3-
description: "定义工作流输出和终止点"
3+
description: "将工作流结果返回给终端用户或 API 调用者"
44
---
55

66
<Note> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考 [英文原版](/en/use-dify/nodes/output)。</Note>
77

8+
使用输出节点将工作流中的特定变量值传递给终端用户或 API 调用者。在需要呈现结果的位置添加该节点。
9+
810
<Info>
9-
输出节点以前称为结束节点。它现在在工作流中是*可选的*,仅用于显式地向最终用户输出数据。
11+
输出节点的前身是「结束」节点,曾是每个工作流的必需组件。
12+
13+
现在它是可选的,没有输出节点的工作流仍然可以正常运行,但不会向调用者返回任何数据。
14+
15+
输出节点仅适用于工作流应用。对话流应用请使用 [直接回复](/zh/use-dify/nodes/answer) 节点。
16+
</Info>
17+
18+
## 配置输出变量
19+
20+
每个输出节点至少需要一个输出变量。添加变量时,指定一个名称并从上游节点的输出中选择数据来源。
1021

11-
结束节点仅适用于工作流应用程序。对话流使用[回答](/zh/use-dify/nodes/answer)节点在对话流程中传递响应。
22+
<Info>
23+
你设置的变量名称将作为 API 响应中的键名。
1224
</Info>
1325

26+
你可以在单个输出节点中添加多个输出变量,并通过拖拽调整顺序。
27+
28+
## 支持的变量类型
29+
30+
输出变量支持以下类型:
31+
32+
`string``number``integer``boolean``object``file``array[string]``array[number]``array[object]``array[boolean]``array[file]`
33+
34+
## 多个输出节点
35+
36+
一个工作流可以包含多个输出节点。输出节点不会终止工作流执行,其他并行分支(如果有)会在该节点完成后继续运行。
37+
38+
所有已执行的输出节点的变量会合并为一个最终结果。每个输出节点在工作流执行到它时将变量添加到结果中:
39+
40+
-**同一分支** 上,变量按输出节点的排列顺序依次添加。
41+
42+
-**并行分支** 上,先执行完成的输出节点先添加其变量。
43+
44+
<Warning>
45+
请确保工作流中所有输出节点的变量名称互不重复。
46+
47+
当两个输出节点使用相同的输出变量名称时,后执行的节点会覆盖先前的值。
48+
</Warning>
49+
50+
## API 响应结构
51+
52+
通过 API 调用工作流时,输出变量会出现在响应的 `outputs` 对象中。
53+
54+
<Tabs>
55+
<Tab title="阻塞式返回">
56+
工作流完成后,所有输出以单次响应返回:
57+
58+
```json
59+
{
60+
"workflow_run_id": "...",
61+
"status": "succeeded",
62+
"outputs": {
63+
"result_text": "The processed output...",
64+
"score": 95
65+
}
66+
}
67+
```
68+
</Tab>
69+
<Tab title="流式返回">
70+
输出在最终的 `workflow_finished` 事件中到达:
71+
72+
```json
73+
{
74+
"event": "workflow_finished",
75+
"data": {
76+
"outputs": {
77+
"result_text": "The processed output...",
78+
"score": 95
79+
}
80+
}
81+
}
82+
```
83+
</Tab>
84+
</Tabs>
85+
86+
每个输出变量名称直接对应 `outputs` 对象中的一个键。
1487

15-
## 输出配置
16-
在输出节点中,你可以通过添加输出变量(例如 LLM 的响应)来定义应从工作流返回给用户的数据。必须至少指定一个输出变量;否则,不会返回任何内容。
88+
## 发布为工具
1789

18-
当作为后端服务 API 公开时,没有输出节点的工作流不会向 API 调用者返回任何值
90+
当你将 [工作流发布为工具](/zh/use-dify/workspace/tools#工作流工具) 时,输出节点定义了工具的返回结构。每个输出变量名称会成为工具结果中的一个键,供调用该工具的工作流使用

0 commit comments

Comments
 (0)