-
Notifications
You must be signed in to change notification settings - Fork 369
Add content related to the human input node #667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+250
−6
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
16341f7
draft
47571f5
revise based on hands-on testing
1f25e03
modify based on feedback
03c0257
add zh and ja translation
c664f1f
Update tip for referencing text output variable
RiskeyL 4c442b5
Add translation note
RiskeyL 822ef3b
Update human-input.mdx with translation note
RiskeyL fd90bc9
Apply suggestion from @Copilot
RiskeyL c866d83
Update wording for clarity on model output display
RiskeyL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| --- | ||
| title: Human Input | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| description: Pause workflows to request human input, review, or decisions | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| icon: user-magnifying-glass | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --- | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The Human Input node pauses workflows at key points to request human input before execution continues. | ||
|
|
||
| When execution reaches this node, a customizable request form is delivered through specific channels. Recipients can provide input, review data, and choose from predefined decisions that determine how the workflow proceeds. | ||
|
|
||
| By embedding human judgement directly where it matters, you can **balance automated efficiency with human oversight**. | ||
|
|
||
| <Frame caption="Request Form Example"><img src="/images/human_input_request_form_example.png" alt="Request Form Example" /></Frame> | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Configuration | ||
|
|
||
| Configure the following to define how the node requests and processes human input: | ||
|
|
||
| - **Delivery method**: How the request form reaches recipients. | ||
|
|
||
| - **Form content**: What information recipients will see and what they can input. | ||
|
|
||
| - **User action**: What decisions recipients can make and how the workflow proceeds accordingly. | ||
|
|
||
| - **Timeout strategy**: How long to wait and what happens if no recipient responds. | ||
|
|
||
| ### Delivery Method | ||
|
|
||
| Choose the channel through which the request is delivered. Currently available methods: | ||
|
|
||
| - **Web app**: Displays the request form directly in the web app interface for the current user to respond. | ||
|
|
||
| - **Email**: Sends an email containing the request link to one or more recipients. | ||
|
|
||
| <Note> | ||
| The request closes after the first response regardless of delivery method. | ||
| </Note> | ||
|
|
||
| ### Form Content | ||
|
|
||
| Customize what appears in the request form: | ||
|
|
||
| - **Format and structure with Markdown** | ||
|
|
||
| Use headings, lists, bold text, links, and other Markdown elements to present information clearly. | ||
|
|
||
| - **Display dynamic data with variables** | ||
|
|
||
| Reference workflow variables to show dynamic content, such as AI-generated text for review or any needed contextual information from upstream nodes. | ||
|
|
||
| <Tip> | ||
| If you reference the `text` output variable from a reasoning model, the form will display the model's thinking process along with the final answer by default. | ||
|
|
||
| To show only the answer, toggle on **Enable Reasoning Tag Separation** for the corresponding LLM node. | ||
| </Tip> | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - **Collect input with input fields** | ||
|
|
||
| Input fields can start empty or pre-filled with variables (e.g., LLM output to refine) or static text (e.g., example or default values) that recipients can edit. | ||
|
|
||
| Each input field becomes a variable for downstream use. For instance, pass edited content for further processing or send feedback to an LLM for regeneration. | ||
|
|
||
| ### User Action | ||
|
|
||
| Define the decision buttons that recipients can click. Each button routes the workflow to a different execution path. | ||
|
|
||
| For example, a `Post` branch might lead to nodes that trigger content publishing, while a `Regenerate` branch might loop back to an LLM node to revise the content. | ||
|
|
||
| <Tip> | ||
| Use preset button styles to visually distinguish actions. | ||
|
|
||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| For example, use a prominent style for key actions like `Approve` and a subtler one for secondary options. | ||
| </Tip> | ||
|
|
||
| ### Timeout Strategy | ||
|
|
||
| Configure how long to wait for a response before the request expires. | ||
|
|
||
| If no recipient responds within the set time, the workflow automatically ends unless you define a fallback branch to handle the timeout—for example, send a notification or retry the request. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| title: 人的介入 | ||
| description: ワークフローを一時停止して、人間の入力、レビュー、または意思決定を要求します | ||
| icon: user-magnifying-glass | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --- | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <Note> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](/en/use-dify/nodes/human-input)を参照してください。</Note> | ||
|
|
||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| **人的介入ノード**は、ワークフローを主要なポイントで一時停止し、実行を継続する前に人間による入力を要求します。 | ||
|
|
||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 実行がこのノードに到達すると、カスタマイズ可能なリクエストフォームが特定のチャネルを通じて配信されます。受信者は、入力の提供、データの確認、およびワークフローの進行方法を決定する事前に定義された選択肢からの選択を行うことができます。 | ||
|
|
||
| 重要な場面に人間の判断を直接組み込むことで、**自動化による効率性と人間による監視のバランス**をとることができます。 | ||
|
|
||
| <Frame caption="リクエストフォームの例"><img src="/images/human_input_request_form_example.png" alt="リクエストフォームの例" /></Frame> | ||
|
|
||
| ## 設定 | ||
|
|
||
| ノードがどのように人間の入力を要求し処理するかを定義するために、以下を設定します: | ||
|
|
||
| - **配信方法**: リクエストフォームがどのように受信者に届くか。 | ||
|
|
||
| - **フォーム内容**: 受信者に表示される情報と、受信者が入力できる内容。 | ||
|
|
||
| - **ユーザーアクション**: 受信者が行える決定と、それに応じたワークフローの進行方法。 | ||
|
|
||
| - **タイムアウト戦略**: 待機時間と、受信者が応答しなかった場合の処理。 | ||
|
|
||
| ### 配信方法 | ||
|
|
||
| リクエストを配信するチャネルを選択します。現在利用可能な方法は以下の通りです: | ||
|
|
||
| - **Webアプリ**: 現在のユーザーが応答できるように、Webアプリのインターフェースに直接リクエストフォームを表示します。 | ||
|
|
||
| - **メール**: リクエストリンクを含むメールを1人または複数の受信者に送信します。 | ||
|
|
||
| <Note> | ||
| 配信方法に関わらず、最初の応答があった時点でリクエストはクローズされます。 | ||
| </Note> | ||
|
|
||
| ### フォーム内容 | ||
|
|
||
| リクエストフォームに表示される内容をカスタマイズします: | ||
|
|
||
| - **Markdownによるフォーマットと構造化** | ||
|
|
||
| 見出し、リスト、太字、リンクなどのMarkdown要素を使用して、情報を明確に提示します。 | ||
|
|
||
| - **変数による動的データの表示** | ||
|
|
||
| ワークフロー変数を参照して、レビュー用のAI生成テキストや上流ノードからの必要なコンテキスト情報などの動的コンテンツを表示します。 | ||
|
|
||
| <Tip> | ||
| 推論モデルからの `text` 出力変数を参照する場合、フォームには最終的な回答とともにモデルの思考プロセスが表示されます。 | ||
|
|
||
| 回答のみを表示するには、対応するLLMノードで **推論タグの分離を有効にする(Enable Reasoning Tag Separation)** をオンにしてください。 | ||
| </Tip> | ||
|
|
||
| - **入力フィールドによる入力の収集** | ||
|
|
||
| 入力フィールドは、空の状態から始めることも、受信者が編集できるように変数(例:修正するLLMの出力)や静的テキスト(例:例やデフォルト値)を事前に入れておくことも可能です。 | ||
|
|
||
| 各入力フィールドは、下流で使用するための変数となります。例えば、編集されたコンテンツをさらなる処理のために渡したり、再生成のためにLLMにフィードバックを送信したりできます。 | ||
|
|
||
| ### ユーザーアクション | ||
|
|
||
| 受信者がクリックできる決定ボタンを定義します。各ボタンは、ワークフローを異なる実行パスにルーティングします。 | ||
|
|
||
| 例えば、`投稿` ブランチはコンテンツの公開をトリガーするノードにつながり、`再生成` ブランチはコンテンツを修正するためにLLMノードにループバックするような構成が可能です。 | ||
|
|
||
| <Tip> | ||
| プリセットのボタンスタイルを使用して、アクションを視覚的に区別します。 | ||
|
|
||
| 例えば、`承認` のような重要なアクションには目立つスタイルを使用し、二次的なオプションには控えめなスタイルを使用します。 | ||
| </Tip> | ||
|
|
||
| ### タイムアウト戦略 | ||
|
|
||
| リクエストが期限切れになるまで応答を待機する時間を設定します。 | ||
|
|
||
| 設定時間内に受信者が応答しなかった場合、タイムアウトを処理するためのフォールバックブランチ(例:通知の送信やリクエストの再試行)を定義していない限り、ワークフローは自動的に終了します。 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| title: 人工介入 | ||
| description: 暂停工作流以请求人工输入、审核或决策 | ||
| icon: user-magnifying-glass | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| --- | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <Note> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](/en/use-dify/nodes/human-input)。</Note> | ||
|
|
||
| 人工介入节点会在关键点暂停工作流,在继续执行前请求人工输入。 | ||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 当执行到达此节点时,系统会通过特定渠道发送可自定义的请求表单。接收人可以提供输入、审核数据,并从预定义的决策中进行选择,这些决策将决定工作流后续如何进行。 | ||
|
|
||
| 通过在关键环节直接嵌入人工判断,你可以在**自动化效率与人工监督之间取得平衡**。 | ||
|
|
||
| <Frame caption="请求表单示例"><img src="/images/human_input_request_form_example.png" alt="请求表单示例" /></Frame> | ||
|
|
||
| ## 配置 | ||
|
|
||
| 配置以下内容以定义该节点如何请求和处理人工输入: | ||
|
|
||
| - **发送方式**:请求表单如何送达接收人。 | ||
|
|
||
| - **表单内容**:接收人将看到什么信息以及他们可以输入什么。 | ||
|
|
||
| - **用户动作**:接收人可以做出哪些决策,以及工作流相应如何进行。 | ||
|
|
||
| - **超时策略**:等待多久以及如果无人响应会发生什么。 | ||
|
|
||
| ### 发送方式 | ||
|
|
||
| 选择发送请求的渠道。当前可用的方式: | ||
|
|
||
| - **Web 应用**:直接在 Web 应用界面中显示请求表单,供当前用户响应。 | ||
|
|
||
| - **邮件**:向一位或多位接收人发送包含请求链接的电子邮件。 | ||
|
|
||
| <Note> | ||
| 无论采用何种发送方式,请求将在收到第一个响应后关闭。 | ||
| </Note> | ||
|
|
||
| ### 表单内容 | ||
|
|
||
| 自定义请求表单中显示的内容: | ||
|
|
||
RiskeyL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - **使用 Markdown 格式化结构** | ||
|
|
||
| 使用标题、列表、粗体文本、链接和其他 Markdown 元素清晰地呈现信息。 | ||
|
|
||
| - **使用变量显示动态数据** | ||
|
|
||
| 引用工作流变量以显示动态内容,例如供审核的 AI 生成文本或上游节点所需的任何上下文信息。 | ||
|
|
||
| <Tip> | ||
| 如果你引用推理模型的 `text` 输出变量,表单将默认显示模型的思维过程以及最终答案。 | ||
|
|
||
| 要仅显示答案,请为相应的 LLM 节点开启 **思维链分离渲染**(Enable Reasoning Tag Separation)。 | ||
| </Tip> | ||
|
|
||
| - **使用输入字段收集输入** | ||
|
|
||
| 输入字段可以是空的,也可以预填变量(例如,需优化的 LLM 输出)或静态文本(例如,示例或默认值),接收人可以对其进行编辑。 | ||
|
|
||
| 每个输入字段都会成为供下游使用的变量。例如,将编辑后的内容传递给后续处理,或将反馈发送给 LLM 进行重新生成。 | ||
|
|
||
| ### 用户动作 | ||
|
|
||
| 定义接收人可以点击的决策按钮。每个按钮将工作流路由到不同的执行路径。 | ||
|
|
||
| 例如,`发布` 分支可能会通向触发内容发布的节点,而 `重新生成` 分支可能会循环回 LLM 节点以修改内容。 | ||
|
|
||
| <Tip> | ||
| 使用预设按钮样式在视觉上区分动作。 | ||
|
|
||
| 例如,对 `批准` 等关键动作使用醒目的样式,对次要选项使用较淡的样式。 | ||
| </Tip> | ||
|
|
||
| ### 超时策略 | ||
|
|
||
| 配置在请求过期前等待响应的时间。 | ||
|
|
||
| 如果在设定时间内没有接收人响应,工作流将自动结束,除非你定义了一个后备分支来处理超时——例如,发送通知或重试请求。 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.