Files
dify-docs/ja-jp/guides/workflow/node/user-input.mdx
Riskey 53c4c93b1e add docs for trigger (#504)
* draft

* draft

* draft

* refine dev docs

* almost

* update

* remove sys.file and sys.query; add sys.timestamp

* update the end node to output

* modify the introduction section of variable

* fix typo

* adjust image size

* remove unnecessary list

* feedback fix

* remove example

* feedback fix & add en/ja dev docs

* correct description

* fix typos

* replace UI text

* refinements & add zh-ja translation

* feedback fixes

* fix punctuation

* refine heading-reference

* typo

* adjust casing & remove sys.timestamp from chatflow

* Docs tools: 2 succeeded, some failed

Rename operation failed: - Lang 'zh': File 'dify-docs/plugin-dev-zh/0211-getting-started-dify-tool.mdx' - Renaming error: Unexpected error: 'str' object has no attribute 'get'
- Lang 'zh': File 'dify-docs/plugin-dev-zh/0222-datasource-plugin.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'zh': File 'dify-docs/plugin-dev-zh/0222-tool-oauth.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'zh': File 'dify-docs/plugin-dev-zh/0222-trigger-plugin.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'en': File 'dify-docs/plugin-dev-en/0211-getting-started-dify-tool.mdx' - Renaming error: Unexpected error: 'str' object has no attribute 'get'
- Lang 'en': File 'dify-docs/plugin-dev-en/0222-datasource-plugin.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'en': File 'dify-docs/plugin-dev-en/0222-tool-oauth.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'en': File 'dify-docs/plugin-dev-en/0222-trigger-plugin.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'ja': File 'dify-docs/plugin-dev-ja/0211-getting-started-dify-tool.mdx' - Renaming error: Unexpected error: 'str' object has no attribute 'get'
- Lang 'ja': File 'dify-docs/plugin-dev-ja/0222-datasource-plugin.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).
- Lang 'ja': File 'dify-docs/plugin-dev-ja/0222-trigger-plugin.mdx' - Skipped (non-compliant):
Missing/empty critical frontmatter fields for renaming: dimensions.type.primary, dimensions.type.detail, dimensions.level, standard_title, language (expected for metadata, though not used in filename suffix anymore).

---------

Co-authored-by: Riskey <riskey47@dify.ai>
Co-authored-by: alterxyz <88554920+alterxyz@users.noreply.github.com>
2025-10-30 21:11:33 +08:00

122 lines
6.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: ユーザー入力
---
## 概要
ユーザー入力ノードは開始ノードの一種で、エンドユーザーがアプリケーションを実行する際に収集する情報を定義できます。
このノードで開始するアプリケーションはオンデマンドで実行され、ユーザーの直接的な操作や API 呼び出しによって開始されます。これらのアプリケーションは、単体の Web アプリや MCP サーバーとして公開したり、バックエンドサービス API を通じて外部に公開したり、他の Dify アプリケーション内でツールとして利用したりできます。
<Info>
各アプリケーションキャンバスには、ユーザー入力ノードを 1 つだけ配置できます。
</Info>
## 入力変数
### プリセット
プリセット入力変数はシステムで定義されており、デフォルトで利用可能です。
- `userinput.files`:エンドユーザーがアプリケーションを実行する際にアップロードしたファイル。
<Note>
workflow アプリケーションの場合、このプリセット変数は*レガシー機能legacy*と見なされており、後方互換性のためにのみ維持されています。
ユーザーファイルを収集する際は、[カスタムファイル型入力フィールド](#ファイル入力)の使用を推奨します。
</Note>
- `userinput.query`chatflow のみ):ユーザーの最新の会話ターンから自動的にキャプチャされたテキストメッセージ。
### カスタム
ユーザー入力ノードでカスタム入力フィールドを設定して、エンドユーザーから情報を収集できます。各フィールドは変数となり、下流のノードから参照できます。例えば、変数名が `user_name` の入力フィールドを追加した場合、workflow 全体で `{{user_name}}` として参照できます。
さまざまな種類のユーザー入力を処理するために、7 種類の入力フィールドタイプから選択できます。
<Info>
**ラベル名**はエンドユーザーに表示されます。
</Info>
<Tip>
chatflow アプリケーションでは、任意の入力変数を**非表示**にして、エンドユーザーには見えないようにしながら、chatflow 内部では参照可能な状態を維持できます。
</Tip>
#### テキスト入力
<Tabs>
<Tab title="短文">
短文フィールドは最大 256 文字まで受け付けます。名前、メールアドレス、タイトル、または 1 行に収まる短いテキスト入力に適しています。
</Tab>
<Tab title="段落">
段落フィールドは長文テキスト入力を許可し、文字数制限はありません。詳細な回答や説明のために、複数行のテキストエリアをユーザーに提供します。
</Tab>
</Tabs>
#### 構造化入力
<Tabs>
<Tab title="選択">
選択フィールドは、事前定義されたオプションを含むドロップダウンメニューを表示します。ユーザーはリストされたオプションからのみ選択できるため、データの一貫性が確保され、無効な入力を防ぐことができます。
</Tab>
<Tab title="数値">
数値フィールドは数値のみの入力に制限されます。数量、評価、ID、または数学的処理が必要なデータに最適です。
</Tab>
<Tab title="チェックボックス">
チェックボックスフィールドは、シンプルなはい/いいえの選択肢を提供します。ユーザーがボックスをチェックすると出力は `true` に、そうでなければ `false` になります。確認や二者択一が必要な場合に使用します。
</Tab>
</Tabs>
#### ファイル入力
<Tabs>
<Tab title="単一ファイル">
単一ファイルフィールドは、サポートされている任意のタイプのファイルを 1 つアップロードできます。デバイスからのアップロードまたはファイル URL 経由でのアップロードが可能です。アップロードされたファイルは、ファイルメタデータ(名前、サイズ、タイプなど)を含む変数として利用できます。
</Tab>
<Tab title="ファイルリスト">
ファイルリストフィールドは単一ファイルと同様に機能しますが、一度に複数のファイルをアップロードできます。ドキュメント、画像、その他のファイルをまとめて処理する場合に便利です。
<Tip>
リスト操作ノードを使用して、アップロードされたファイルリストから特定のファイルをフィルタリング、ソート、または抽出して、さらなる処理を行うことができます。
</Tip>
</Tab>
</Tabs>
**ファイルの処理**
ユーザー入力ノードを通じてアップロードされたファイルは、後続のノードで適切に処理される必要があります。ユーザー入力ノードはファイルを収集するだけで、その内容を読み取ったり解析したりはしません。
そのため、ファイルの内容を抽出・処理するために特定のノードを接続する必要があります。例えば:
- ドキュメントファイルは、LLM が内容を理解できるよう、文書抽出器ノードにルーティングしてテキスト抽出を行えます。
- 画像は、ビジョン機能を持つ LLM ノードや専用の画像処理ツールに送信できます。
- CSV や JSON などの構造化データファイルは、コードノードを使用してデータを解析・変換できます。
<Tip>
ユーザーが異なるタイプのファイル(画像とドキュメントなど)を複数アップロードした場合、リスト操作ノードを使用してファイルタイプごとに分離し、適切な処理ブランチにルーティングできます。
</Tip>
## 次のステップ
ユーザー入力ノードを設定した後、他のノードに接続して収集したデータを処理できます。一般的なパターンには次のようなものがあります:
- 入力を LLM ノードに送信して処理する。
- 知識検索ノードを使用して、入力に基づいて関連情報を検索する。
- 入力に基づいた条件ロジックで、実行パスを異なるブランチにルーティングする。
{/*
Contributing Section
DO NOT edit this section!
It will be automatically generated by the script.
*/}
---
[このページを編集する](https://github.com/langgenius/dify-docs/edit/main/ja-jp/guides/workflow/node/user-input.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml)