mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
* fix redirect language code prefixes * rename: cn -> zh, jp -> ja * remove hardcoded ja / zh references * remove hardcoded 'english' references * renamed variable names and dict keys to language agnostic names * fix: add missing language helper methods to PRAnalyzer - Add get_language_directory() method - Initialize source_language and target_languages from config - Fixes AttributeError when generating mixed PR errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * test: kitchen sink workflow validation v2 This PR validates the translation workflow after config-driven refactoring: Changes: - Add new test file: test-workflow-validation.mdx - Modify existing file: introduction.mdx - Update docs.json navigation Tests: - New file translation (add workflow) - Existing file translation (update workflow) - Navigation sync across languages - Config-driven language codes (zh/ja instead of cn/jp) - Source language abstraction (no hardcoded "English") Expected workflow behavior: 1. Detect changes in en/ directory 2. Translate new file to zh and ja 3. Update modified file translations 4. Sync docs.json for all language sections 5. Commit translated files automatically 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: update workflow paths to use zh/ja instead of cn/jp Aligns workflow trigger paths with the zh/ja language directory rename. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Revert "fix: update workflow paths to use zh/ja instead of cn/jp" This reverts commit9587b7cc5d. * Revert "test: kitchen sink workflow validation v2" This reverts commit4abdd69fd2. * fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp * Refactor/language codes (#240) * test: kitchen sink workflow validation v2 This PR validates the translation workflow after config-driven refactoring: Changes: - Add new test file: test-workflow-validation.mdx - Modify existing file: introduction.mdx - Update docs.json navigation Tests: - New file translation (add workflow) - Existing file translation (update workflow) - Navigation sync across languages - Config-driven language codes (zh/ja instead of cn/jp) - Source language abstraction (no hardcoded "English") Expected workflow behavior: 1. Detect changes in en/ directory 2. Translate new file to zh and ja 3. Update modified file translations 4. Sync docs.json for all language sections 5. Commit translated files automatically 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: update workflow paths to use zh/ja instead of cn/jp Aligns workflow trigger paths with the zh/ja language directory rename. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Revert "fix: update workflow paths to use zh/ja instead of cn/jp" This reverts commit9587b7cc5d. * Revert "test: kitchen sink workflow validation v2" This reverts commit4abdd69fd2. * fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp --------- Co-authored-by: Claude <noreply@anthropic.com> * fix: update workflow files to use 'source' instead of 'english' After refactoring the PR analyzer to use 'source' for source language PRs (instead of hardcoded 'english'), the workflow files need to match. Changes: - sync_docs_analyze.yml: pr_type == 'source' (was 'english') - sync_docs_update.yml: PR_TYPE != 'source' check - Updated all comments from "English" to "source language" - Updated all pr_type values in JSON from "english" to "source" This ensures the workflows trigger correctly with the refactored config-driven language system. Related: language code refactoring (cn/jp → zh/ja) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix/workflow source language references (#245) * test: kitchen sink workflow validation v2 This PR validates the translation workflow after config-driven refactoring: Changes: - Add new test file: test-workflow-validation.mdx - Modify existing file: introduction.mdx - Update docs.json navigation Tests: - New file translation (add workflow) - Existing file translation (update workflow) - Navigation sync across languages - Config-driven language codes (zh/ja instead of cn/jp) - Source language abstraction (no hardcoded "English") Expected workflow behavior: 1. Detect changes in en/ directory 2. Translate new file to zh and ja 3. Update modified file translations 4. Sync docs.json for all language sections 5. Commit translated files automatically 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: update workflow paths to use zh/ja instead of cn/jp Aligns workflow trigger paths with the zh/ja language directory rename. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Revert "fix: update workflow paths to use zh/ja instead of cn/jp" This reverts commit9587b7cc5d. * Revert "test: kitchen sink workflow validation v2" This reverts commit4abdd69fd2. * fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp * fix: update workflow files to use 'source' instead of 'english' After refactoring the PR analyzer to use 'source' for source language PRs (instead of hardcoded 'english'), the workflow files need to match. Changes: - sync_docs_analyze.yml: pr_type == 'source' (was 'english') - sync_docs_update.yml: PR_TYPE != 'source' check - Updated all comments from "English" to "source language" - Updated all pr_type values in JSON from "english" to "source" This ensures the workflows trigger correctly with the refactored config-driven language system. Related: language code refactoring (cn/jp → zh/ja) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> * fix * fix docs.json language codes * rename previous version docs: cn -> zh, jp -> ja * rm duplicate redirect entires --------- Co-authored-by: Claude <noreply@anthropic.com>
69 lines
4.5 KiB
Plaintext
69 lines
4.5 KiB
Plaintext
---
|
||
title: "答え"
|
||
description: "チャットフローアプリケーションで応答コンテンツを定義"
|
||
icon: "message"
|
||
---
|
||
|
||
<Note> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](/en/use-dify/nodes/answer)を参照してください。</Note>
|
||
|
||
|
||
Answerノードは、チャットフローアプリケーションでユーザーに配信されるコンテンツを定義します。これを使用してレスポンスをフォーマットし、テキストと変数を組み合わせ、テキスト、画像、ファイルを含むマルチモーダルコンテンツをストリーミングします。
|
||
|
||
<Info>
|
||
Answerノードはチャットフローアプリケーションでのみ利用可能です。ワークフローアプリケーションでは代わりにEndノードを使用します。
|
||
</Info>
|
||
|
||
## コンテンツ設定
|
||
|
||
Answerノードは柔軟なテキストエディタを提供し、固定テキスト、前のノードからの変数、またはその両方の組み合わせを使用してレスポンスを作成できます。
|
||
|
||
`{{variable_name}}`構文を使用して、前のワークフローノードからの変数を参照します。エディタはリッチコンテンツフォーマットと変数挿入をサポートし、動的でコンテキストに応じたレスポンスを作成します。
|
||
|
||
<Frame caption="プレーンテキストのAnswer設定">
|
||
<img src="https://assets-docs.dify.ai/2025/04/42bb6bdef101bf79f959f4fc56a50ff3.png" alt="プレーンテキストのAnswer例" />
|
||
</Frame>
|
||
|
||
## マルチモーダルレスポンス
|
||
|
||
Answerノードは、単一のレスポンスストリームでテキスト、画像、ファイルを含むリッチコンテンツの配信をサポートします。
|
||
|
||
<Frame caption="画像とテキストコンテンツを含むマルチモーダルのAnswer">
|
||
<img src="https://assets-docs.dify.ai/2025/04/d2c901e821029756ebf95f4e099d833f.png" alt="マルチモーダルのAnswer例" />
|
||
</Frame>
|
||
|
||
**テキストコンテンツ**は変数置換、マークダウンフォーマット、ワークフロー処理結果に基づく動的コンテンツを含むことができます。
|
||
|
||
**画像コンテンツ**はツールによって生成された画像、ユーザーがアップロードした画像、またはワークフローノードによって処理された画像を表示します。画像はリッチなユーザー体験のためにテキストと並行してストリーミングされます。
|
||
|
||
**ファイルコンテンツ**は、ワークフロー実行中に生成または処理されたドキュメント、スプレッドシート、その他のファイルを配信します。
|
||
|
||
<Frame caption="チャットでのAnswerノードのユーザーインターフェース">
|
||
<img src="https://assets-docs.dify.ai/2025/04/5a70a5e568dded3975e54cfa84085c93.png" alt="Answerノードのチャットインターフェース" />
|
||
</Frame>
|
||
|
||
## 複数のAnswerノード
|
||
|
||
チャットフロー全体に複数のAnswerノードを配置して、処理の異なる段階でコンテンツを配信できます。これにより以下が可能になります:
|
||
|
||
**段階的レスポンス** - バックグラウンドで処理が継続している間に即座に確認応答を提供
|
||
|
||
**条件付きレスポンス** - ワークフローの分岐ロジックに基づいて異なるコンテンツを送信
|
||
|
||
**ストリーミング更新** - 長時間実行されるプロセス中に部分的な結果が利用可能になったときに配信
|
||
|
||
各Answerノードは独立して会話に貢献し、洗練されたレスポンスパターンとユーザーエクスペリエンス設計を可能にします。
|
||
|
||
## 変数統合
|
||
|
||
Answerノードは、すべてのワークフローノードタイプからの出力とシームレスに統合されます。一般的な変数ソースには以下があります:
|
||
|
||
**大規模言語モデルのレスポンス** - 生成されたテキスト、分析結果、または言表示
|
||
|
||
**知識検索** - 自動引用追跡機能を備えた知識ベースで見つかった関連情報を表示
|
||
|
||
**ツール結果** - 外部API、計算、またはサービス統合からのデータを表示
|
||
|
||
**ファイル処理** - 抽出されたテキスト、分析結果、または処理されたドキュメントコンテンツを表示
|
||
|
||
変数システムは型安全性を維持し、チャットインターフェースでの最適な表示のために異なるコンテンツタイプを自動的に処理します。
|