diff --git a/.github/workflows/sync_docs.yml b/.github/workflows/sync_docs.yml new file mode 100644 index 00000000..813adbed --- /dev/null +++ b/.github/workflows/sync_docs.yml @@ -0,0 +1,121 @@ +name: Sync Documentation Structure + +on: + push: + branches: + - main + - revamp + paths: + - 'docs.json' + - 'en/**/*.md' + - 'en/**/*.mdx' + workflow_dispatch: + inputs: + since_commit: + description: 'Git commit to compare against (default: HEAD~1)' + required: false + default: 'HEAD~1' + +jobs: + sync-docs: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for git diff + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + cd tools/translate + pip install httpx aiofiles python-dotenv + + - name: Check for documentation changes + id: check-changes + run: | + # Determine the commit to compare against + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + SINCE_COMMIT="${{ github.event.inputs.since_commit }}" + else + SINCE_COMMIT="HEAD~1" + fi + + echo "Checking for changes since: $SINCE_COMMIT" + + # Check if there are any English doc changes + if git diff --name-only $SINCE_COMMIT HEAD | grep -E '^(docs\.json|en/.*\.(md|mdx))$'; then + echo "has_changes=true" >> $GITHUB_OUTPUT + echo "since_commit=$SINCE_COMMIT" >> $GITHUB_OUTPUT + else + echo "has_changes=false" >> $GITHUB_OUTPUT + echo "No documentation changes detected" + fi + + - name: Run documentation synchronization + if: steps.check-changes.outputs.has_changes == 'true' + env: + DIFY_API_KEY: ${{ secrets.DIFY_API_KEY }} + run: | + cd tools/translate + echo "Starting documentation synchronization..." + echo "Since commit: ${{ steps.check-changes.outputs.since_commit }}" + + python sync_and_translate.py "$DIFY_API_KEY" "${{ steps.check-changes.outputs.since_commit }}" + + - name: Check for sync results + if: steps.check-changes.outputs.has_changes == 'true' + id: check-sync-results + run: | + # Check if there are any changes to commit + if [[ -n $(git status --porcelain) ]]; then + echo "has_sync_changes=true" >> $GITHUB_OUTPUT + echo "Sync created changes to commit" + else + echo "has_sync_changes=false" >> $GITHUB_OUTPUT + echo "No changes from sync" + fi + + - name: Commit and push synchronized changes + if: steps.check-sync-results.outputs.has_sync_changes == 'true' + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + # Add all changes + git add . + + # Create commit message + COMMIT_MSG="docs: auto-sync documentation structure and translations + + 🤖 Generated with [Claude Code](https://claude.ai/code) + + Co-Authored-By: Claude " + + git commit -m "$COMMIT_MSG" + + # Push to the current branch + echo "Pushing to branch: ${{ github.ref_name }}" + git push origin HEAD:${{ github.ref_name }} + + echo "✓ Documentation synchronization completed and pushed" + + - name: Summary + if: always() + run: | + if [[ "${{ steps.check-changes.outputs.has_changes }}" == "true" ]]; then + if [[ "${{ steps.check-sync-results.outputs.has_sync_changes }}" == "true" ]]; then + echo "✅ Documentation synchronization completed successfully" + else + echo "ℹ️ Documentation synchronization ran but no changes were needed" + fi + else + echo "ℹ️ No documentation changes detected, synchronization skipped" + fi \ No newline at end of file diff --git a/docs.json b/docs.json index 5909624b..97602635 100644 --- a/docs.json +++ b/docs.json @@ -30,7 +30,8 @@ "pages": [ "en/documentation/pages/getting-started/introduction", "en/documentation/pages/getting-started/quick-start", - "en/documentation/pages/getting-started/key-concepts" + "en/documentation/pages/getting-started/key-concepts", + "en/documentation/pages/getting-started/faq" ] }, { @@ -60,13 +61,13 @@ { "group": "Build", "pages": [ - "en/documentation/pages/build/shortcut-key", - "en/documentation/pages/build/orchestrate-node", - "en/documentation/pages/build/predefined-error-handling-logic", - "en/documentation/pages/build/mcp", - "en/documentation/pages/build/version-control", - "en/documentation/pages/build/additional-features" - ] + "en/documentation/pages/build/shortcut-key", + "en/documentation/pages/build/orchestrate-node", + "en/documentation/pages/build/predefined-error-handling-logic", + "en/documentation/pages/build/mcp", + "en/documentation/pages/build/version-control", + "en/documentation/pages/build/additional-features" + ] }, { "group": "Debug", @@ -105,39 +106,39 @@ }, { "group": "Knowledge", - "pages": [ - "en/documentation/pages/knowledge/readme", + "pages": [ + "en/documentation/pages/knowledge/readme", + { + "group": "Create Knowledge", + "pages": [ + "en/documentation/pages/knowledge/create-knowledge/introduction", { - "group": "Create Knowledge", + "group": "1. Import Text Data", "pages": [ - "en/documentation/pages/knowledge/create-knowledge/introduction", - { - "group": "1. Import Text Data", - "pages": [ - "en/documentation/pages/knowledge/create-knowledge/import-text-data/readme", - "en/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion", - "en/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website" - ] - }, - "en/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text", - "en/documentation/pages/knowledge/create-knowledge/setting-indexing-methods" + "en/documentation/pages/knowledge/create-knowledge/import-text-data/readme", + "en/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion", + "en/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website" ] }, - { - "group": "Manage Knowledge", - "pages": [ - "en/documentation/pages/knowledge/manage-knowledge/introduction", - "en/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents", - "en/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api" - ] - }, - "en/documentation/pages/knowledge/metadata", - "en/documentation/pages/knowledge/integrate-knowledge-within-application", - "en/documentation/pages/knowledge/retrieval-test-and-citation", - "en/documentation/pages/knowledge/knowledge-request-rate-limit", - "en/documentation/pages/knowledge/connect-external-knowledge-base", - "en/documentation/pages/knowledge/external-knowledge-api" + "en/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text", + "en/documentation/pages/knowledge/create-knowledge/setting-indexing-methods" ] + }, + { + "group": "Manage Knowledge", + "pages": [ + "en/documentation/pages/knowledge/manage-knowledge/introduction", + "en/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents", + "en/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api" + ] + }, + "en/documentation/pages/knowledge/metadata", + "en/documentation/pages/knowledge/integrate-knowledge-within-application", + "en/documentation/pages/knowledge/retrieval-test-and-citation", + "en/documentation/pages/knowledge/knowledge-request-rate-limit", + "en/documentation/pages/knowledge/connect-external-knowledge-base", + "en/documentation/pages/knowledge/external-knowledge-api" + ] }, { "group": "Workspace", @@ -147,7 +148,7 @@ "en/documentation/pages/workspace/readme", "en/documentation/pages/workspace/team-members-management", "en/documentation/pages/workspace/personal-account-management", - "en/documentation/pages/workspace/subscription-management" + "en/documentation/pages/workspace/subscription-management" ] }, { @@ -185,7 +186,7 @@ "en/self-hosting/dify-for-education", "en/self-hosting/openapi-api-access-readme", "en/self-hosting/install-faq" - ] + ] }, { "dropdown": "API Reference", @@ -212,9 +213,7 @@ { "dropdown": "Develop", "icon": "code-pull-request", - "groups": [ - - ] + "groups": [] } ] }, @@ -222,497 +221,145 @@ "language": "zh-Hans", "dropdowns": [ { - "dropdown": "使用文档", - "groups": [ + "dropdown": "文档", + "icon": "book-open", + "pages": [ { - "group": "入门", + "group": " ", "pages": [ { - "group": "欢迎使用 Dify", + "group": "快速开始", "pages": [ - "zh-hans/introduction", - "zh-hans/getting-started/readme/features-and-specifications", - "zh-hans/getting-started/readme/model-providers" - ] - }, - "zh-hans/getting-started/cloud", - { - "group": "Dify 社区版", - "pages": [ - "zh-hans/getting-started/install-self-hosted/readme", - "zh-hans/getting-started/install-self-hosted/docker-compose", - "zh-hans/getting-started/install-self-hosted/local-source-code", - "zh-hans/getting-started/install-self-hosted/bt-panel", - "zh-hans/getting-started/install-self-hosted/start-the-frontend-docker-container", - "zh-hans/getting-started/install-self-hosted/environments", - "zh-hans/getting-started/install-self-hosted/faq" - ] - }, - "zh-hans/getting-started/dify-premium", - "zh-hans/getting-started/dify-for-education", - "zh-hans/openapi-api-access-readme" - ] - }, - { - "group": "手册", - "pages": [ - { - "group": "接入大模型", - "pages": [ - "zh-hans/guides/model-configuration/readme", - "zh-hans/guides/model-configuration/new-provider", - "zh-hans/guides/model-configuration/predefined-model", - "zh-hans/guides/model-configuration/customizable-model", - "zh-hans/guides/model-configuration/interfaces", - "zh-hans/guides/model-configuration/schema", - "zh-hans/guides/model-configuration/load-balancing" + "zh-hans/documentation/pages/getting-started/introduction", + "zh-hans/documentation/pages/getting-started/quick-start", + "zh-hans/documentation/pages/getting-started/key-concepts", + "zh-hans/documentation/pages/getting-started/faq" ] }, { - "group": "构建应用", + "group": "Nodes", "pages": [ - "zh-hans/guides/application-orchestrate/readme", - "zh-hans/guides/application-orchestrate/creating-an-application", - { - "group": "聊天助手", - "pages": [ - "zh-hans/guides/application-orchestrate/chatbot-application", - "zh-hans/guides/application-orchestrate/multiple-llms-debugging" - ] - }, - "zh-hans/guides/application-orchestrate/agent", - { - "group": "应用工具箱", - "pages": [ - "zh-hans/guides/application-orchestrate/app-toolkits/readme", - "zh-hans/guides/application-orchestrate/app-toolkits/moderation-tool" - ] - } + "zh-hans/documentation/pages/nodes/start", + "zh-hans/documentation/pages/nodes/llm", + "zh-hans/documentation/pages/nodes/knowledge-retrieval", + "zh-hans/documentation/pages/nodes/answer", + "zh-hans/documentation/pages/nodes/end", + "zh-hans/documentation/pages/nodes/agent", + "zh-hans/documentation/pages/nodes/tools", + "zh-hans/documentation/pages/nodes/question-classifier", + "zh-hans/documentation/pages/nodes/ifelse", + "zh-hans/documentation/pages/nodes/iteration", + "zh-hans/documentation/pages/nodes/loop", + "zh-hans/documentation/pages/nodes/code", + "zh-hans/documentation/pages/nodes/template", + "zh-hans/documentation/pages/nodes/variable-aggregator", + "zh-hans/documentation/pages/nodes/doc-extractor", + "zh-hans/documentation/pages/nodes/variable-assigner", + "zh-hans/documentation/pages/nodes/parameter-extractor", + "zh-hans/documentation/pages/nodes/http-request", + "zh-hans/documentation/pages/nodes/list-operator" ] }, { - "group": "工作流", + "group": "构建", "pages": [ - "zh-hans/guides/workflow/readme", - "zh-hans/guides/workflow/key-concept", - "zh-hans/guides/workflow/variables", - { - "group": "节点说明", - "pages": [ - "zh-hans/guides/workflow/node/start", - "zh-hans/guides/workflow/node/llm", - "zh-hans/guides/workflow/node/knowledge-retrieval", - "zh-hans/guides/workflow/node/question-classifier", - "zh-hans/guides/workflow/node/ifelse", - "zh-hans/guides/workflow/node/code", - "zh-hans/guides/workflow/node/template", - "zh-hans/guides/workflow/node/doc-extractor", - "zh-hans/guides/workflow/node/list-operator", - "zh-hans/guides/workflow/node/variable-aggregator", - "zh-hans/guides/workflow/node/variable-assigner", - "zh-hans/guides/workflow/node/iteration", - "zh-hans/guides/workflow/node/parameter-extractor", - "zh-hans/guides/workflow/node/http-request", - "zh-hans/guides/workflow/node/agent", - "zh-hans/guides/workflow/node/tools", - "zh-hans/guides/workflow/node/end", - "zh-hans/guides/workflow/node/answer", - "zh-hans/guides/workflow/node/loop" - ] - }, - "zh-hans/guides/workflow/shortcut-key", - "zh-hans/guides/workflow/orchestrate-node", - "zh-hans/guides/workflow/file-upload", - { - "group": "异常处理", - "pages": [ - "zh-hans/guides/workflow/error-handling/readme", - "zh-hans/guides/workflow/error-handling/predefined-nodes-failure-logic", - "zh-hans/guides/workflow/error-handling/error-type" - ] - }, - "zh-hans/guides/workflow/additional-feature", - { - "group": "预览与调试", - "pages": [ - "zh-hans/guides/workflow/debug-and-preview/preview-and-run", - "zh-hans/guides/workflow/debug-and-preview/step-run", - "zh-hans/guides/workflow/debug-and-preview/history-and-logs", - "zh-hans/guides/workflow/debug-and-preview/variable-inspect" - ] - }, - "zh-hans/guides/workflow/publish", - "zh-hans/guides/workflow/structured-outputs", - "zh-hans/guides/workflow/bulletin" + "zh-hans/documentation/pages/build/shortcut-key", + "zh-hans/documentation/pages/build/orchestrate-node", + "zh-hans/documentation/pages/build/predefined-error-handling-logic", + "zh-hans/documentation/pages/build/mcp", + "zh-hans/documentation/pages/build/version-control", + "zh-hans/documentation/pages/build/additional-features" ] }, { - "group": "知识库", + "group": "调试", "pages": [ - "zh-hans/guides/knowledge-base/readme", - { - "group": "创建知识库", - "pages": [ - "zh-hans/guides/knowledge-base/knowledge-base-creation/introduction", - { - "group": "1. 导入文本数据", - "pages": [ - "zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/readme", - "zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion", - "zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website" - ] - }, - "zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text", - "zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods" - ] - }, - { - "group": "管理知识库", - "pages": [ - "zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/introduction", - "zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents", - "zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api" - ] - }, - "zh-hans/guides/knowledge-base/metadata", - "zh-hans/guides/knowledge-base/integrate-knowledge-within-application", - "zh-hans/guides/knowledge-base/retrieval-test-and-citation", - "zh-hans/guides/knowledge-base/knowledge-request-rate-limit", - "zh-hans/guides/knowledge-base/connect-external-knowledge-base", - "zh-hans/guides/knowledge-base/api-documentation/external-knowledge-api-documentation" - ] - }, - { - "group": "工具", - "pages": [ - "zh-hans/guides/tools/readme", - "zh-hans/guides/tools/mcp", - "zh-hans/guides/tools/quick-tool-integration", - "zh-hans/guides/tools/advanced-tool-integration", - { - "group": "工具配置详情", - "pages": [ - "zh-hans/guides/tools/tool-configuration/google", - "zh-hans/guides/tools/tool-configuration/bing", - "zh-hans/guides/tools/tool-configuration/searchapi", - "zh-hans/guides/tools/tool-configuration/stable-diffusion", - "zh-hans/guides/tools/tool-configuration/dall-e", - "zh-hans/guides/tools/tool-configuration/perplexity", - "zh-hans/guides/tools/tool-configuration/alphavantage", - "zh-hans/guides/tools/tool-configuration/searxng", - "zh-hans/guides/tools/tool-configuration/serper", - "zh-hans/guides/tools/tool-configuration/siliconflow", - "zh-hans/guides/tools/tool-configuration/comfyui" - ] - } + "zh-hans/documentation/pages/debug/step-run", + "zh-hans/documentation/pages/debug/variable-inspect", + "zh-hans/documentation/pages/debug/history-and-logs", + "zh-hans/documentation/pages/debug/error-type" ] }, { "group": "发布", "pages": [ + "zh-hans/documentation/pages/publish/README", + "zh-hans/documentation/pages/publish/workflow-webapp", + "zh-hans/documentation/pages/publish/chatflow-webapp", + "zh-hans/documentation/pages/publish/web-app-settings", + "zh-hans/documentation/pages/publish/publish-mcp", + "zh-hans/documentation/pages/publish/embedding-in-websites", + "zh-hans/documentation/pages/publish/developing-with-apis" + ] + }, + { + "group": "监控", + "pages": [ + "zh-hans/documentation/pages/monitor/analysis", + "zh-hans/documentation/pages/monitor/logs", + "zh-hans/documentation/pages/monitor/annotation-reply", + "zh-hans/documentation/pages/monitor/integrate-arize", + "zh-hans/documentation/pages/monitor/integrate-phoenix", + "zh-hans/documentation/pages/monitor/integrate-langsmith", + "zh-hans/documentation/pages/monitor/integrate-langfuse", + "zh-hans/documentation/pages/monitor/integrate-opik", + "zh-hans/documentation/pages/monitor/integrate-weave" + ] + }, + { + "group": "知识库", + "pages": [ + "zh-hans/documentation/pages/knowledge/readme", { - "group": "发布为公开 Web 站点", + "group": "Create Knowledge", "pages": [ - "zh-hans/guides/application-publishing/launch-your-webapp-quickly/readme", - "zh-hans/guides/application-publishing/launch-your-webapp-quickly/web-app-settings", - "zh-hans/guides/application-publishing/launch-your-webapp-quickly/text-generator", - "zh-hans/guides/application-publishing/launch-your-webapp-quickly/conversation-application" - ] - }, - "zh-hans/guides/application-publishing/publish-mcp", - "zh-hans/guides/application-publishing/embedding-in-websites", - "zh-hans/guides/application-publishing/developing-with-apis", - "zh-hans/guides/application-publishing/based-on-frontend-templates" - ] - }, - { - "group": "标注", - "pages": [ - "zh-hans/guides/annotation/logs", - "zh-hans/guides/annotation/annotation-reply" - ] - }, - { - "group": "监测", - "pages": [ - "zh-hans/guides/monitoring/README", - { - "group": "集成外部与 Ops 工具", - "pages": [ - "zh-hans/guides/monitoring/integrate-external-ops-tools/readme", - "zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-arize", - "zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-phoenix", - "zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-langfuse", - "zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-langsmith", - "zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-opik", - "zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-weave" - ] - }, - "zh-hans/guides/monitoring/analysis" - ] - }, - { - "group": "扩展", - "pages": [ - "zh-hans/guides/tools/extensions/README", - { - "group": "API 扩展", - "pages": [ - "zh-hans/guides/tools/extensions/api-based/api-based-extension", - "zh-hans/guides/tools/extensions/api-based/external-data-tool", - "zh-hans/guides/tools/extensions/api-based/cloudflare-workers", - "zh-hans/guides/tools/extensions/api-based/moderation" - ] - }, - { - "group": "代码扩展", - "pages": [ - "zh-hans/guides/tools/extensions/code-based/README", - "zh-hans/guides/tools/extensions/code-based/external-data-tool", - "zh-hans/guides/tools/extensions/code-based/moderation" - ] - } - ] - }, - { - "group": "协同", - "pages": [ - "zh-hans/guides/workspace/readme", - "zh-hans/guides/workspace/app", - "zh-hans/guides/workspace/invite-and-manage-members" - ] - }, - { - "group": "管理", - "pages": [ - "zh-hans/guides/management/app-management", - "zh-hans/guides/management/team-members-management", - "zh-hans/guides/management/personal-account-management", - "zh-hans/guides/management/subscription-management", - "zh-hans/guides/management/version-control" - ] - } - ] - }, - { - "group": "动手实验室", - "pages": [ - "zh-hans/workshop/readme", - { - "group": "初级", - "pages": [ - "zh-hans/workshop/basic/build-ai-image-generation-app", - "zh-hans/workshop/basic/travel-assistant", - "zh-hans/workshop/basic/the-right-way-of-markdown" - ] - }, - { - "group": "中级", - "pages": [ - "zh-hans/workshop/intermediate/article-reader", - "zh-hans/workshop/intermediate/customer-service-bot", - "zh-hans/workshop/intermediate/twitter-chatflow" - ] - } - ] - }, - { - "group": "社区", - "pages": [ - "zh-hans/community/support", - "zh-hans/community/contribution", - "zh-hans/community/docs-contribution" - ] - }, - { - "group": "插件", - "pages": [ - "zh-hans/plugins/introduction", - { - "group": "快速开始", - "pages": [ - "zh-hans/plugins/quick-start/README", - "zh-hans/plugins/quick-start/install-plugins", - { - "group": "插件开发", - "pages": [ - "zh-hans/plugins/quick-start/develop-plugins/README", - "zh-hans/plugins/quick-start/develop-plugins/initialize-development-tools", - "zh-hans/plugins/quick-start/develop-plugins/tool-plugin", + "zh-hans/documentation/pages/knowledge/create-knowledge/introduction", { - "group": "Model 插件", + "group": "1. Import Text Data", "pages": [ - "zh-hans/plugins/quick-start/develop-plugins/model-plugin/README", - "zh-hans/plugins/quick-start/develop-plugins/model-plugin/create-model-providers", - "zh-hans/plugins/quick-start/develop-plugins/model-plugin/integrate-the-predefined-model", - "zh-hans/plugins/quick-start/develop-plugins/model-plugin/customizable-model" + "zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/readme", + "zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion", + "zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website" ] }, - "zh-hans/plugins/quick-start/develop-plugins/agent-strategy-plugin", - "zh-hans/plugins/quick-start/develop-plugins/extension-plugin", - "zh-hans/plugins/quick-start/develop-plugins/bundle" + "zh-hans/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text", + "zh-hans/documentation/pages/knowledge/create-knowledge/setting-indexing-methods" ] }, - "zh-hans/plugins/quick-start/debug-plugin" - ] - }, - "zh-hans/plugins/manage-plugins", - { - "group": "接口定义", - "pages": [ - "zh-hans/plugins/schema-definition/manifest", - "zh-hans/plugins/schema-definition/endpoint", - "zh-hans/plugins/schema-definition/tool", - "zh-hans/plugins/schema-definition/agent", { - "group": "Model", + "group": "Manage Knowledge", "pages": [ - "zh-hans/plugins/schema-definition/model/model-designing-rules", - "zh-hans/plugins/schema-definition/model/model-schema" + "zh-hans/documentation/pages/knowledge/manage-knowledge/introduction", + "zh-hans/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents", + "zh-hans/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api" ] }, - "zh-hans/plugins/schema-definition/general-specifications", - "zh-hans/plugins/schema-definition/persistent-storage", - { - "group": "反向调用 Dify 服务", - "pages": [ - "zh-hans/plugins/schema-definition/reverse-invocation-of-the-dify-service/README", - "zh-hans/plugins/schema-definition/reverse-invocation-of-the-dify-service/app", - "zh-hans/plugins/schema-definition/reverse-invocation-of-the-dify-service/model", - "zh-hans/plugins/schema-definition/reverse-invocation-of-the-dify-service/tool", - "zh-hans/plugins/schema-definition/reverse-invocation-of-the-dify-service/node" - ] - } + "zh-hans/documentation/pages/knowledge/metadata", + "zh-hans/documentation/pages/knowledge/integrate-knowledge-within-application", + "zh-hans/documentation/pages/knowledge/retrieval-test-and-citation", + "zh-hans/documentation/pages/knowledge/knowledge-request-rate-limit", + "zh-hans/documentation/pages/knowledge/connect-external-knowledge-base", + "zh-hans/documentation/pages/knowledge/external-knowledge-api" ] }, { - "group": "最佳实践", + "group": "工作区", "pages": [ - "zh-hans/plugins/best-practice/develop-a-slack-bot-plugin", - "zh-hans/plugins/best-practice/how-to-use-mcp-zapier", - "zh-hans/plugins/best-practice/how-to-print-strings-to-logs-for-debugging" + "zh-hans/documentation/pages/workspace/app", + "zh-hans/documentation/pages/workspace/app-management", + "zh-hans/documentation/pages/workspace/readme", + "zh-hans/documentation/pages/workspace/team-members-management", + "zh-hans/documentation/pages/workspace/personal-account-management", + "zh-hans/documentation/pages/workspace/subscription-management" ] }, { - "group": "发布插件", + "group": "教程", "pages": [ - "zh-hans/plugins/publish-plugins/README", - "zh-hans/plugins/publish-plugins/plugin-auto-publish-pr", - { - "group": "发布至 Dify Marketplace", - "pages": [ - "zh-hans/plugins/publish-plugins/publish-to-dify-marketplace/README", - "zh-hans/plugins/publish-plugins/publish-to-dify-marketplace/plugin-developer-guidelines", - "zh-hans/plugins/publish-plugins/publish-to-dify-marketplace/plugin-privacy-protection-guidelines" - ] - }, - "zh-hans/plugins/publish-plugins/publish-plugin-on-personal-github-repo", - "zh-hans/plugins/publish-plugins/package-plugin-file-and-publish", - "zh-hans/plugins/publish-plugins/signing-plugins-for-third-party-signature-verification" - ] - }, - "zh-hans/plugins/faq" - ] - }, - { - "group": "研发", - "pages": [ - { - "group": "DifySandbox", - "pages": [ - "zh-hans/development/backend/sandbox/README", - "zh-hans/development/backend/sandbox/contribution" - ] - }, - { - "group": "模型接入", - "pages": [ - "zh-hans/development/models-integration/hugging-face", - "zh-hans/development/models-integration/replicate", - "zh-hans/development/models-integration/xinference", - "zh-hans/development/models-integration/openllm", - "zh-hans/development/models-integration/localai", - "zh-hans/development/models-integration/ollama", - "zh-hans/development/models-integration/litellm", - "zh-hans/development/models-integration/gpustack", - "zh-hans/development/models-integration/aws-bedrock-deepseek" - ] - }, - { - "group": "迁移", - "pages": [ - "zh-hans/development/migration/migrate-to-v1" - ] - } - ] - }, - { - "group": "阅读更多", - "pages": [ - { - "group": "应用案例", - "pages": [ - "zh-hans/learn-more/use-cases/integrate-deepseek-to-build-an-ai-app", - "zh-hans/learn-more/use-cases/private-ai-ollama-deepseek-dify", - "zh-hans/learn-more/use-cases/train-a-qa-chatbot-that-belongs-to-you", - "zh-hans/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code", - "zh-hans/learn-more/use-cases/build-an-notion-ai-assistant", - "zh-hans/learn-more/use-cases/building-an-ai-thesis-slack-bot", - "zh-hans/learn-more/use-cases/connect-dify-to-various-im-platforms-by-using-langbot", - "zh-hans/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes", - "zh-hans/learn-more/use-cases/practical-implementation-of-building-llm-applications-using-a-full-set-of-open-source-tools", - "zh-hans/learn-more/use-cases/dify-on-wechat", - "zh-hans/learn-more/use-cases/dify-on-dingtalk", - "zh-hans/learn-more/use-cases/dify-on-teams", - "zh-hans/learn-more/use-cases/how-to-make-llm-app-provide-a-progressive-chat-experience", - "zh-hans/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website", - "zh-hans/learn-more/use-cases/how-to-connect-aws-bedrock", - "zh-hans/learn-more/use-cases/dify-schedule", - "zh-hans/learn-more/use-cases/dify-model-arena", - "zh-hans/learn-more/use-cases/build-ai-sales-avatar", - "zh-hans/learn-more/use-cases/ai-bot-rongcloud-dify-integration-guide" - ] - }, - { - "group": "扩展阅读", - "pages": [ - "zh-hans/learn-more/extended-reading/what-is-llmops", - "zh-hans/learn-more/extended-reading/what-is-array-variable", - { - "group": "检索增强生成(RAG)", - "pages": [ - "zh-hans/learn-more/extended-reading/retrieval-augment/README", - "zh-hans/learn-more/extended-reading/retrieval-augment/hybrid-search", - "zh-hans/learn-more/extended-reading/retrieval-augment/rerank", - "zh-hans/learn-more/extended-reading/retrieval-augment/retrieval" - ] - }, - "zh-hans/learn-more/extended-reading/prompt-engineering", - "zh-hans/learn-more/extended-reading/how-to-use-json-schema-in-dify", - "zh-hans/learn-more/extended-reading/dify-docs-mcp" - ] - }, - { - "group": "常见问题", - "pages": [ - "zh-hans/learn-more/faq/install-faq", - "zh-hans/learn-more/faq/llms-use-faq", - "zh-hans/learn-more/faq/plugins" - ] - } - ] - }, - { - "group": "政策", - "pages": [ - "zh-hans/policies/open-source", - { - "group": "用户协议", - "pages": [ - "zh-hans/policies/agreement/README", - "zh-hans/policies/agreement/tos", - "zh-hans/policies/agreement/privacy", - "zh-hans/policies/agreement/get-compliance-report" + "zh-hans/documentation/pages/tutorials/build-ai-image-generation-app", + "zh-hans/documentation/pages/tutorials/article-reader", + "zh-hans/documentation/pages/tutorials/customer-service-bot", + "zh-hans/documentation/pages/tutorials/twitter-chatflow" ] } ] @@ -885,468 +532,147 @@ }, { "language": "jp", - "dropdowns": [ + "dropdowns": [ { "dropdown": "ドキュメント", - "groups": [ + "icon": "book-open", + "pages": [ { - "group": "入門", + "group": " ", "pages": [ { - "group": "Difyへようこそ", + "group": "はじめに", "pages": [ - "ja-jp/introduction", - "ja-jp/getting-started/readme/features-and-specifications", - "ja-jp/getting-started/readme/model-providers" - ] - }, - "ja-jp/getting-started/cloud", - { - "group": "Dify コミュニティ版", - "pages": [ - "ja-jp/getting-started/install-self-hosted/README", - "ja-jp/getting-started/install-self-hosted/docker-compose", - "ja-jp/getting-started/install-self-hosted/local-source-code", - "ja-jp/getting-started/install-self-hosted/bt-panel", - "ja-jp/getting-started/install-self-hosted/start-the-frontend-docker-container", - "ja-jp/getting-started/install-self-hosted/environments", - "ja-jp/getting-started/install-self-hosted/faq" - ] - }, - "ja-jp/getting-started/dify-premium", - "ja-jp/getting-started/dify-for-education", - "ja-jp/openapi-api-access-readme" - ] - }, - { - "group": "マニュアル", - "pages": [ - { - "group": "モデルの設定", - "pages": [ - "ja-jp/guides/model-configuration/README", - "ja-jp/guides/model-configuration/new-provider", - "ja-jp/guides/model-configuration/predefined-model", - "ja-jp/guides/model-configuration/customizable-model", - "ja-jp/guides/model-configuration/interfaces", - "ja-jp/guides/model-configuration/schema", - "ja-jp/guides/model-configuration/load-balancing" + "ja-jp/documentation/pages/getting-started/introduction", + "ja-jp/documentation/pages/getting-started/quick-start", + "ja-jp/documentation/pages/getting-started/key-concepts", + "ja-jp/documentation/pages/getting-started/faq" ] }, { - "group": "アプリ・オーケストレーション", + "group": "Nodes", "pages": [ - "ja-jp/guides/application-orchestrate/README", - "ja-jp/guides/application-orchestrate/creating-an-application", - { - "group": "チャットボット", - "pages": [ - "ja-jp/guides/application-orchestrate/chatbot-application", - "ja-jp/guides/application-orchestrate/multiple-llms-debugging" - ] - }, - "ja-jp/guides/application-orchestrate/agent", - { - "group": "ツールキット", - "pages": [ - "ja-jp/guides/application-orchestrate/app-toolkits/README", - "ja-jp/guides/application-orchestrate/app-toolkits/moderation-tool" - ] - } + "ja-jp/documentation/pages/nodes/start", + "ja-jp/documentation/pages/nodes/llm", + "ja-jp/documentation/pages/nodes/knowledge-retrieval", + "ja-jp/documentation/pages/nodes/answer", + "ja-jp/documentation/pages/nodes/end", + "ja-jp/documentation/pages/nodes/agent", + "ja-jp/documentation/pages/nodes/tools", + "ja-jp/documentation/pages/nodes/question-classifier", + "ja-jp/documentation/pages/nodes/ifelse", + "ja-jp/documentation/pages/nodes/iteration", + "ja-jp/documentation/pages/nodes/loop", + "ja-jp/documentation/pages/nodes/code", + "ja-jp/documentation/pages/nodes/template", + "ja-jp/documentation/pages/nodes/variable-aggregator", + "ja-jp/documentation/pages/nodes/doc-extractor", + "ja-jp/documentation/pages/nodes/variable-assigner", + "ja-jp/documentation/pages/nodes/parameter-extractor", + "ja-jp/documentation/pages/nodes/http-request", + "ja-jp/documentation/pages/nodes/list-operator" ] }, { - "group": "ワークフロー", + "group": "ビルド", "pages": [ - "ja-jp/guides/workflow/concepts", - "ja-jp/guides/workflow/variables", - { - "group": "ノードの説明", - "pages": [ - "ja-jp/guides/workflow/node/start", - "ja-jp/guides/workflow/node/end", - "ja-jp/guides/workflow/node/answer", - "ja-jp/guides/workflow/node/llm", - "ja-jp/guides/workflow/node/knowledge-retrieval", - "ja-jp/guides/workflow/node/question-classifier", - "ja-jp/guides/workflow/node/ifelse", - "ja-jp/guides/workflow/node/code", - "ja-jp/guides/workflow/node/template", - "ja-jp/guides/workflow/node/doc-extractor", - "ja-jp/guides/workflow/node/list-operator", - "ja-jp/guides/workflow/node/variable-aggregator", - "ja-jp/guides/workflow/node/variable-assigner", - "ja-jp/guides/workflow/node/iteration", - "ja-jp/guides/workflow/node/parameter-extractor", - "ja-jp/guides/workflow/node/http-request", - "ja-jp/guides/workflow/node/agent", - "ja-jp/guides/workflow/node/tools", - "ja-jp/guides/workflow/node/loop" - ] - }, - "ja-jp/guides/workflow/shortcut-key", - "ja-jp/guides/workflow/orchestrate-node", - "ja-jp/guides/workflow/file-upload", - { - "group": "エラー処理", - "pages": [ - "ja-jp/guides/workflow/error-handling/README", - "ja-jp/guides/workflow/error-handling/predefined-nodes-failure-logic", - "ja-jp/guides/workflow/error-handling/error-type" - ] - }, - "ja-jp/guides/workflow/additional-feature", - { - "group": "プレビューとデバッグ", - "pages": [ - "ja-jp/guides/workflow/debug-and-preview/preview-and-run", - "ja-jp/guides/workflow/debug-and-preview/step-run", - "ja-jp/guides/workflow/debug-and-preview/history-and-logs", - "ja-jp/guides/workflow/debug-and-preview/variable-inspect" - ] - }, - "ja-jp/guides/workflow/publish", - "ja-jp/guides/workflow/structured-outputs", - "ja-jp/guides/workflow/bulletin" + "ja-jp/documentation/pages/build/shortcut-key", + "ja-jp/documentation/pages/build/orchestrate-node", + "ja-jp/documentation/pages/build/predefined-error-handling-logic", + "ja-jp/documentation/pages/build/mcp", + "ja-jp/documentation/pages/build/version-control", + "ja-jp/documentation/pages/build/additional-features" ] }, { - "group": "ナレッジベース", + "group": "デバッグ", "pages": [ - "ja-jp/guides/knowledge-base/readme", - { - "group": "ナレッジベース作成", - "pages": [ - "ja-jp/guides/knowledge-base/knowledge-base-creation/introduction", - { - "group": "1. オンラインデータソースの活用", - "pages": [ - "ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/readme", - "ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion", - "ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website" - ] - }, - "ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text", - "ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods" - ] - }, - { - "group": "ナレッジベースの管理", - "pages": [ - "ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/readme", - "ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents", - "ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api" - ] - }, - "ja-jp/guides/knowledge-base/metadata", - "ja-jp/guides/knowledge-base/integrate-knowledge-within-application", - "ja-jp/guides/knowledge-base/retrieval-test-and-citation", - "ja-jp/guides/knowledge-base/knowledge-request-rate-limit", - "ja-jp/guides/knowledge-base/connect-external-knowledge-base", - "ja-jp/guides/knowledge-base/api-documentation/external-knowledge-api-documentation" + "ja-jp/documentation/pages/debug/step-run", + "ja-jp/documentation/pages/debug/variable-inspect", + "ja-jp/documentation/pages/debug/history-and-logs", + "ja-jp/documentation/pages/debug/error-type" ] }, { - "group": "アプリ公開", + "group": "公開", "pages": [ - { - "group": "シングルページWebアプリとして公開", - "pages": [ - "ja-jp/guides/application-publishing/launch-your-webapp-quickly/web-app-settings", - "ja-jp/guides/application-publishing/launch-your-webapp-quickly/text-generator", - "ja-jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application" - ] - }, - "ja-jp/guides/application-publishing/publish-mcp", - "ja-jp/guides/application-publishing/embedding-in-websites", - "ja-jp/guides/application-publishing/developing-with-apis", - "ja-jp/guides/application-publishing/based-on-frontend-templates" - ] - }, - { - "group": "アノテーション", - "pages": [ - "ja-jp/guides/annotation/logs", - "ja-jp/guides/annotation/annotation-reply" + "ja-jp/documentation/pages/publish/README", + "ja-jp/documentation/pages/publish/workflow-webapp", + "ja-jp/documentation/pages/publish/chatflow-webapp", + "ja-jp/documentation/pages/publish/web-app-settings", + "ja-jp/documentation/pages/publish/publish-mcp", + "ja-jp/documentation/pages/publish/embedding-in-websites", + "ja-jp/documentation/pages/publish/developing-with-apis" ] }, { "group": "モニタリング", "pages": [ - "ja-jp/guides/monitoring/analysis", + "ja-jp/documentation/pages/monitor/analysis", + "ja-jp/documentation/pages/monitor/logs", + "ja-jp/documentation/pages/monitor/annotation-reply", + "ja-jp/documentation/pages/monitor/integrate-arize", + "ja-jp/documentation/pages/monitor/integrate-phoenix", + "ja-jp/documentation/pages/monitor/integrate-langsmith", + "ja-jp/documentation/pages/monitor/integrate-langfuse", + "ja-jp/documentation/pages/monitor/integrate-opik", + "ja-jp/documentation/pages/monitor/integrate-weave" + ] + }, + { + "group": "ナレッジベース", + "pages": [ + "ja-jp/documentation/pages/knowledge/readme", { - "group": "外部Opsツール統合", + "group": "Create Knowledge", "pages": [ - "ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-arize", - "ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-phoenix", - "ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse", - "ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith", - "ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-opik", - "ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-weave" - ] - } - ] - }, - { - "group": "拡張", - "pages": [ - { - "group": "API 拡張", - "pages": [ - "ja-jp/guides/extension/api-based-extension/README", - "ja-jp/guides/extension/api-based-extension/cloudflare-workers", - "ja-jp/guides/extension/api-based-extension/moderation" - ] - }, - { - "group": "コード拡張", - "pages": [ - "ja-jp/guides/extension/code-based-extension/README", - "ja-jp/guides/extension/code-based-extension/external-data-tool", - "ja-jp/guides/extension/code-based-extension/moderation" - ] - } - ] - }, - { - "group": "ツール", - "pages": [ - "ja-jp/guides/tools/types-of-tools", - "ja-jp/guides/tools/mcp" - ] - }, - { - "group": "コラボレーション", - "pages": [ - "ja-jp/guides/workspace/readme", - "ja-jp/guides/workspace/app", - "ja-jp/guides/workspace/invite-and-manage-members" - ] - }, - { - "group": "管理", - "pages": [ - "ja-jp/guides/management/app-management", - "ja-jp/guides/management/team-members-management", - "ja-jp/guides/management/personal-account-management", - "ja-jp/guides/management/subscription-management", - "ja-jp/guides/management/version-control" - ] - } - ] - }, - { - "group": "ハンドオン工房", - "pages": [ - { - "group": "初級編", - "pages": [ - "ja-jp/workshop/basic/README", - "ja-jp/workshop/basic/build-ai-image-generation-app", - "ja-jp/workshop/basic/travel-assistant", - "ja-jp/workshop/basic/the-right-way-of-markdown" - ] - }, - { - "group": "中級編", - "pages": [ - "ja-jp/workshop/intermediate/article-reader", - "ja-jp/workshop/intermediate/twitter-chatflow" - ] - } - ] - }, - { - "group": "コミュニティ", - "pages": [ - "ja-jp/community/support", - "ja-jp/community/contribution", - "ja-jp/community/docs-contribution" - ] - }, - { - "group": "プラグイン", - "pages": [ - "ja-jp/plugins/introduction", - { - "group": "クイックスタート", - "pages": [ - "ja-jp/plugins/quick-start/README", - "ja-jp/plugins/quick-start/install-plugins", - { - "group": "プラグイン開発の入門", - "pages": [ - "ja-jp/plugins/quick-start/develop-plugins/README", - "ja-jp/plugins/quick-start/develop-plugins/initialize-development-tools", - "ja-jp/plugins/quick-start/develop-plugins/tool-plugin", + "ja-jp/documentation/pages/knowledge/create-knowledge/introduction", { - "group": "モデル型プラグイン", + "group": "1. Import Text Data", "pages": [ - "ja-jp/plugins/quick-start/develop-plugins/model-plugin/README", - "ja-jp/plugins/quick-start/develop-plugins/model-plugin/create-model-providers", - "ja-jp/plugins/quick-start/develop-plugins/model-plugin/integrate-the-predefined-model", - "ja-jp/plugins/quick-start/develop-plugins/model-plugin/customizable-model" + "ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/readme", + "ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion", + "ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website" ] }, - "ja-jp/plugins/quick-start/develop-plugins/agent-strategy-plugin", - "ja-jp/plugins/quick-start/develop-plugins/extension-plugin", - "ja-jp/plugins/quick-start/develop-plugins/bundle" + "ja-jp/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text", + "ja-jp/documentation/pages/knowledge/create-knowledge/setting-indexing-methods" ] }, - "ja-jp/plugins/quick-start/debug-plugin" - ] - }, - "ja-jp/plugins/manage-plugins", - { - "group": "スキーマ仕様", - "pages": [ - "ja-jp/plugins/schema-definition/README", - "ja-jp/plugins/schema-definition/manifest", - "ja-jp/plugins/schema-definition/endpoint", - "ja-jp/plugins/schema-definition/tool", - "ja-jp/plugins/schema-definition/agent", { - "group": "Model", + "group": "Manage Knowledge", "pages": [ - "ja-jp/plugins/schema-definition/model/README", - "ja-jp/plugins/schema-definition/model/model-designing-rules", - "ja-jp/plugins/schema-definition/model/model-schema" + "ja-jp/documentation/pages/knowledge/manage-knowledge/introduction", + "ja-jp/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents", + "ja-jp/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api" ] }, - "ja-jp/plugins/schema-definition/general-specifications", - "ja-jp/plugins/schema-definition/persistent-storage", - { - "group": "Difyサービスの逆呼び出し", - "pages": [ - "ja-jp/plugins/schema-definition/reverse-invocation-of-the-dify-service/README", - "ja-jp/plugins/schema-definition/reverse-invocation-of-the-dify-service/app", - "ja-jp/plugins/schema-definition/reverse-invocation-of-the-dify-service/model", - "ja-jp/plugins/schema-definition/reverse-invocation-of-the-dify-service/tool", - "ja-jp/plugins/schema-definition/reverse-invocation-of-the-dify-service/node" - ] - } + "ja-jp/documentation/pages/knowledge/metadata", + "ja-jp/documentation/pages/knowledge/integrate-knowledge-within-application", + "ja-jp/documentation/pages/knowledge/retrieval-test-and-citation", + "ja-jp/documentation/pages/knowledge/knowledge-request-rate-limit", + "ja-jp/documentation/pages/knowledge/connect-external-knowledge-base", + "ja-jp/documentation/pages/knowledge/external-knowledge-api" ] }, { - "group": "ベストプラクティス", + "group": "ワークスペース", "pages": [ - "ja-jp/plugins/best-practice/README", - "ja-jp/plugins/best-practice/develop-a-slack-bot-plugin", - "ja-jp/plugins/best-practice/how-to-use-mcp-zapier", - "ja-jp/plugins/best-practice/how-to-print-strings-to-logs-for-debugging" + "ja-jp/documentation/pages/workspace/app", + "ja-jp/documentation/pages/workspace/app-management", + "ja-jp/documentation/pages/workspace/readme", + "ja-jp/documentation/pages/workspace/team-members-management", + "ja-jp/documentation/pages/workspace/personal-account-management", + "ja-jp/documentation/pages/workspace/subscription-management" ] }, { - "group": "プラグインの公開", + "group": "チュートリアル", "pages": [ - "ja-jp/plugins/publish-plugins/README", - "ja-jp/plugins/publish-plugins/plugin-auto-publish-pr", - { - "group": "Difyマーケットプレイスへの公開", - "pages": [ - "ja-jp/plugins/publish-plugins/publish-to-dify-marketplace/README", - "ja-jp/plugins/publish-plugins/publish-to-dify-marketplace/plugin-developer-guidelines", - "ja-jp/plugins/publish-plugins/publish-to-dify-marketplace/plugin-privacy-protection-guidelines" - ] - }, - "ja-jp/plugins/publish-plugins/publish-plugin-on-personal-github-repo", - "ja-jp/plugins/publish-plugins/package-plugin-file-and-publish", - "ja-jp/plugins/publish-plugins/signing-plugins-for-third-party-signature-verification" - ] - }, - "ja-jp/plugins/faq" - ] - }, - { - "group": "開発", - "pages": [ - { - "group": "バックエンド", - "pages": [ - "ja-jp/development/backend/sandbox/README", - "ja-jp/development/backend/sandbox/contribution" - ] - }, - { - "group": "モデルの統合", - "pages": [ - "ja-jp/development/models-integration/hugging-face", - "ja-jp/development/models-integration/replicate", - "ja-jp/development/models-integration/xinference", - "ja-jp/development/models-integration/openllm", - "ja-jp/development/models-integration/localai", - "ja-jp/development/models-integration/ollama", - "ja-jp/development/models-integration/litellm", - "ja-jp/development/models-integration/gpustack", - "ja-jp/development/models-integration/aws-bedrock-deepseek" - ] - }, - { - "group": "移行", - "pages": [ - "ja-jp/development/migration/migrate-to-v1" - ] - } - ] - }, - { - "group": "もっと読む", - "pages": [ - { - "group": "活用事例", - "pages": [ - "ja-jp/learn-more/use-cases/integrate-deepseek-to-build-an-ai-app", - "ja-jp/learn-more/use-cases/private-ai-ollama-deepseek-dify", - "ja-jp/learn-more/use-cases/create-a-midjoureny-prompt-word-robot-with-zero-code", - "ja-jp/learn-more/use-cases/build-an-notion-ai-assistant", - "ja-jp/learn-more/use-cases/create-an-ai-chatbot-with-business-data-in-minutes", - "ja-jp/learn-more/use-cases/how-to-integrate-dify-chatbot-to-your-wix-website", - "ja-jp/learn-more/use-cases/how-to-connect-aws-bedrock", - "ja-jp/learn-more/use-cases/dify-model-arena", - "ja-jp/learn-more/use-cases/dify-schedule", - "ja-jp/learn-more/use-cases/building-an-ai-thesis-slack-bot", - "ja-jp/learn-more/use-cases/build-ai-sales-avatar" - ] - }, - { - "group": "さらに読む", - "pages": [ - "ja-jp/learn-more/extended-reading/what-is-llmops", - "ja-jp/learn-more/extended-reading/what-is-array-variable", - { - "group": "検索拡張生成(RAG)", - "pages": [ - "ja-jp/learn-more/extended-reading/retrieval-augment/README", - "ja-jp/learn-more/extended-reading/retrieval-augment/hybrid-search", - "ja-jp/learn-more/extended-reading/retrieval-augment/rerank", - "ja-jp/learn-more/extended-reading/retrieval-augment/retrieval" - ] - }, - "ja-jp/learn-more/extended-reading/how-to-use-json-schema-in-dify", - "ja-jp/learn-more/extended-reading/dify-docs-mcp" - ] - }, - { - "group": "よくある質問", - "pages": [ - "ja-jp/learn-more/faq/install-faq", - "ja-jp/learn-more/faq/llms-use-faq", - "ja-jp/learn-more/faq/plugins" - ] - } - ] - }, - { - "group": "ポリシー", - "pages": [ - "ja-jp/policies/open-source", - { - "group": "ユーザ規約", - "pages": [ - "ja-jp/policies/agreement/README", - "ja-jp/policies/agreement/tos", - "ja-jp/policies/agreement/privacy", - "ja-jp/policies/agreement/get-compliance-report" + "ja-jp/documentation/pages/tutorials/build-ai-image-generation-app", + "ja-jp/documentation/pages/tutorials/article-reader", + "ja-jp/documentation/pages/tutorials/customer-service-bot", + "ja-jp/documentation/pages/tutorials/twitter-chatflow" ] } ] @@ -2642,7 +1968,7 @@ "label": "Studio", "href": "https://cloud.dify.ai" } - }, + }, "integrations": { "ga4": { "measurementId": "G-HHGQ6GKNCE" diff --git a/en/documentation/pages/getting-started/faq.md b/en/documentation/pages/getting-started/faq.md new file mode 100644 index 00000000..a9f504a5 --- /dev/null +++ b/en/documentation/pages/getting-started/faq.md @@ -0,0 +1,112 @@ +# Frequently Asked Questions + +Welcome to the Dify FAQ section. Here you'll find answers to the most commonly asked questions about using Dify. + +## Getting Started + +### What is Dify? + +Dify is an open-source platform for building AI applications. It provides a comprehensive set of tools and features to help you build, deploy, and manage your AI applications without extensive coding knowledge. + +### How do I get started with Dify? + +To get started with Dify: + +1. **Sign up** for a Dify account at [dify.ai](https://dify.ai) +2. **Create your first application** using our intuitive interface +3. **Configure your AI model** by connecting to providers like OpenAI, Anthropic, or others +4. **Test and iterate** on your application +5. **Deploy** your AI application to production + +### What types of applications can I build with Dify? + +You can build various types of AI applications with Dify: + +- **Chatbots** for customer service +- **Knowledge base assistants** that can answer questions about your documents +- **Workflow automation tools** that process data intelligently +- **Content generation tools** for marketing and writing +- **AI agents** that can perform complex tasks + +## Technical Questions + +### What AI models does Dify support? + +Dify supports a wide range of AI models including: + +- **OpenAI models**: GPT-4, GPT-3.5, and others +- **Anthropic models**: Claude 3 and Claude 2 +- **Open source models**: Through providers like Hugging Face, Ollama +- **Local models**: You can host your own models + +### How does Dify handle my data? + +Data security and privacy are our top priorities: + +- **Your data remains yours** - we don't train on your private data +- **Encryption in transit** and at rest +- **SOC2 compliance** for enterprise customers +- **GDPR compliance** for European users + +### Can I use Dify for commercial purposes? + +Yes! Dify offers both: + +- **Open source version** with Apache 2.0 license for self-hosting +- **Cloud version** with commercial plans for managed hosting +- **Enterprise plans** with advanced features and support + +## Troubleshooting + +### My AI application is giving incorrect responses + +Try these troubleshooting steps: + +1. **Review your prompt** - Make sure it's clear and specific +2. **Check your knowledge base** - Ensure relevant documents are uploaded +3. **Adjust model parameters** - Try different temperature or top-k settings +4. **Test with different models** - Some models work better for specific tasks + +### I'm experiencing slow response times + +To improve response times: + +1. **Check your model configuration** - Some models are faster than others +2. **Optimize your knowledge base** - Remove unnecessary documents +3. **Use caching** - Enable response caching for frequently asked questions +4. **Consider upgrading** your plan for better performance + +### How do I get support? + +You can get support through: + +- **Community forum** - Connect with other Dify users +- **Documentation** - Comprehensive guides and tutorials +- **GitHub issues** - For bug reports and feature requests +- **Email support** - For paid plan customers +- **Enterprise support** - Dedicated support for enterprise customers + +## Billing and Plans + +### What are the different pricing plans? + +Dify offers several plans: + +- **Free tier** - Perfect for getting started and small projects +- **Pro plans** - For growing businesses with higher usage needs +- **Enterprise plans** - Custom solutions for large organizations + +### How is usage calculated? + +Usage is typically calculated based on: + +- **API calls** to AI models +- **Storage** for documents and data +- **Active users** on your applications +- **Custom features** depending on your plan + +For detailed pricing information, visit our [pricing page](https://dify.ai/pricing). + +--- + +Need more help? Contact our support team or check out our [comprehensive documentation](../../../guides/). \ No newline at end of file diff --git a/en/documentation/pages/getting-started/faq.mdx b/en/documentation/pages/getting-started/faq.mdx new file mode 100644 index 00000000..757868cf --- /dev/null +++ b/en/documentation/pages/getting-started/faq.mdx @@ -0,0 +1,126 @@ +--- +title: "Frequently Asked Questions" +description: "Common questions and answers about using Dify" +icon: "circle-question" +--- + +Welcome to the Dify FAQ section. Here you'll find answers to the most commonly asked questions about using Dify. + +## Getting Started + + + + Dify is an open-source platform for building AI applications. It provides a comprehensive set of tools and features to help you build, deploy, and manage your AI applications without extensive coding knowledge. + + + + To get started with Dify: + + 1. **Sign up** for a Dify account at [dify.ai](https://dify.ai) + 2. **Create your first application** using our intuitive interface + 3. **Configure your AI model** by connecting to providers like OpenAI, Anthropic, or others + 4. **Test and iterate** on your application + 5. **Deploy** your AI application to production + + + + You can build various types of AI applications with Dify: + + - **Chatbots** for customer service + - **Knowledge base assistants** that can answer questions about your documents + - **Workflow automation tools** that process data intelligently + - **Content generation tools** for marketing and writing + - **AI agents** that can perform complex tasks + + + +## Technical Questions + + + + Dify supports a wide range of AI models including: + + - **OpenAI models**: GPT-4, GPT-3.5, and others + - **Anthropic models**: Claude 3 and Claude 2 + - **Open source models**: Through providers like Hugging Face, Ollama + - **Local models**: You can host your own models + + + + Data security and privacy are our top priorities: + + - **Your data remains yours** - we don't train on your private data + - **Encryption in transit** and at rest + - **SOC2 compliance** for enterprise customers + - **GDPR compliance** for European users + + + + Yes! Dify offers both: + + - **Open source version** with Apache 2.0 license for self-hosting + - **Cloud version** with commercial plans for managed hosting + - **Enterprise plans** with advanced features and support + + + +## Troubleshooting + + + + Try these troubleshooting steps: + + 1. **Review your prompt** - Make sure it's clear and specific + 2. **Check your knowledge base** - Ensure relevant documents are uploaded + 3. **Adjust model parameters** - Try different temperature or top-k settings + 4. **Test with different models** - Some models work better for specific tasks + + + + To improve response times: + + 1. **Check your model configuration** - Some models are faster than others + 2. **Optimize your knowledge base** - Remove unnecessary documents + 3. **Use caching** - Enable response caching for frequently asked questions + 4. **Consider upgrading** your plan for better performance + + + + You can get support through: + + - **Community forum** - Connect with other Dify users + - **Documentation** - Comprehensive guides and tutorials + - **GitHub issues** - For bug reports and feature requests + - **Email support** - For paid plan customers + - **Enterprise support** - Dedicated support for enterprise customers + + + +## Billing and Plans + + + + Dify offers several plans: + + - **Free tier** - Perfect for getting started and small projects + - **Pro plans** - For growing businesses with higher usage needs + - **Enterprise plans** - Custom solutions for large organizations + + + + Usage is typically calculated based on: + + - **API calls** to AI models + - **Storage** for documents and data + - **Active users** on your applications + - **Custom features** depending on your plan + + For detailed pricing information, visit our [pricing page](https://dify.ai/pricing). + + + +--- + + + Need more help? Contact our support team or check out our [comprehensive documentation](../../../guides/). + \ No newline at end of file diff --git a/ja-jp/guides/tools/mcp.mdx b/ja-jp/documentation/pages/build/mcp.mdx similarity index 100% rename from ja-jp/guides/tools/mcp.mdx rename to ja-jp/documentation/pages/build/mcp.mdx diff --git a/ja-jp/documentation/pages/build/orchestrate-node.mdx b/ja-jp/documentation/pages/build/orchestrate-node.mdx new file mode 100644 index 00000000..bf75688c --- /dev/null +++ b/ja-jp/documentation/pages/build/orchestrate-node.mdx @@ -0,0 +1,36 @@ +> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](../../../../en/documentation/pages/build/orchestrate-node.mdx)を参照してください。 + +--- +title: "フローロジック" +icon: "diagram-project" +--- + +ノードは、接続方法によって実行方法が異なります。 + +![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/3984e13db72e2bd19870f5764ec000cf.jpeg) + +## 直列実行 + +ノードを次々に接続すると、それらは順番に実行されます。各ノードは、前のノードの実行が完了するのを待ってから開始します。 + +![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/e8e884e146994b5f95cb16ec31cdd81b.png) + +各ノードは、チェーン内でそれより前に実行された任意のノードの変数を使用できます。 + +## 並列実行 + +複数のノードを同じ開始ノードに接続すると、それらはすべて同時に実行されます。 + +![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/5ba85864454880561ec95a37db382f20.png) + + +1つのノードから最大10個の並列ブランチを持つことができ、ネストされた並列構造は最大3レベルまでです。 + + +## 変数アクセス + +直列フローでは、ノードはチェーン内の先行する任意のノードの変数にアクセスできます。 + +並列フローでは、ノードは並列分割の前に実行されたノードの変数にアクセスできますが、他の並列ノードは同時に実行されているため、それらの変数にはアクセスできません。 + +並列ブランチの実行が完了した後、下流のノードはすべての並列出力からの変数にアクセスできます。 \ No newline at end of file diff --git a/ja-jp/guides/workflow/shortcut-key.mdx b/ja-jp/documentation/pages/build/shortcut-key.mdx similarity index 100% rename from ja-jp/guides/workflow/shortcut-key.mdx rename to ja-jp/documentation/pages/build/shortcut-key.mdx diff --git a/ja-jp/guides/management/version-control.mdx b/ja-jp/documentation/pages/build/version-control.mdx similarity index 100% rename from ja-jp/guides/management/version-control.mdx rename to ja-jp/documentation/pages/build/version-control.mdx diff --git a/ja-jp/documentation/pages/debug/error-type.mdx b/ja-jp/documentation/pages/debug/error-type.mdx new file mode 100644 index 00000000..0c57fb2f --- /dev/null +++ b/ja-jp/documentation/pages/debug/error-type.mdx @@ -0,0 +1,108 @@ +> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](../../../../en/documentation/pages/debug/error-type.mdx)を参照してください。 + +--- +title: エラータイプ +icon: "circle-xmark" +--- + +各ノードタイプは、問題の原因と解決策を理解するのに役立つ特定のエラークラスをスローします。 + +## ノード固有のエラー + + + + +`CodeNodeError` +PythonまたはJavaScriptコードの実行中に例外がスローされました + +![Code Error](https://assets-docs.dify.ai/2024/12/c86b11af7f92368180ea1bac38d77083.png) + +`OutputValidationError` +コードが返したデータ型が、設定した出力変数の型と一致しません + +`DepthLimitError` +コードが5階層より深いネストされたデータ構造を作成しました + +`CodeExecutionError` +サンドボックスサービスがコードを実行できませんでした - 通常、サービスがダウンしていることを意味します + +![](https://assets-docs.dify.ai/2024/12/ab8cae01a590b037017dfe9ea4dbbb8b.png) + + + + +`VariableNotFoundError` +プロンプトテンプレートが、ワークフローのコンテキストに存在しない変数を参照しています + +![](https://assets-docs.dify.ai/2024/12/f20c5fbde345144de6183374ab277662.png) + +`InvalidContextStructureError` +文字列のみを受け付けるコンテキストフィールドに配列またはオブジェクトを渡しました + +`NoPromptFoundError` +プロンプトフィールドが完全に空です + +`ModelNotExistError` +LLMノードの設定でモデルが選択されていません + +`LLMModeRequiredError` +選択されたモデルに有効なAPI認証情報が設定されていません + +`InvalidVariableTypeError` +プロンプトテンプレートが有効なJinja2構文またはプレーンテキスト形式ではありません + +![](https://assets-docs.dify.ai/2024/12/9882f7a5ee544508ba11b51fb469a911.png) + + + + +`AuthorizationConfigError` +APIエンドポイントの認証設定が欠落しているか、無効です + +`InvalidHttpMethodError` +HTTPメソッドはGET、HEAD、POST、PUT、PATCH、またはDELETEである必要があります + +`ResponseSizeError` +APIレスポンスが10MBのサイズ制限を超えました + +`FileFetchError` +リクエストで参照されているファイル変数を取得できませんでした + +`InvalidURLError` +URLの形式が不正であるか、到達できません + + + + +`ToolParameterError` +ツールに渡されたパラメータが、期待されるスキーマと一致しません + +`ToolFileError` +ツールが必要なファイルにアクセスできませんでした + +`ToolInvokeError` +外部ツールAPIが実行中にエラーを返しました + +

+ +

+ +`ToolProviderNotFoundError` +ツールプロバイダーが正しくインストールまたは設定されていません + +
+
+ +## システムレベルのエラー + +`InvokeConnectionError` +外部サービスへのネットワーク接続に失敗しました + +`InvokeServerUnavailableError` +外部サービスが503ステータスを返したか、一時的にダウンしています + +`InvokeRateLimitError` +APIまたはモデルプロバイダーのレート制限に達しました + +`QuotaExceededError` +このサービスの利用クォータを超えました \ No newline at end of file diff --git a/ja-jp/guides/workflow/debug-and-preview/history-and-logs.mdx b/ja-jp/documentation/pages/debug/history-and-logs.mdx similarity index 100% rename from ja-jp/guides/workflow/debug-and-preview/history-and-logs.mdx rename to ja-jp/documentation/pages/debug/history-and-logs.mdx diff --git a/ja-jp/guides/workflow/debug-and-preview/step-run.mdx b/ja-jp/documentation/pages/debug/step-run.mdx similarity index 100% rename from ja-jp/guides/workflow/debug-and-preview/step-run.mdx rename to ja-jp/documentation/pages/debug/step-run.mdx diff --git a/ja-jp/guides/workflow/debug-and-preview/variable-inspect.mdx b/ja-jp/documentation/pages/debug/variable-inspect.mdx similarity index 100% rename from ja-jp/guides/workflow/debug-and-preview/variable-inspect.mdx rename to ja-jp/documentation/pages/debug/variable-inspect.mdx diff --git a/ja-jp/documentation/pages/getting-started/faq.mdx b/ja-jp/documentation/pages/getting-started/faq.mdx new file mode 100644 index 00000000..1f13b580 --- /dev/null +++ b/ja-jp/documentation/pages/getting-started/faq.mdx @@ -0,0 +1,128 @@ +> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](../../../../en/documentation/pages/getting-started/faq.mdx)を参照してください。 + +--- +title: "よくある質問" +description: "Difyの使用に関する一般的な質問と回答" +icon: "circle-question" +--- + +Difyのよくある質問セクションへようこそ。ここでは、Difyの使用に関する最も一般的な質問への回答を見つけることができます。 + +## はじめに + + + + Difyは、AIアプリケーションを構築するためのオープンソースプラットフォームです。広範なコーディング知識がなくても、AIアプリケーションの構築、デプロイ、管理を支援する包括的なツールと機能のセットを提供します。 + + + + Difyを始めるには: + + 1. [dify.ai](https://dify.ai)でDifyアカウントに**サインアップ**します + 2. 直感的なインターフェースを使用して**最初のアプリケーションを作成**します + 3. OpenAI、Anthropicなどのプロバイダーに接続してAIモデルを**設定**します + 4. アプリケーションを**テストして改善**します + 5. AIアプリケーションを本番環境に**デプロイ**します + + + + Difyを使用して、さまざまなタイプのAIアプリケーションを構築できます: + + - カスタマーサービス用の**チャットボット** + - ドキュメントに関する質問に答えることができる**ナレッジベース**アシスタント + - データをインテリジェントに処理する**ワークフロー**自動化ツール + - マーケティングやライティング用の**コンテンツ生成ツール** + - 複雑なタスクを実行できる**AIエージェント** + + + +## 技術的な質問 + + + + Difyは以下を含む幅広いAIモデルをサポートしています: + + - **OpenAIモデル**:GPT-4、GPT-3.5など + - **Anthropicモデル**:Claude 3とClaude 2 + - **オープンソースモデル**:Hugging Face、Ollamaなどのプロバイダー経由 + - **ローカルモデル**:独自のモデルをホストできます + + + + データのセキュリティとプライバシーは私たちの最優先事項です: + + - **あなたのデータはあなたのものです** - 私たちはあなたのプライベートデータでトレーニングを行いません + - **転送中および保存時**の暗号化 + - エンタープライズ顧客向けの**SOC2コンプライアンス** + - ヨーロッパのユーザー向けの**GDPRコンプライアンス** + + + + はい!Difyは以下の両方を提供しています: + + - セルフホスティング用のApache 2.0ライセンス付き**オープンソース版** + - マネージドホスティング用の商用プラン付き**クラウド版** + - 高度な機能とサポートを備えた**エンタープライズプラン** + + + +## トラブルシューティング + + + + 以下のトラブルシューティング手順を試してください: + + 1. **プロンプトを確認する** - 明確かつ具体的であることを確認してください + 2. **ナレッジベースを確認する** - 関連ドキュメントがアップロードされていることを確認してください + 3. **モデルパラメータを調整する** - 異なる温度(temperature)やtop-k設定を試してください + 4. **異なるモデルでテストする** - 特定のタスクには、より適したモデルがあります + + + + 応答時間を改善するには: + + 1. **モデル設定を確認する** - モデルによっては他のモデルよりも高速なものがあります + 2. **ナレッジベースを最適化する** - 不要なドキュメントを削除してください + 3. **キャッシュを使用する** - よくある質問に対して応答キャッシュを有効にします + 4. パフォーマンス向上のためにプランの**アップグレードを検討**してください + + + + 以下の方法でサポートを受けることができます: + + - **コミュニティフォーラム** - 他のDifyユーザーと繋がります + - **ドキュメンテーション** - 包括的なガイドとチュートリアル + - **GitHubイシュー** - バグレポートや機能リクエスト用 + - **メールサポート** - 有料プランのお客様向け + - **エンタープライズサポート** - エンタープライズ顧客向けの専用サポート + + + +## 請求とプラン + + + + Difyはいくつかのプランを提供しています: + + - **無料ティア** - 入門や小規模プロジェクトに最適です + - **プロプラン** - 利用量の多い成長中のビジネス向け + - **エンタープライズプラン** - 大規模組織向けのカスタムソリューション + + + + 利用量は通常、以下に基づいて計算されます: + + - AIモデルへの**API呼び出し** + - ドキュメントとデータの**ストレージ** + - アプリケーションの**アクティブユーザー** + - プランに応じた**カスタム機能** + + 料金の詳細については、[料金ページ](https://dify.ai/pricing)をご覧ください。 + + + +--- + + + さらにサポートが必要ですか?サポートチームにお問い合わせいただくか、[包括的なドキュメンテーション](../../../guides/)をご覧ください。 + \ No newline at end of file diff --git a/ja-jp/introduction.mdx b/ja-jp/documentation/pages/getting-started/introduction.mdx similarity index 100% rename from ja-jp/introduction.mdx rename to ja-jp/documentation/pages/getting-started/introduction.mdx diff --git a/ja-jp/guides/knowledge-base/connect-external-knowledge-base.mdx b/ja-jp/documentation/pages/knowledge/connect-external-knowledge-base.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/connect-external-knowledge-base.mdx rename to ja-jp/documentation/pages/knowledge/connect-external-knowledge-base.mdx diff --git a/ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text.mdx b/ja-jp/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text.mdx rename to ja-jp/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text.mdx diff --git a/ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/readme.mdx b/ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/readme.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/readme.mdx rename to ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/readme.mdx diff --git a/ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.mdx b/ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.mdx rename to ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion.mdx diff --git a/ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website.mdx b/ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website.mdx rename to ja-jp/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website.mdx diff --git a/ja-jp/guides/knowledge-base/knowledge-base-creation/introduction.mdx b/ja-jp/documentation/pages/knowledge/create-knowledge/introduction.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/knowledge-base-creation/introduction.mdx rename to ja-jp/documentation/pages/knowledge/create-knowledge/introduction.mdx diff --git a/ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods.mdx b/ja-jp/documentation/pages/knowledge/create-knowledge/setting-indexing-methods.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods.mdx rename to ja-jp/documentation/pages/knowledge/create-knowledge/setting-indexing-methods.mdx diff --git a/ja-jp/guides/knowledge-base/integrate-knowledge-within-application.mdx b/ja-jp/documentation/pages/knowledge/integrate-knowledge-within-application.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/integrate-knowledge-within-application.mdx rename to ja-jp/documentation/pages/knowledge/integrate-knowledge-within-application.mdx diff --git a/ja-jp/guides/knowledge-base/knowledge-request-rate-limit.mdx b/ja-jp/documentation/pages/knowledge/knowledge-request-rate-limit.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/knowledge-request-rate-limit.mdx rename to ja-jp/documentation/pages/knowledge/knowledge-request-rate-limit.mdx diff --git a/ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.mdx b/ja-jp/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.mdx rename to ja-jp/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api.mdx diff --git a/ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents.mdx b/ja-jp/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents.mdx rename to ja-jp/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents.mdx diff --git a/ja-jp/guides/knowledge-base/metadata.mdx b/ja-jp/documentation/pages/knowledge/metadata.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/metadata.mdx rename to ja-jp/documentation/pages/knowledge/metadata.mdx diff --git a/ja-jp/guides/knowledge-base/readme.mdx b/ja-jp/documentation/pages/knowledge/readme.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/readme.mdx rename to ja-jp/documentation/pages/knowledge/readme.mdx diff --git a/ja-jp/guides/knowledge-base/retrieval-test-and-citation.mdx b/ja-jp/documentation/pages/knowledge/retrieval-test-and-citation.mdx similarity index 100% rename from ja-jp/guides/knowledge-base/retrieval-test-and-citation.mdx rename to ja-jp/documentation/pages/knowledge/retrieval-test-and-citation.mdx diff --git a/ja-jp/guides/monitoring/analysis.mdx b/ja-jp/documentation/pages/monitor/analysis.mdx similarity index 100% rename from ja-jp/guides/monitoring/analysis.mdx rename to ja-jp/documentation/pages/monitor/analysis.mdx diff --git a/ja-jp/guides/annotation/annotation-reply.mdx b/ja-jp/documentation/pages/monitor/annotation-reply.mdx similarity index 100% rename from ja-jp/guides/annotation/annotation-reply.mdx rename to ja-jp/documentation/pages/monitor/annotation-reply.mdx diff --git a/ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-arize.mdx b/ja-jp/documentation/pages/monitor/integrate-arize.mdx similarity index 100% rename from ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-arize.mdx rename to ja-jp/documentation/pages/monitor/integrate-arize.mdx diff --git a/ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.mdx b/ja-jp/documentation/pages/monitor/integrate-langfuse.mdx similarity index 100% rename from ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.mdx rename to ja-jp/documentation/pages/monitor/integrate-langfuse.mdx diff --git a/ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.mdx b/ja-jp/documentation/pages/monitor/integrate-langsmith.mdx similarity index 100% rename from ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.mdx rename to ja-jp/documentation/pages/monitor/integrate-langsmith.mdx diff --git a/ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-opik.mdx b/ja-jp/documentation/pages/monitor/integrate-opik.mdx similarity index 100% rename from ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-opik.mdx rename to ja-jp/documentation/pages/monitor/integrate-opik.mdx diff --git a/ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-phoenix.mdx b/ja-jp/documentation/pages/monitor/integrate-phoenix.mdx similarity index 100% rename from ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-phoenix.mdx rename to ja-jp/documentation/pages/monitor/integrate-phoenix.mdx diff --git a/ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-weave.mdx b/ja-jp/documentation/pages/monitor/integrate-weave.mdx similarity index 100% rename from ja-jp/guides/monitoring/integrate-external-ops-tools/integrate-weave.mdx rename to ja-jp/documentation/pages/monitor/integrate-weave.mdx diff --git a/ja-jp/guides/annotation/logs.mdx b/ja-jp/documentation/pages/monitor/logs.mdx similarity index 100% rename from ja-jp/guides/annotation/logs.mdx rename to ja-jp/documentation/pages/monitor/logs.mdx diff --git a/ja-jp/guides/workflow/node/agent.mdx b/ja-jp/documentation/pages/nodes/agent.mdx similarity index 100% rename from ja-jp/guides/workflow/node/agent.mdx rename to ja-jp/documentation/pages/nodes/agent.mdx diff --git a/ja-jp/guides/workflow/node/answer.mdx b/ja-jp/documentation/pages/nodes/answer.mdx similarity index 100% rename from ja-jp/guides/workflow/node/answer.mdx rename to ja-jp/documentation/pages/nodes/answer.mdx diff --git a/ja-jp/guides/workflow/node/code.mdx b/ja-jp/documentation/pages/nodes/code.mdx similarity index 100% rename from ja-jp/guides/workflow/node/code.mdx rename to ja-jp/documentation/pages/nodes/code.mdx diff --git a/ja-jp/guides/workflow/node/doc-extractor.mdx b/ja-jp/documentation/pages/nodes/doc-extractor.mdx similarity index 100% rename from ja-jp/guides/workflow/node/doc-extractor.mdx rename to ja-jp/documentation/pages/nodes/doc-extractor.mdx diff --git a/ja-jp/guides/workflow/node/end.mdx b/ja-jp/documentation/pages/nodes/end.mdx similarity index 100% rename from ja-jp/guides/workflow/node/end.mdx rename to ja-jp/documentation/pages/nodes/end.mdx diff --git a/ja-jp/guides/workflow/node/http-request.mdx b/ja-jp/documentation/pages/nodes/http-request.mdx similarity index 100% rename from ja-jp/guides/workflow/node/http-request.mdx rename to ja-jp/documentation/pages/nodes/http-request.mdx diff --git a/ja-jp/guides/workflow/node/ifelse.mdx b/ja-jp/documentation/pages/nodes/ifelse.mdx similarity index 100% rename from ja-jp/guides/workflow/node/ifelse.mdx rename to ja-jp/documentation/pages/nodes/ifelse.mdx diff --git a/ja-jp/guides/workflow/node/iteration.mdx b/ja-jp/documentation/pages/nodes/iteration.mdx similarity index 100% rename from ja-jp/guides/workflow/node/iteration.mdx rename to ja-jp/documentation/pages/nodes/iteration.mdx diff --git a/ja-jp/guides/workflow/node/knowledge-retrieval.mdx b/ja-jp/documentation/pages/nodes/knowledge-retrieval.mdx similarity index 100% rename from ja-jp/guides/workflow/node/knowledge-retrieval.mdx rename to ja-jp/documentation/pages/nodes/knowledge-retrieval.mdx diff --git a/ja-jp/guides/workflow/node/list-operator.mdx b/ja-jp/documentation/pages/nodes/list-operator.mdx similarity index 100% rename from ja-jp/guides/workflow/node/list-operator.mdx rename to ja-jp/documentation/pages/nodes/list-operator.mdx diff --git a/ja-jp/guides/workflow/node/llm.mdx b/ja-jp/documentation/pages/nodes/llm.mdx similarity index 100% rename from ja-jp/guides/workflow/node/llm.mdx rename to ja-jp/documentation/pages/nodes/llm.mdx diff --git a/ja-jp/guides/workflow/node/loop.mdx b/ja-jp/documentation/pages/nodes/loop.mdx similarity index 100% rename from ja-jp/guides/workflow/node/loop.mdx rename to ja-jp/documentation/pages/nodes/loop.mdx diff --git a/ja-jp/guides/workflow/node/parameter-extractor.mdx b/ja-jp/documentation/pages/nodes/parameter-extractor.mdx similarity index 100% rename from ja-jp/guides/workflow/node/parameter-extractor.mdx rename to ja-jp/documentation/pages/nodes/parameter-extractor.mdx diff --git a/ja-jp/guides/workflow/node/question-classifier.mdx b/ja-jp/documentation/pages/nodes/question-classifier.mdx similarity index 100% rename from ja-jp/guides/workflow/node/question-classifier.mdx rename to ja-jp/documentation/pages/nodes/question-classifier.mdx diff --git a/ja-jp/guides/workflow/node/start.mdx b/ja-jp/documentation/pages/nodes/start.mdx similarity index 100% rename from ja-jp/guides/workflow/node/start.mdx rename to ja-jp/documentation/pages/nodes/start.mdx diff --git a/ja-jp/guides/workflow/node/template.mdx b/ja-jp/documentation/pages/nodes/template.mdx similarity index 100% rename from ja-jp/guides/workflow/node/template.mdx rename to ja-jp/documentation/pages/nodes/template.mdx diff --git a/ja-jp/guides/workflow/node/tools.mdx b/ja-jp/documentation/pages/nodes/tools.mdx similarity index 100% rename from ja-jp/guides/workflow/node/tools.mdx rename to ja-jp/documentation/pages/nodes/tools.mdx diff --git a/ja-jp/guides/workflow/node/variable-aggregator.mdx b/ja-jp/documentation/pages/nodes/variable-aggregator.mdx similarity index 100% rename from ja-jp/guides/workflow/node/variable-aggregator.mdx rename to ja-jp/documentation/pages/nodes/variable-aggregator.mdx diff --git a/ja-jp/guides/workflow/node/variable-assigner.mdx b/ja-jp/documentation/pages/nodes/variable-assigner.mdx similarity index 100% rename from ja-jp/guides/workflow/node/variable-assigner.mdx rename to ja-jp/documentation/pages/nodes/variable-assigner.mdx diff --git a/ja-jp/guides/application-publishing/README.mdx b/ja-jp/documentation/pages/publish/README.mdx similarity index 100% rename from ja-jp/guides/application-publishing/README.mdx rename to ja-jp/documentation/pages/publish/README.mdx diff --git a/ja-jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application.mdx b/ja-jp/documentation/pages/publish/chatflow-webapp.mdx similarity index 100% rename from ja-jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application.mdx rename to ja-jp/documentation/pages/publish/chatflow-webapp.mdx diff --git a/ja-jp/guides/application-publishing/developing-with-apis.mdx b/ja-jp/documentation/pages/publish/developing-with-apis.mdx similarity index 100% rename from ja-jp/guides/application-publishing/developing-with-apis.mdx rename to ja-jp/documentation/pages/publish/developing-with-apis.mdx diff --git a/ja-jp/guides/application-publishing/embedding-in-websites.mdx b/ja-jp/documentation/pages/publish/embedding-in-websites.mdx similarity index 100% rename from ja-jp/guides/application-publishing/embedding-in-websites.mdx rename to ja-jp/documentation/pages/publish/embedding-in-websites.mdx diff --git a/ja-jp/guides/application-publishing/publish-mcp.mdx b/ja-jp/documentation/pages/publish/publish-mcp.mdx similarity index 100% rename from ja-jp/guides/application-publishing/publish-mcp.mdx rename to ja-jp/documentation/pages/publish/publish-mcp.mdx diff --git a/ja-jp/guides/application-publishing/launch-your-webapp-quickly/web-app-settings.mdx b/ja-jp/documentation/pages/publish/web-app-settings.mdx similarity index 100% rename from ja-jp/guides/application-publishing/launch-your-webapp-quickly/web-app-settings.mdx rename to ja-jp/documentation/pages/publish/web-app-settings.mdx diff --git a/ja-jp/guides/application-publishing/launch-your-webapp-quickly/text-generator.mdx b/ja-jp/documentation/pages/publish/workflow-webapp.mdx similarity index 100% rename from ja-jp/guides/application-publishing/launch-your-webapp-quickly/text-generator.mdx rename to ja-jp/documentation/pages/publish/workflow-webapp.mdx diff --git a/ja-jp/workshop/intermediate/article-reader.mdx b/ja-jp/documentation/pages/tutorials/article-reader.mdx similarity index 100% rename from ja-jp/workshop/intermediate/article-reader.mdx rename to ja-jp/documentation/pages/tutorials/article-reader.mdx diff --git a/ja-jp/workshop/basic/build-ai-image-generation-app.mdx b/ja-jp/documentation/pages/tutorials/build-ai-image-generation-app.mdx similarity index 100% rename from ja-jp/workshop/basic/build-ai-image-generation-app.mdx rename to ja-jp/documentation/pages/tutorials/build-ai-image-generation-app.mdx diff --git a/ja-jp/workshop/intermediate/twitter-chatflow.mdx b/ja-jp/documentation/pages/tutorials/twitter-chatflow.mdx similarity index 100% rename from ja-jp/workshop/intermediate/twitter-chatflow.mdx rename to ja-jp/documentation/pages/tutorials/twitter-chatflow.mdx diff --git a/ja-jp/guides/management/app-management.mdx b/ja-jp/documentation/pages/workspace/app-management.mdx similarity index 100% rename from ja-jp/guides/management/app-management.mdx rename to ja-jp/documentation/pages/workspace/app-management.mdx diff --git a/ja-jp/guides/workspace/app.mdx b/ja-jp/documentation/pages/workspace/app.mdx similarity index 100% rename from ja-jp/guides/workspace/app.mdx rename to ja-jp/documentation/pages/workspace/app.mdx diff --git a/ja-jp/guides/management/personal-account-management.mdx b/ja-jp/documentation/pages/workspace/personal-account-management.mdx similarity index 100% rename from ja-jp/guides/management/personal-account-management.mdx rename to ja-jp/documentation/pages/workspace/personal-account-management.mdx diff --git a/ja-jp/guides/model-configuration/README.mdx b/ja-jp/documentation/pages/workspace/readme.mdx similarity index 100% rename from ja-jp/guides/model-configuration/README.mdx rename to ja-jp/documentation/pages/workspace/readme.mdx diff --git a/ja-jp/guides/management/subscription-management.mdx b/ja-jp/documentation/pages/workspace/subscription-management.mdx similarity index 100% rename from ja-jp/guides/management/subscription-management.mdx rename to ja-jp/documentation/pages/workspace/subscription-management.mdx diff --git a/ja-jp/guides/management/team-members-management.mdx b/ja-jp/documentation/pages/workspace/team-members-management.mdx similarity index 100% rename from ja-jp/guides/management/team-members-management.mdx rename to ja-jp/documentation/pages/workspace/team-members-management.mdx diff --git a/ja-jp/guides/application-publishing/launch-your-webapp-quickly/README.mdx b/ja-jp/guides/application-publishing/launch-your-webapp-quickly/README.mdx deleted file mode 100644 index 2ae49f8d..00000000 --- a/ja-jp/guides/application-publishing/launch-your-webapp-quickly/README.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: シングルページWebアプリとして公開 ---- - - -Difyを使ってAIアプリを作成するメリットの一つは、数分でユーザー向けのWebアプリを公開できることです。このアプリはあなたのプロンプトに基づいて機能します。 - -* 自己ホストのオープンソース版を使用する場合、そのアプリはあなたのサーバー上で動作します -* クラウドサービスを使用する場合、そのアプリはUdify.appにホストされます - -*** - -### AIサイトの公開 - -アプリ概要ページで、AIサイト(Webアプリ)に関するカードを見つけることができます。Webアプリのアクセスをオンにするだけで、ユーザーと共有できるリンクが得られます。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/application-publishing/launch-your-webapp-quickly/56093185a61265109cee9f2e00420ff4.png) - -以下の2種類のアプリには、きれいなWebアプリのインターフェースを提供しています: - -* テキスト生成型([前往预览](/ja-jp/guides/application-publishing/launch-your-webapp-quickly/text-generator)) -* 対話型([前往预览](/ja-jp/guides/application-publishing/launch-your-webapp-quickly/conversation-application)) - -*** - -### AIサイトの設定 - -Webアプリのカード上の**設定**ボタンをクリックすると、AIサイトのオプションをいくつか設定できます。これらは最終ユーザーに表示されます: - -* アイコン -* 名前 -* アプリの説明 -* インターフェース言語 -* 著作権情報 -* プライバシーポリシーリンク -* カスタム免責事項 - - -現在サポートされているインターフェース言語:英語、中国語(簡体字)、中国語(繁体字)、ポルトガル語、ドイツ語、日本語、韓国語、ウクライナ語、ベトナム語。追加の言語が必要な場合は、GitHubでイシューを提出するか、プルリクエストを提出してコードを提供してください。[サポートを求める](/ja-jp/community/support)。 - - -*** - -### AIサイトの埋め込み - -Difyは、あなたのAIアプリをビジネスWebサイトに埋め込むことをサポートしています。この機能を使えば、数分でビジネスデータを持つ公式サイトのAIカスタマーサポートやビジネス知識Q&Aなどのアプリを作成できます。Webアプリのカード上の埋め込みボタンをクリックし、埋め込みコードをコピーして、Webサイトの目標位置に貼り付けます。 - -* iframeタグの方法 - - iframeコードを、AIアプリを表示するあなたのWebサイトのタグ(例:`
`、`
`)にコピーします。 -* scriptタグの方法 - - scriptコードを、あなたのWebサイトの``または``タグにコピーします。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/application-publishing/launch-your-webapp-quickly/1e2e8c9adc620f9d6b4ea157119e8659.png) - -例えば、scriptコードを公式サイトの``に貼り付けると、公式サイトのAIロボットが得られます: - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/application-publishing/launch-your-webapp-quickly/f5a5e95e1120906669b3c1ad4e186dea.png) - -{/* -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/application-publishing/launch-your-webapp-quickly/README.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/ja-jp/guides/monitoring/README.mdx b/ja-jp/guides/monitoring/README.mdx index 2412af78..7d7b5882 100644 --- a/ja-jp/guides/monitoring/README.mdx +++ b/ja-jp/guides/monitoring/README.mdx @@ -1,11 +1,12 @@ +> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](../../../en/guides/monitoring/README.mdx)を参照してください。 + --- -title: モニタリング +title: ダッシュボード --- +**概要**セクションでは、本番環境でのアプリケーションのパフォーマンスを監視および追跡できます。データ分析ダッシュボードでは、使用コスト、レイテンシー、ユーザーフィードバック、本番環境でのパフォーマンスなど、さまざまなメトリクスを分析できます。継続的なデバッグとイテレーションにより、アプリケーションを継続的に改善できます。 -**概要** で本番環境におけるアプリケーションのパフォーマンスをモニタリングし、データ分析ダッシュボードで本番環境におけるアプリケーションの使用コスト、レイテンシ、ユーザーフィードバック、パフォーマンスなどの指標を分析します。継続デバッグおよびイテレーションを通じてアプリケーションを絶えず改善します。 - -![概要](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/monitoring/45c8580f167e27c9e26784b5426987d0.png) +![](https://assets-docs.dify.ai/2025/04/7b1c25b1f6d5e95d46056285abb079f5.png) {/* Contributing Section @@ -15,5 +16,4 @@ It will be automatically generated by the script. --- -[このページを編集する](https://github.com/langgenius/dify-docs/edit/main/ja-jp/guides/monitoring/README.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - +[このページを編集](https://github.com/langgenius/dify-docs/edit/main/en/guides/monitoring/README.mdx) | [問題を報告](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) \ No newline at end of file diff --git a/ja-jp/guides/workflow/error-handling/error-type.mdx b/ja-jp/guides/workflow/error-handling/error-type.mdx deleted file mode 100644 index c661efcc..00000000 --- a/ja-jp/guides/workflow/error-handling/error-type.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: エラータイプの概要 ---- - - -本記事では、さまざまなノードで発生可能なトラブルと、それに伴うエラーの種類について解説します。 - -## チャットフロー/ワークフロー - -* **システムエラー** - システム関連の問題が原因で発生するエラーです。例えば、サービスが正しく起動していない、ネットワーク接続に問題がある場合などが該当します。 - -* **操作エラー** - 開発者がノードの設定や操作に失敗した際に生じるエラーです。 - -## コードノード -[コードノード](/ja-jp/guides/workflow/nodes/code)を使用することで、PythonやJavaScriptのコードを実行し、データ変換を行うことができます。ここでは、よくある4つのエラーを紹介します: - -1. **コードエラー(CodeNodeError)** - 開発者のコード内で例外が発生した場合にこのエラーが起きます。変数が不足している、計算ロジックが間違っている、文字列として扱うべき配列を誤って変数として扱っている場合などがあります。エラーメッセージや具体的な行番号で問題を特定できます。 - - ![コードエラー](https://assets-docs.dify.ai/2024/12/c86b11af7f92368180ea1bac38d77083.png) - -2. **サンドボックスのネットワーク問題(System Error)** - ネットワークのトラフィック異常や接続問題によって生じるエラーです。サンドボックスサービスが停止している、プロキシがネットワークをブロックしている場合などです。この問題は次の手順で解決可能です: - a. ネットワークの品質を確認する - b. サンドボックスサービスを再起動する - c. プロキシ設定を見直す - - ![サンドボックスのネットワーク問題](https://assets-docs.dify.ai/2024/12/d95007adf67c4f232e46ec455c348e2c.PNG) - -3. **ネスト制限エラー(DepthLimitError)** - 現在のノードは、最大で5層までのネスト構造をサポートしています。これを超えるとエラーが発生します。 - - ![DepthLimitError](https://assets-docs.dify.ai/2024/12/5649d52a6e80ddd4180b336266701f7b.png) - -4. **出力検証エラー(OutputValidationError)** - 選択した出力変数の型と実際の出力変数の型が一致しない場合に生じるエラーです。開発者は適切な出力変数の型を選択し直すことで、この問題を回避することができます。 - - ![OutputValidationError](https://assets-docs.dify.ai/2024/12/ab8cae01a590b037017dfe9ea4dbbb8b.png) - -## LLMノード - -[LLMノード](/ja-jp/guides/workflow/nodes/llm)は、チャットフローやワークフローの中核をなすコンポーネントであり、大規模言語モデルを用いて様々なタスクを処理します。 - -以下は、実行時に遭遇する可能性のある6つの一般的なエラーです: - -1. **変数が見つからない(VariableNotFoundError)** - システムプロンプトやコンテキストで指定された変数がLLMによって見つけられない場合にこのエラーが発生します。開発者は、補足となる変数を設定することで問題を解決できます。 - - ![VariableNotFoundError](https://assets-docs.dify.ai/2024/12/f20c5fbde345144de6183374ab277662.png) - -2. **コンテキスト構造の無効 (InvalidContextStructureError)** - LLMノードが不正なデータ構造を受け取った場合に報告されます。コンテキストは文字列データ構造のみをサポートします。 - -3. **無効な変数タイプ(InvalidVariableTypeError)** - システムプロンプトの形式が一般的なテキストやJinja syntaxでない場合にこのエラーが生じます。 - -4. **モデルが存在しない(ModelNotExistError)** - 各LLMノードにはモデルの指定が必要です。モデルが選択されていない場合には、このエラーが発生します。 - -5. **LLMの認証が必要(LLMModeRequiredError)** - 選択されたモデルにAPIキーが設定されていない場合にこのエラーが報告されます。ドキュメントの指示に従ってモデルを認証してください。 - -6. **プロンプトが見つからない(NoPromptFoundError)** - LLMノードのプロンプトが空の場合、エラーが生じます。 - -## HTTPノード - -[HTTPノード](/ja-jp/guides/workflow/nodes/http-request)は、HTTPリクエストを送信してデータを取得、Webhookを発火、画像を生成、ファイルをダウンロードするなどの操作を可能にし、カスタマイズ可能なリクエストによって外部サービスとのシームレスな統合を実現します。ここでは、このノードで頻繁に発生する5つの一般的なエラーを紹介します: - -1. **認証設定エラー(AuthorizationConfigError)** - 認証情報が設定されていない場合に発生するエラーです。 - -2. **ファイル取得エラー(FileFetchError)** - ファイル変数が取得できない場合に発生するエラーです。 - -3. **不正なHTTPリクエストメソッド(InvalidHttpMethodError)** - リクエストメソッドがGET、HEAD、POST、PUT、PATCH、DELETEのいずれにも該当しない場合にエラーが発生します。 - -4. **レスポンスサイズ超過(ResponseSizeError)** - HTTPレスポンスが10MBの制限を超えると、このエラーが発生します。 - -5. **HTTPレスポンスコードエラー(HTTPResponseCodeError)** - レスポンスコードが200系以外(例:400、404、500など)の場合にエラーが報告されます。例外処理が有効であれば、これらのステータスコードによるエラーが報告されますが、それ以外ではエラーは報告されません。 - -## ツールノード - -ランタイムでよく遭遇する3つのエラーは以下のとおりです: - -1. **ツール実行エラー(ToolNodeError)** - ツール自体の実行に問題があった場合に報告されるエラーです。たとえば、目指すAPIのリクエスト制限に達した場合などがこれに該当します。 - - ![](https://assets-docs.dify.ai/2024/12/84af0831b7cb23e64159dfbba80e9b28.jpg) - -2. **ツールパラメータエラー(ToolParameterError)** - ツールノードの設定パラメータに問題がある場合、つまりツールノードが要求するパラメータと異なる値が入力された場合にこのエラーが発生します。 - -3. **ツールファイル処理エラー(ToolFileError)** - ツールノードの処理に必要なファイルが見つからない場合にこのエラーが発生します。 - -{/* -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/error-handling/error-type.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/ja-jp/guides/workflow/orchestrate-node.mdx b/ja-jp/guides/workflow/orchestrate-node.mdx deleted file mode 100644 index 9dcc472a..00000000 --- a/ja-jp/guides/workflow/orchestrate-node.mdx +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: オーケストレートノード ---- - -チャットフローおよびワークフローアプリケーションは、ビジュアルなドラッグアンドドロップ機能を通じてノードのオーケストレーションをサポートしており、シリアルおよびパラレルの2つのオーケストレーションデザインパターンがあります。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/3984e13db72e2bd19870f5764ec000cf.jpeg) - -## シリアルノードのデザインパターン - -このパターンでは、ノードはあらかじめ定義された順序で順次実行されます。各ノードは、前のノードがタスクを完了し、出力を生成した後にのみ操作を開始します。これにより、タスクが論理的な順序で実行されることが保証されます。 - -シリアルパターンを実装した「小説生成」ワークフローアプリケーションを考えてみましょう。ユーザーが小説のスタイル、リズム、キャラクターを入力した後、LLMが順番に小説の概要、プロット、エンディングを完成させます。各ノードは前のノードの出力に基づいて動作し、小説のスタイルに一貫性をもたらします。 - -### シリアル構造の作り方 - -1. 2つのノードの間にある「+」アイコンをクリックして新しいシリアルノードを挿入します。 -2. ノードを順次リンクします。 -3. すべてのパスを「終了」ノード(ワークフロー)/「直接回答」ノード(チャットフロー)に収束させて、ワークフローを最終承認します。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/e8e884e146994b5f95cb16ec31cdd81b.png) - -### シリアル構造のアプリのログをチェックする - -シリアル構造のアプリは、ログが順次ノードの操作を表示します。会話ボックスの右上にある "View Logs - Tracing" を順にクリックすると、各ノードの入力、出力、トークン消費、実行時間を含む完全なワークフロープロセスが表示されます。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/1707ee3651f154fcb90c882a2aeab6e9.png) - -## パラレルノードのデザインパターン - -このアーキテクチャパターンは、複数のノードを並行して実行することを可能にします。前のノードは、パラレル構造内の複数のノードを同時にトリガーできます。これらのパラレルノードは独立して動作し、タスクを同時に実行することで、全体のワークフロー効率を大幅に向上させます。 - -パラレルアーキテクチャを実装した翻訳ワークフローアプリケーションを考えてみましょう。ユーザーがソーステキストを入力してワークフローをトリガーすると、パラレル構造内のすべてのノードが前のノードから同時に命令を受け取ります。これにより、複数の言語への同時翻訳が可能となり、全体の処理時間が大幅に短縮されます。 - -### パラレルノードのデザインパターン - -次の4つの方法は、ノードの追加やビジュアル操作を通じてパラレル構造を作成する方法を示しています: - -**方法1**\ -ノードの上にカーソルを合わせると「+」ボタンが表示されます。クリックすると、複数のノードが追加され、自動的にパラレル構造が形成されます。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/b93ff4b81f2a5526a8787aa1e9fb314d.png) - -**方法2**\ -ノードから接続を延長するには、ノードの「+」ボタンをドラッグしてパラレル構造を作成します。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/8deebdb38e3848966ed667e6ed97bdce.png) - -**方法3**\ -キャンバス上に複数のノードがある場合は、ビジュアルにドラッグしてリンクし、パラレル構造を形成します。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/3997bca0f5efa1a3c4a214dbe3ed1f0c.png) - -**方法4**\ -キャンバスベースの方法に加えて、ノードの右側パネルの「Next Step」セクションからノードを追加することで、パラレル構造を生成することもできます。このアプローチにより、自動的にパラレル構成が作成されます。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/516d11ac4c75ecf394da371f76feb89c.png) - -**注意:** - -* 任意のノードがパラレル構造の下流ノードとして機能します。 -* ワークフローアプリケーションには、単一かつ一意な「end」ノードが必要です。 -* チャットフローアプリケーションでは複数の「answer」ノードがサポートされます。これらのアプリケーションの各パラレル構造は、適切なコンテンツの出力を確保するために「answer」ノードで終了する必要があります。 -* すべてのパラレル構造は同時に実行されます。パラレル構造内のノードは、タスクを完了した後に結果を出力し、出力には順序関係がありません。パラレル構造が単純であればあるほど、結果の出力が速くなります。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/1d0884e4c9bfa548d84849871719d646.png) - -### パラレル構造の作り方 - -以下の4つのパターンは、一般的なパラレル構造デザインを示しています: - -#### 1. 通常のパラレル - -通常のパラレルは、「開始 | パラレルノード | 終了」の3階層関係を指します。この構造は直感的で、ユーザー入力後に複数のタスクを同時に実行できます。 - -パラレルブランチの上限は10です。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/5ba85864454880561ec95a37db382f20.png) - -#### 2. ネストされたパラレル - -ネストされたパラレルは、「開始 | 複数のパラレル構造 | 終了」の多階層関係を指します。これは、外部APIを要求する必要があるノード内で同時に複数のタスクを処理し、結果を下流ノードに渡す必要があるような、より複雑なワークフローに適しています。 - -ワークフローは、最大3層までのネスト関係をサポートします。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/036f9fcfb1d0f8dedbd34e90ebb64c29.png) - -#### 3. 条件分岐 + パラレル - -パラレル構造は条件分岐と組み合わせて使用することもできます。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/d28637a39327032fa333fd49b9dd2e73.png) - -#### 4. イテレーション + パラレル - -このパターンは、イテレーションとパラレル構造を組み合わせたものです。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/bc06917031cf52c2e3d8cf9fe8a8dc8b.png) - -### パラレル構造のアプリのログをチェックする - -パラレル構造をもつアプリケーションは、ツリーのような形式でログを生成します。折りたたみ可能なパラレルノード グループにより、個々のノード ログを簡単に表示できます。 - -![](https://assets-docs.dify.ai/dify-enterprise-mintlify/jp/guides/workflow/ad6acb838b58d2e0c8f99669b24aa20d.png) - -{/* -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/orchestrate-node.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/ja-jp/getting-started/cloud.mdx b/ja-jp/self-hosting/cloud.mdx similarity index 100% rename from ja-jp/getting-started/cloud.mdx rename to ja-jp/self-hosting/cloud.mdx diff --git a/ja-jp/getting-started/install-self-hosted/bt-panel.mdx b/ja-jp/self-hosting/dify-community/bt-panel.mdx similarity index 100% rename from ja-jp/getting-started/install-self-hosted/bt-panel.mdx rename to ja-jp/self-hosting/dify-community/bt-panel.mdx diff --git a/ja-jp/getting-started/install-self-hosted/docker-compose.mdx b/ja-jp/self-hosting/dify-community/docker-compose.mdx similarity index 100% rename from ja-jp/getting-started/install-self-hosted/docker-compose.mdx rename to ja-jp/self-hosting/dify-community/docker-compose.mdx diff --git a/ja-jp/getting-started/install-self-hosted/environments.mdx b/ja-jp/self-hosting/dify-community/environments.mdx similarity index 100% rename from ja-jp/getting-started/install-self-hosted/environments.mdx rename to ja-jp/self-hosting/dify-community/environments.mdx diff --git a/ja-jp/getting-started/install-self-hosted/local-source-code.mdx b/ja-jp/self-hosting/dify-community/local-source-code.mdx similarity index 100% rename from ja-jp/getting-started/install-self-hosted/local-source-code.mdx rename to ja-jp/self-hosting/dify-community/local-source-code.mdx diff --git a/ja-jp/getting-started/install-self-hosted/README.mdx b/ja-jp/self-hosting/dify-community/readme.mdx similarity index 100% rename from ja-jp/getting-started/install-self-hosted/README.mdx rename to ja-jp/self-hosting/dify-community/readme.mdx diff --git a/ja-jp/getting-started/install-self-hosted/start-the-frontend-docker-container.mdx b/ja-jp/self-hosting/dify-community/start-the-frontend-docker-container.mdx similarity index 100% rename from ja-jp/getting-started/install-self-hosted/start-the-frontend-docker-container.mdx rename to ja-jp/self-hosting/dify-community/start-the-frontend-docker-container.mdx diff --git a/ja-jp/getting-started/dify-for-education.mdx b/ja-jp/self-hosting/dify-for-education.mdx similarity index 100% rename from ja-jp/getting-started/dify-for-education.mdx rename to ja-jp/self-hosting/dify-for-education.mdx diff --git a/ja-jp/getting-started/dify-premium.mdx b/ja-jp/self-hosting/dify-premium.mdx similarity index 100% rename from ja-jp/getting-started/dify-premium.mdx rename to ja-jp/self-hosting/dify-premium.mdx diff --git a/ja-jp/learn-more/faq/install-faq.mdx b/ja-jp/self-hosting/install-faq.mdx similarity index 100% rename from ja-jp/learn-more/faq/install-faq.mdx rename to ja-jp/self-hosting/install-faq.mdx diff --git a/ja-jp/openapi-api-access-readme.mdx b/ja-jp/self-hosting/openapi-api-access-readme.mdx similarity index 100% rename from ja-jp/openapi-api-access-readme.mdx rename to ja-jp/self-hosting/openapi-api-access-readme.mdx diff --git a/tools/translate/config.json b/tools/translate/config.json new file mode 100644 index 00000000..6b1443b1 --- /dev/null +++ b/tools/translate/config.json @@ -0,0 +1,83 @@ +{ + "path_mappings": { + "en": ["zh-hans", "ja-jp"], + "en/documentation": ["zh-hans/documentation", "ja-jp/documentation"], + "en/self-hosting": ["zh-hans/self-hosting", "ja-jp/self-hosting"], + "en/api-reference": ["zh-hans/api-reference", "ja-jp/api-reference"] + }, + "label_translations": { + "Getting Started": { + "zh-hans": "快速开始", + "ja-jp": "はじめに" + }, + "Documentation": { + "zh-hans": "文档", + "ja-jp": "ドキュメント" + }, + "Build": { + "zh-hans": "构建", + "ja-jp": "ビルド" + }, + "Debug": { + "zh-hans": "调试", + "ja-jp": "デバッグ" + }, + "Publish": { + "zh-hans": "发布", + "ja-jp": "公開" + }, + "Monitor": { + "zh-hans": "监控", + "ja-jp": "モニタリング" + }, + "Knowledge": { + "zh-hans": "知识库", + "ja-jp": "ナレッジベース" + }, + "Workspace": { + "zh-hans": "工作区", + "ja-jp": "ワークスペース" + }, + "Tutorials": { + "zh-hans": "教程", + "ja-jp": "チュートリアル" + }, + "FAQ": { + "zh-hans": "常见问题", + "ja-jp": "よくある質問" + }, + "Introduction": { + "zh-hans": "介绍", + "ja-jp": "紹介" + }, + "Quick Start": { + "zh-hans": "快速开始", + "ja-jp": "クイックスタート" + }, + "Key Concepts": { + "zh-hans": "核心概念", + "ja-jp": "主要概念" + }, + "Nodes": { + "zh-hans": "节点", + "ja-jp": "ノード" + }, + "Self Hosting": { + "zh-hans": "自部署", + "ja-jp": "セルフホスティング" + }, + "API Reference": { + "zh-hans": "API 参考", + "ja-jp": "API リファレンス" + }, + "Develop": { + "zh-hans": "开发", + "ja-jp": "開発" + } + }, + "docs_json_language_mapping": { + "en": "en", + "zh-hans": "zh-Hans", + "ja-jp": "jp" + } +} \ No newline at end of file diff --git a/tools/translate/notices.json b/tools/translate/notices.json new file mode 100644 index 00000000..c3b12001 --- /dev/null +++ b/tools/translate/notices.json @@ -0,0 +1,4 @@ +{ + "zh-hans": "> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版]({en_path})。\n\n", + "ja-jp": "> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版]({en_path})を参照してください。\n\n" +} \ No newline at end of file diff --git a/tools/translate/sync_and_translate.py b/tools/translate/sync_and_translate.py new file mode 100644 index 00000000..a85f63a2 --- /dev/null +++ b/tools/translate/sync_and_translate.py @@ -0,0 +1,532 @@ +#!/usr/bin/env python3 +""" +Documentation Auto-Sync System +Synchronizes English documentation structure and content to Chinese and Japanese versions. +""" + +import json +import os +import sys +import asyncio +import shutil +from pathlib import Path +from typing import Dict, List, Set, Tuple, Optional, Any +import subprocess +import tempfile + +# Import the existing translation function +from main import translate_text, load_md_mdx + +# --- Configuration --- +SCRIPT_DIR = Path(__file__).resolve().parent +BASE_DIR = SCRIPT_DIR.parent.parent +DOCS_JSON_PATH = BASE_DIR / "docs.json" + +# Language configurations +LANGUAGES = { + "en": { + "name": "English", + "base_path": "en", + "code": "en" + }, + "zh-hans": { + "name": "Chinese", + "base_path": "zh-hans", + "code": "zh-Hans" + }, + "ja-jp": { + "name": "Japanese", + "base_path": "ja-jp", + "code": "jp" + } +} + +TARGET_LANGUAGES = ["zh-hans", "ja-jp"] + +class DocsSynchronizer: + def __init__(self, dify_api_key: str): + self.dify_api_key = dify_api_key + self.base_dir = BASE_DIR + self.docs_json_path = DOCS_JSON_PATH + self.config = self.load_config() + self.notices = self.load_notices() + + def load_config(self) -> Dict[str, Any]: + """Load configuration file with language mappings""" + config_path = SCRIPT_DIR / "config.json" + if config_path.exists(): + with open(config_path, 'r', encoding='utf-8') as f: + return json.load(f) + return { + "path_mappings": { + "en": ["zh-hans", "ja-jp"] + }, + "label_translations": {} + } + + def load_notices(self) -> Dict[str, str]: + """Load AI translation notice templates""" + notices_path = SCRIPT_DIR / "notices.json" + if notices_path.exists(): + with open(notices_path, 'r', encoding='utf-8') as f: + return json.load(f) + return { + "zh-hans": "> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版]({en_path})。\n\n", + "ja-jp": "> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版]({en_path})を参照してください。\n\n" + } + + def get_changed_files(self, since_commit: str = "HEAD~1") -> Dict[str, List[str]]: + """Get changed files using git diff""" + try: + # Get file changes + result = subprocess.run([ + "git", "diff", "--name-status", since_commit, "HEAD" + ], capture_output=True, text=True, cwd=self.base_dir) + + changes = { + "added": [], + "modified": [], + "deleted": [], + "renamed": [] + } + + for line in result.stdout.strip().split('\n'): + if not line: + continue + + parts = line.split('\t') + status = parts[0] + + if status == 'A': + changes["added"].append(parts[1]) + elif status == 'M': + changes["modified"].append(parts[1]) + elif status == 'D': + changes["deleted"].append(parts[1]) + elif status.startswith('R'): + changes["renamed"].append((parts[1], parts[2])) + + return changes + except subprocess.CalledProcessError as e: + print(f"Error getting git changes: {e}") + return {"added": [], "modified": [], "deleted": [], "renamed": []} + + def is_english_doc_file(self, file_path: str) -> bool: + """Check if file is an English documentation file that should be synced""" + return (file_path.startswith("en/") and + (file_path.endswith('.md') or file_path.endswith('.mdx')) and + not file_path.startswith("en/api-reference/")) + + def convert_path_to_target_language(self, en_path: str, target_lang: str) -> str: + """Convert English path to target language path""" + if en_path.startswith("en/"): + return en_path.replace("en/", f"{target_lang}/", 1) + return en_path + + def get_relative_en_path_for_notice(self, target_path: str) -> str: + """Get relative path to English version for AI notice""" + # Convert zh-hans/documentation/pages/getting-started/faq.md + # to ../../en/documentation/pages/getting-started/faq.md + if target_path.startswith("zh-hans/"): + en_path = target_path.replace("zh-hans/", "en/", 1) + elif target_path.startswith("ja-jp/"): + en_path = target_path.replace("ja-jp/", "en/", 1) + else: + return "" + + # Count directory levels to create relative path + target_dir_levels = len(Path(target_path).parent.parts) + relative_prefix = "../" * target_dir_levels + return relative_prefix + en_path + + async def translate_file_with_notice(self, en_file_path: str, target_file_path: str, target_lang: str) -> bool: + """Translate a file and add AI notice at the top""" + try: + print(f"Translating {en_file_path} to {target_file_path}") + + # Ensure target directory exists + target_dir = Path(self.base_dir / target_file_path).parent + target_dir.mkdir(parents=True, exist_ok=True) + + # Get language names for translation API + en_lang_name = LANGUAGES["en"]["name"] + target_lang_name = LANGUAGES[target_lang]["name"] + + # Translate content + translated_content = await translate_text( + str(self.base_dir / en_file_path), + self.dify_api_key, + en_lang_name, + target_lang_name + ) + + if not translated_content or not translated_content.strip(): + print(f"Warning: No translated content received for {en_file_path}") + return False + + # Prepare AI notice + en_relative_path = self.get_relative_en_path_for_notice(target_file_path) + notice = self.notices.get(target_lang, "").format(en_path=en_relative_path) + + # Combine notice and translated content + final_content = notice + translated_content + + # Write to target file + with open(self.base_dir / target_file_path, 'w', encoding='utf-8') as f: + f.write(final_content) + + print(f"✓ Successfully created {target_file_path}") + return True + + except Exception as e: + print(f"Error translating {en_file_path} to {target_file_path}: {e}") + return False + + def sync_file_operations(self, changes: Dict[str, List[str]]) -> List[str]: + """Sync file operations to target languages""" + operations_log = [] + + # Handle added files + for file_path in changes["added"]: + if self.is_english_doc_file(file_path): + for target_lang in TARGET_LANGUAGES: + target_path = self.convert_path_to_target_language(file_path, target_lang) + # We'll translate these in the async part + operations_log.append(f"WILL_TRANSLATE: {file_path} -> {target_path}") + + # Handle deleted files + for file_path in changes["deleted"]: + if self.is_english_doc_file(file_path): + for target_lang in TARGET_LANGUAGES: + target_path = self.convert_path_to_target_language(file_path, target_lang) + target_full_path = self.base_dir / target_path + if target_full_path.exists(): + target_full_path.unlink() + operations_log.append(f"DELETED: {target_path}") + + # Handle renamed files + for old_path, new_path in changes["renamed"]: + if self.is_english_doc_file(old_path) or self.is_english_doc_file(new_path): + for target_lang in TARGET_LANGUAGES: + old_target = self.convert_path_to_target_language(old_path, target_lang) + new_target = self.convert_path_to_target_language(new_path, target_lang) + + old_full_path = self.base_dir / old_target + new_full_path = self.base_dir / new_target + + if old_full_path.exists(): + # Ensure target directory exists + new_full_path.parent.mkdir(parents=True, exist_ok=True) + shutil.move(str(old_full_path), str(new_full_path)) + operations_log.append(f"RENAMED: {old_target} -> {new_target}") + + return operations_log + + async def translate_new_and_modified_files(self, changes: Dict[str, List[str]]) -> List[str]: + """Translate new and modified files""" + translation_log = [] + tasks = [] + + # Collect translation tasks + for file_path in changes["added"] + changes["modified"]: + if self.is_english_doc_file(file_path): + for target_lang in TARGET_LANGUAGES: + target_path = self.convert_path_to_target_language(file_path, target_lang) + task = self.translate_file_with_notice(file_path, target_path, target_lang) + tasks.append((task, file_path, target_path)) + + # Handle renamed files that need translation + for old_path, new_path in changes["renamed"]: + if self.is_english_doc_file(new_path): + for target_lang in TARGET_LANGUAGES: + target_path = self.convert_path_to_target_language(new_path, target_lang) + task = self.translate_file_with_notice(new_path, target_path, target_lang) + tasks.append((task, new_path, target_path)) + + # Execute translations with concurrency control + semaphore = asyncio.Semaphore(2) # Limit concurrent translations + + async def bounded_translate(task, en_path, target_path): + async with semaphore: + success = await task + return success, en_path, target_path + + # Run translations + if tasks: + print(f"Starting {len(tasks)} translation tasks...") + results = await asyncio.gather(*[ + bounded_translate(task, en_path, target_path) + for task, en_path, target_path in tasks + ], return_exceptions=True) + + for result in results: + if isinstance(result, Exception): + translation_log.append(f"ERROR: {result}") + else: + success, en_path, target_path = result + if success: + translation_log.append(f"TRANSLATED: {en_path} -> {target_path}") + else: + translation_log.append(f"FAILED: {en_path} -> {target_path}") + + return translation_log + + def load_docs_json(self) -> Dict[str, Any]: + """Load docs.json file""" + try: + with open(self.docs_json_path, 'r', encoding='utf-8') as f: + return json.load(f) + except Exception as e: + print(f"Error loading docs.json: {e}") + return {} + + def save_docs_json(self, data: Dict[str, Any]) -> bool: + """Save docs.json file""" + try: + with open(self.docs_json_path, 'w', encoding='utf-8') as f: + json.dump(data, f, ensure_ascii=False, indent=4) + return True + except Exception as e: + print(f"Error saving docs.json: {e}") + return False + + def extract_english_structure_changes(self, changes: Dict[str, List[str]]) -> bool: + """Check if docs.json was modified""" + return "docs.json" in changes["modified"] or "docs.json" in changes["added"] + + def get_basic_label_translation(self, en_label: str, target_lang: str) -> str: + """Get basic translation for common labels""" + basic_translations = { + "zh-hans": { + "Getting Started": "快速开始", + "Documentation": "文档", + "Build": "构建", + "Debug": "调试", + "Publish": "发布", + "Monitor": "监控", + "Knowledge": "知识库", + "Workspace": "工作区", + "Tutorials": "教程", + "FAQ": "常见问题", + "Introduction": "介绍", + "Quick Start": "快速开始", + "Key Concepts": "核心概念" + }, + "ja-jp": { + "Getting Started": "はじめに", + "Documentation": "ドキュメント", + "Build": "ビルド", + "Debug": "デバッグ", + "Publish": "公開", + "Monitor": "モニタリング", + "Knowledge": "ナレッジベース", + "Workspace": "ワークスペース", + "Tutorials": "チュートリアル", + "FAQ": "よくある質問", + "Introduction": "紹介", + "Quick Start": "クイックスタート", + "Key Concepts": "主要概念" + } + } + + return basic_translations.get(target_lang, {}).get(en_label, en_label) + + def sync_docs_json_structure(self) -> List[str]: + """Sync docs.json structure across languages""" + sync_log = [] + + try: + docs_data = self.load_docs_json() + if not docs_data or "navigation" not in docs_data: + sync_log.append("ERROR: Invalid docs.json structure") + return sync_log + + navigation = docs_data["navigation"] + if "languages" not in navigation or not isinstance(navigation["languages"], list): + sync_log.append("ERROR: No languages found in navigation") + return sync_log + + # Find language sections + en_section = None + zh_section = None + ja_section = None + + for lang_data in navigation["languages"]: + if lang_data.get("language") == "en": + en_section = lang_data + elif lang_data.get("language") == "zh-Hans": + zh_section = lang_data + elif lang_data.get("language") == "jp": + ja_section = lang_data + + if not en_section: + sync_log.append("ERROR: English section not found") + return sync_log + + # Extract Documentation dropdown from English section + en_doc_dropdown = None + for dropdown in en_section.get("dropdowns", []): + if dropdown.get("dropdown") == "Documentation": + en_doc_dropdown = dropdown + break + + if not en_doc_dropdown: + sync_log.append("INFO: No Documentation dropdown found in English section") + return sync_log + + # Sync structure for Chinese and Japanese sections + for target_section, target_lang, target_dropdown_name in [ + (zh_section, "zh-hans", "文档"), + (ja_section, "ja-jp", "ドキュメント") + ]: + if not target_section: + sync_log.append(f"WARNING: {target_lang} section not found") + continue + + # Find existing Documentation dropdown (check both new and old names) + target_doc_dropdown = None + dropdown_index = -1 + old_names = ["使用文档"] if target_lang == "zh-hans" else ["ドキュメント"] if target_lang == "ja-jp" else [] + + for i, dropdown in enumerate(target_section.get("dropdowns", [])): + dropdown_name = dropdown.get("dropdown", "") + if dropdown_name == target_dropdown_name or dropdown_name in old_names: + target_doc_dropdown = dropdown + dropdown_index = i + break + + if not target_doc_dropdown: + # Create new Documentation dropdown + target_doc_dropdown = { + "dropdown": target_dropdown_name, + "icon": "book-open", + "pages": [] + } + target_section.setdefault("dropdowns", []) + target_section["dropdowns"].append(target_doc_dropdown) + sync_log.append(f"INFO: Created new Documentation dropdown for {target_lang}") + else: + # Update existing dropdown to new structure + target_doc_dropdown["dropdown"] = target_dropdown_name # Update name if needed + target_doc_dropdown["icon"] = "book-open" # Ensure icon is set + # Remove old structure fields if they exist + if "groups" in target_doc_dropdown: + del target_doc_dropdown["groups"] + sync_log.append(f"INFO: Updated existing Documentation dropdown for {target_lang}") + + # Sync the structure by converting English paths to target language paths + if "pages" in en_doc_dropdown: + synced_pages = self.convert_pages_structure(en_doc_dropdown["pages"], target_lang) + target_doc_dropdown["pages"] = synced_pages + sync_log.append(f"INFO: Synced documentation structure for {target_lang}") + + # Save the updated docs.json + if self.save_docs_json(docs_data): + sync_log.append("INFO: Updated docs.json with synced structure") + else: + sync_log.append("ERROR: Failed to save updated docs.json") + + except Exception as e: + sync_log.append(f"ERROR: Exception in docs.json sync: {e}") + import traceback + sync_log.append(f"TRACE: {traceback.format_exc()}") + + return sync_log + + def convert_pages_structure(self, pages_structure, target_lang: str): + """Recursively convert English page paths to target language paths""" + if not pages_structure: + return [] + + converted = [] + for item in pages_structure: + if isinstance(item, str): + # Convert path: en/documentation/pages/... -> target_lang/documentation/pages/... + if item.startswith("en/"): + converted_path = item.replace("en/", f"{target_lang}/", 1) + converted.append(converted_path) + else: + converted.append(item) + elif isinstance(item, dict): + converted_item = {} + for key, value in item.items(): + if key == "pages" and isinstance(value, list): + converted_item[key] = self.convert_pages_structure(value, target_lang) + elif key == "group": + # Translate group names + translated_group = self.get_basic_label_translation(value, target_lang) + converted_item[key] = translated_group + else: + converted_item[key] = value + converted.append(converted_item) + else: + converted.append(item) + + return converted + + async def run_sync(self, since_commit: str = "HEAD~1") -> Dict[str, List[str]]: + """Run the complete synchronization process""" + print("=== Starting Documentation Synchronization ===") + + # Get file changes + changes = self.get_changed_files(since_commit) + print(f"Detected changes: {changes}") + + results = { + "file_operations": [], + "translations": [], + "structure_sync": [], + "errors": [] + } + + try: + # 1. Sync file operations (delete, rename) + results["file_operations"] = self.sync_file_operations(changes) + + # 2. Translate new and modified files + results["translations"] = await self.translate_new_and_modified_files(changes) + + # 3. Sync docs.json structure if needed + if self.extract_english_structure_changes(changes): + results["structure_sync"] = self.sync_docs_json_structure() + + except Exception as e: + results["errors"].append(f"CRITICAL: {e}") + print(f"Critical error during sync: {e}") + + print("=== Synchronization Complete ===") + return results + +async def main(): + """Main entry point""" + if len(sys.argv) < 2: + print("Usage: python sync_and_translate.py [since_commit]") + print(" since_commit: Git commit to compare against (default: HEAD~1)") + sys.exit(1) + + dify_api_key = sys.argv[1] + since_commit = sys.argv[2] if len(sys.argv) > 2 else "HEAD~1" + + # Initialize synchronizer + synchronizer = DocsSynchronizer(dify_api_key) + + # Run synchronization + results = await synchronizer.run_sync(since_commit) + + # Print results + print("\n=== SYNCHRONIZATION RESULTS ===") + for category, logs in results.items(): + if logs: + print(f"\n{category.upper()}:") + for log in logs: + print(f" {log}") + + # Return appropriate exit code + if results["errors"]: + sys.exit(1) + else: + print("\n✓ Synchronization completed successfully") + sys.exit(0) + +if __name__ == "__main__": + asyncio.run(main()) \ No newline at end of file diff --git a/tools/translate/test_docs_sync.py b/tools/translate/test_docs_sync.py new file mode 100644 index 00000000..7f215fc9 --- /dev/null +++ b/tools/translate/test_docs_sync.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +"""Test script for docs.json synchronization only""" + +import sys +import os +sys.path.append(os.path.dirname(__file__)) + +from sync_and_translate import DocsSynchronizer + +def main(): + """Test docs.json sync without API calls""" + # Initialize synchronizer with dummy API key + synchronizer = DocsSynchronizer("dummy-key") + + print("=== Testing docs.json Structure Synchronization ===") + + # Run only the docs.json sync + results = synchronizer.sync_docs_json_structure() + + print("\n=== SYNC RESULTS ===") + for log in results: + print(f" {log}") + + print("\n✓ Test completed") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/tools/translate/test_faq_only.py b/tools/translate/test_faq_only.py new file mode 100644 index 00000000..8678ecfa --- /dev/null +++ b/tools/translate/test_faq_only.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +"""Test script for FAQ translation only""" + +import sys +import os +import asyncio +sys.path.append(os.path.dirname(__file__)) + +from sync_and_translate import DocsSynchronizer + +async def main(): + """Test FAQ translation only""" + if len(sys.argv) < 2: + print("Usage: python test_faq_only.py ") + sys.exit(1) + + dify_api_key = sys.argv[1] + synchronizer = DocsSynchronizer(dify_api_key) + + print("=== Testing FAQ File Translation ===") + + # Test translating just the FAQ file + faq_file = "en/documentation/pages/getting-started/faq.mdx" + + try: + # Test Chinese translation + print(f"\nTranslating {faq_file} to Chinese...") + zh_result = await synchronizer.translate_file_with_notice( + faq_file, + "zh-hans/documentation/pages/getting-started/faq.mdx", + "zh-hans" + ) + print(f"Chinese result: {zh_result}") + + # Test Japanese translation + print(f"\nTranslating {faq_file} to Japanese...") + ja_result = await synchronizer.translate_file_with_notice( + faq_file, + "ja-jp/documentation/pages/getting-started/faq.mdx", + "ja-jp" + ) + print(f"Japanese result: {ja_result}") + + # Test docs.json sync + print(f"\nTesting docs.json structure sync...") + sync_results = synchronizer.sync_docs_json_structure() + for result in sync_results: + print(f" {result}") + + print("\n✓ FAQ test completed") + + except Exception as e: + print(f"Error: {e}") + import traceback + traceback.print_exc() + +if __name__ == "__main__": + asyncio.run(main()) \ No newline at end of file diff --git a/tools/translate/test_sync.py b/tools/translate/test_sync.py new file mode 100644 index 00000000..705fc839 --- /dev/null +++ b/tools/translate/test_sync.py @@ -0,0 +1,311 @@ +#!/usr/bin/env python3 +""" +Test script for documentation sync functionality +Simulates the Dify API for testing purposes +""" + +import asyncio +import json +import sys +import os +from pathlib import Path +from unittest.mock import AsyncMock, patch + +# Add the translate directory to the path +sys.path.insert(0, str(Path(__file__).parent)) + +from sync_and_translate import DocsSynchronizer + +# Mock translation responses +MOCK_TRANSLATIONS = { + "Chinese": """# 常见问题 + +欢迎来到 Dify 常见问题部分。在这里您可以找到关于使用 Dify 最常见问题的答案。 + +## 入门 + +### 什么是 Dify? + +Dify 是一个开源的 AI 应用构建平台。它提供了一套全面的工具和功能,帮助您构建、部署和管理 AI 应用程序,无需大量编程知识。 + +### 如何开始使用 Dify? + +开始使用 Dify: + +1. **注册** Dify 账户,访问 [dify.ai](https://dify.ai) +2. **创建您的第一个应用程序** 使用我们直观的界面 +3. **配置您的 AI 模型** 通过连接到 OpenAI、Anthropic 或其他提供商 +4. **测试和迭代** 您的应用程序 +5. **部署** 您的 AI 应用程序到生产环境 + +### 我可以用 Dify 构建什么类型的应用程序? + +您可以使用 Dify 构建各种类型的 AI 应用程序: + +- **聊天机器人** 用于客户服务 +- **知识库助手** 可以回答有关您文档的问题 +- **工作流自动化工具** 智能处理数据 +- **内容生成工具** 用于营销和写作 +- **AI 代理** 可以执行复杂任务 + +## 技术问题 + +### Dify 支持哪些 AI 模型? + +Dify 支持广泛的 AI 模型,包括: + +- **OpenAI 模型**: GPT-4、GPT-3.5 等 +- **Anthropic 模型**: Claude 3 和 Claude 2 +- **开源模型**: 通过 Hugging Face、Ollama 等提供商 +- **本地模型**: 您可以托管自己的模型 + +### Dify 如何处理我的数据? + +数据安全和隐私是我们的首要任务: + +- **您的数据仍然是您的** - 我们不会使用您的私人数据进行训练 +- **传输中和静态加密** +- **企业客户的 SOC2 合规性** +- **欧洲用户的 GDPR 合规性** + +### 我可以将 Dify 用于商业目的吗? + +是的!Dify 提供: + +- **开源版本** 带有 Apache 2.0 许可证,用于自托管 +- **云版本** 带有托管托管的商业计划 +- **企业计划** 具有高级功能和支持 + +## 故障排除 + +### 我的 AI 应用程序给出了错误的响应 + +尝试这些故障排除步骤: + +1. **检查您的提示** - 确保它清晰具体 +2. **检查您的知识库** - 确保上传了相关文档 +3. **调整模型参数** - 尝试不同的温度或 top-k 设置 +4. **使用不同的模型测试** - 某些模型更适合特定任务 + +### 我遇到了响应时间慢的问题 + +改善响应时间: + +1. **检查您的模型配置** - 某些模型比其他模型更快 +2. **优化您的知识库** - 删除不必要的文档 +3. **使用缓存** - 为常见问题启用响应缓存 +4. **考虑升级** 您的计划以获得更好的性能 + +### 如何获得支持? + +您可以通过以下方式获得支持: + +- **社区论坛** - 与其他 Dify 用户联系 +- **文档** - 全面的指南和教程 +- **GitHub 问题** - 用于错误报告和功能请求 +- **电子邮件支持** - 适用于付费计划客户 +- **企业支持** - 为企业客户提供专门支持 + +## 计费和计划 + +### 不同的定价计划有哪些? + +Dify 提供几种计划: + +- **免费层** - 非常适合入门和小项目 +- **专业计划** - 适用于使用需求较高的成长型企业 +- **企业计划** - 为大型组织提供定制解决方案 + +### 如何计算使用量? + +使用量通常基于以下因素计算: + +- **API 调用** 到 AI 模型 +- **存储** 文档和数据 +- **活跃用户** 在您的应用程序上 +- **自定义功能** 取决于您的计划 + +有关详细的定价信息,请访问我们的 [定价页面](https://dify.ai/pricing)。 + +--- + +需要更多帮助?联系我们的支持团队或查看我们的 [综合文档](../../../guides/)。""", + + "Japanese": """# よくある質問 + +Dify FAQ セクションへようこそ。ここでは、Dify の使用に関してよく寄せられる質問への回答を見つけることができます。 + +## はじめに + +### Dify とは何ですか? + +Dify は AI アプリケーションを構築するためのオープンソースプラットフォームです。広範なコーディング知識を必要とせずに、AI アプリケーションの構築、デプロイ、管理を支援する包括的なツールと機能セットを提供します。 + +### Dify を始めるにはどうすればよいですか? + +Dify を開始するには: + +1. [dify.ai](https://dify.ai) で Dify アカウントに **サインアップ** してください +2. 直感的なインターフェースを使用して **最初のアプリケーションを作成** してください +3. OpenAI、Anthropic、その他のプロバイダーに接続して **AI モデルを設定** してください +4. アプリケーションを **テストし、反復** してください +5. AI アプリケーションを本番環境に **デプロイ** してください + +### Dify でどのようなタイプのアプリケーションを構築できますか? + +Dify でさまざまなタイプの AI アプリケーションを構築できます: + +- カスタマーサービス用の **チャットボット** +- ドキュメントに関する質問に答えることができる **ナレッジベースアシスタント** +- データを知的に処理する **ワークフロー自動化ツール** +- マーケティングや執筆用の **コンテンツ生成ツール** +- 複雑なタスクを実行できる **AI エージェント** + +## 技術的な質問 + +### Dify はどの AI モデルをサポートしていますか? + +Dify は幅広い AI モデルをサポートしています: + +- **OpenAI モデル**: GPT-4、GPT-3.5 など +- **Anthropic モデル**: Claude 3 と Claude 2 +- **オープンソースモデル**: Hugging Face、Ollama などのプロバイダー経由 +- **ローカルモデル**: 独自のモデルをホストできます + +### Dify は私のデータをどのように処理しますか? + +データセキュリティとプライバシーが最優先事項です: + +- **あなたのデータはあなたのもの** - 私たちはあなたのプライベートデータでトレーニングしません +- 転送中および保存時の **暗号化** +- エンタープライズ顧客向けの **SOC2 コンプライアンス** +- ヨーロッパユーザー向けの **GDPR コンプライアンス** + +### Dify を商用目的で使用できますか? + +はい!Dify は以下を提供しています: + +- セルフホスティング用の Apache 2.0 ライセンス付き **オープンソース版** +- マネージドホスティング用の商用プラン付き **クラウド版** +- 高度な機能とサポート付き **エンタープライズプラン** + +## トラブルシューティング + +### AI アプリケーションが間違った回答をしています + +これらのトラブルシューティング手順を試してください: + +1. **プロンプトを確認** - 明確で具体的であることを確認してください +2. **ナレッジベースを確認** - 関連するドキュメントがアップロードされていることを確認してください +3. **モデルパラメータを調整** - 異なる温度や top-k 設定を試してください +4. **異なるモデルでテスト** - 一部のモデルは特定のタスクにより適しています + +### 応答時間が遅い問題が発生しています + +応答時間を改善するには: + +1. **モデル設定を確認** - 一部のモデルは他のモデルよりも高速です +2. **ナレッジベースを最適化** - 不要なドキュメントを削除してください +3. **キャッシュを使用** - よくある質問に対してレスポンスキャッシュを有効にしてください +4. **プランのアップグレードを検討** - より良いパフォーマンスのために + +### サポートを受けるにはどうすればよいですか? + +以下の方法でサポートを受けることができます: + +- **コミュニティフォーラム** - 他の Dify ユーザーとつながる +- **ドキュメント** - 包括的なガイドとチュートリアル +- **GitHub の課題** - バグレポートと機能リクエスト用 +- **メールサポート** - 有料プラン顧客向け +- **エンタープライズサポート** - エンタープライズ顧客専用サポート + +## 請求とプラン + +### 異なる価格プランは何ですか? + +Dify はいくつかのプランを提供しています: + +- **無料ティア** - はじめと小さなプロジェクトに最適 +- **プロプラン** - より高い使用ニーズを持つ成長企業向け +- **エンタープライズプラン** - 大規模組織向けのカスタムソリューション + +### 使用量はどのように計算されますか? + +使用量は通常以下に基づいて計算されます: + +- AI モデルへの **API 呼び出し** +- ドキュメントとデータの **ストレージ** +- アプリケーションの **アクティブユーザー** +- プランに応じた **カスタム機能** + +詳細な価格情報については、[価格ページ](https://dify.ai/pricing) をご覧ください。 + +--- + +さらにヘルプが必要ですか?サポートチームにお問い合わせいただくか、[包括的なドキュメント](../../../guides/) をご確認ください。""" +} + +async def mock_translate_text(file_path, dify_api_key, original_language, target_language, termbase_path=None, max_retries=3): + """Mock translation function that returns predefined translations""" + print(f"MOCK: Translating {file_path} from {original_language} to {target_language}") + + # Simulate processing time + await asyncio.sleep(0.5) + + if target_language == "Chinese": + return MOCK_TRANSLATIONS["Chinese"] + elif target_language == "Japanese": + return MOCK_TRANSLATIONS["Japanese"] + else: + return "Mock translation for " + target_language + +async def test_sync_workflow(): + """Test the synchronization workflow""" + print("=== Testing Documentation Sync Workflow ===") + + # Create a mock API key + mock_api_key = "test_api_key_12345" + + # Patch the translate_text function + with patch('sync_and_translate.translate_text', side_effect=mock_translate_text): + # Initialize synchronizer + synchronizer = DocsSynchronizer(mock_api_key) + + # Test the sync process with git changes + print("\n1. Testing change detection...") + changes = synchronizer.get_changed_files("HEAD~1") + print(f"Detected changes: {changes}") + + # Test file operations + print("\n2. Testing file operations...") + file_ops = synchronizer.sync_file_operations(changes) + for op in file_ops: + print(f" {op}") + + # Test translation (this will actually create files) + print("\n3. Testing translation process...") + translations = await synchronizer.translate_new_and_modified_files(changes) + for trans in translations: + print(f" {trans}") + + # Test docs.json structure sync + print("\n4. Testing docs.json structure sync...") + structure_sync = synchronizer.sync_docs_json_structure() + for sync in structure_sync: + print(f" {sync}") + + # Run full sync + print("\n5. Running full synchronization...") + results = await synchronizer.run_sync("HEAD~1") + + print("\n=== FINAL RESULTS ===") + for category, logs in results.items(): + if logs: + print(f"\n{category.upper()}:") + for log in logs: + print(f" {log}") + + print("\n=== Test Complete ===") + +if __name__ == "__main__": + asyncio.run(test_sync_workflow()) \ No newline at end of file diff --git a/zh-hans/documentation/pages/build/additional-features.mdx b/zh-hans/documentation/pages/build/additional-features.mdx new file mode 100644 index 00000000..03c62592 --- /dev/null +++ b/zh-hans/documentation/pages/build/additional-features.mdx @@ -0,0 +1,104 @@ +> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](../../../../en/documentation/pages/build/additional-features.mdx)。 + +--- +title: "附加功能" +icon: "circle-plus" +--- + +添加功能,让你的应用更加实用。点击右上角的 **功能** 来添加功能。 + + + +## 工作流应用 + + + 对于工作流应用,通过“功能”上传文件的方式已被弃用。请改用[开始节点上的文件变量](/zh/guides/workflow/node/start)。 + + +工作流应用仅通过“功能”支持**图片上传**: + + + +**如何设置:** +1. 在“功能”中启用图片上传 +2. 添加具备视觉能力的 LLM 节点 +3. 启用 VISION 并选择 `sys.files` 变量 +4. 连接到结束节点 + +## 对话流应用 + +对话流应用支持更多功能: + +- **对话开场白** - AI 会先打招呼 +- **后续问题建议** - 在每次回复后建议下一个问题 +- **文本转语音** - 朗读回复内容(需要在模型供应商中设置 TTS) +- **文件上传** - 用户可以上传文件 +- **引用** - 在使用知识检索时显示信息来源 +- **内容审查** - 过滤不当内容 + +## 文件上传 + +大多数功能启用后即可自动生效。文件上传需要进行更多设置。 + +**对于用户**:点击回形针图标上传文件 + +![上传文件](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/b18af11da3f339c496193d9732906849.png) + +**对于开发者**:文件会出现在 `sys.files` 变量中。不同文件类型需要不同的处理方式: + +### 文档 + +大型语言模型无法直接读取文件。请先使用“文档提取器”。 + +1. 在文件类型中启用“文档” +2. 添加“文档提取器”节点,并以 `sys.files` 作为输入 +3. 添加 LLM 节点,使用文档提取器的输出 +4. 添加“回答”节点,使用 LLM 的输出 + + + 此方式不会在多次对话中记住文件。用户每次都需要重新上传。对于持久化文件,请使用[开始节点的文件变量](/zh/guides/workflow/node/start)。 + + +### 图片 + +一些大型语言模型可以直接分析图片。 + +1. 在文件类型中启用“图片” +2. 添加启用了 VISION 的 LLM 节点 +3. 选择 `sys.files` 变量 +4. 添加“回答”节点,使用 LLM 的输出 + +![启用视觉能力](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/3a3582bd9bc8ea94bbdbfeefe6a78571.png) + +### 混合文件类型 + +同时处理文档和图片: + +1. 同时启用“图片”和“文档” +2. 添加两个“列表操作”节点以筛选文件类型 +3. 将图片发送到具备视觉能力的 LLM +4. 将文档发送到“文档提取器” +5. 在“回答”节点中合并结果 + +![混合文件类型](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/66471e8e67b2ede0c94bfa1cffeab834.png) + +### 音频和视频 + +大型语言模型无法直接处理这些文件。你需要使用[外部工具](/zh/guides/extension/api-based-extension/external-data-tool)来处理音频/视频。 + +## 限制 + +- 每个文件最大 15MB +- 一次最多 10 个文件 \ No newline at end of file diff --git a/zh-hans/guides/tools/mcp.mdx b/zh-hans/documentation/pages/build/mcp.mdx similarity index 100% rename from zh-hans/guides/tools/mcp.mdx rename to zh-hans/documentation/pages/build/mcp.mdx diff --git a/zh-hans/documentation/pages/build/orchestrate-node.mdx b/zh-hans/documentation/pages/build/orchestrate-node.mdx new file mode 100644 index 00000000..5e41d5ac --- /dev/null +++ b/zh-hans/documentation/pages/build/orchestrate-node.mdx @@ -0,0 +1,36 @@ +> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](../../../../en/documentation/pages/build/orchestrate-node.mdx)。 + +--- +title: "流逻辑" +icon: "diagram-project" +--- + +节点的执行方式取决于您如何连接它们。 + +![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/3984e13db72e2bd19870f5764ec000cf.jpeg) + +## 串行执行 + +当您将节点一个接一个地连接时,它们会按顺序执行。每个节点都会等待前一个节点完成后才开始。 + +![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/e8e884e146994b5f95cb16ec31cdd81b.png) + +每个节点都可以使用链中在其之前运行的任何节点的变量。 + +## 并行执行 + +当您将多个节点连接到同一个起始节点时,它们会同时运行。 + +![](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/5ba85864454880561ec95a37db382f20.png) + + +一个节点最多可以有 10 个并行分支,并且最多支持 3 层嵌套的并行结构。 + + +## 变量访问 + +在串行流中,节点可以访问链中任何先前节点的变量。 + +在并行流中,节点可以访问并行分支开始前运行的节点的变量,但无法访问其他并行节点的变量,因为它们是同时运行的。 + +并行分支完成后,下游节点可以访问所有并行分支的输出变量。 \ No newline at end of file diff --git a/zh-hans/documentation/pages/build/shortcut-key.mdx b/zh-hans/documentation/pages/build/shortcut-key.mdx new file mode 100644 index 00000000..1b7491be --- /dev/null +++ b/zh-hans/documentation/pages/build/shortcut-key.mdx @@ -0,0 +1,150 @@ +> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](../../../../en/documentation/pages/build/shortcut-key.mdx)。 + +--- +title: "快捷键" +icon: "keyboard" +--- + +使用键盘快捷键加快你的工作流构建速度。 + +## 节点操作 +在画布上选中任意节点后: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WindowsmacOS操作
Ctrl + CCmd + C复制节点
Ctrl + VCmd + V粘贴节点
Ctrl + DCmd + D创建副本
DeleteDelete删除所选节点
Ctrl + OCmd + O自动排列节点
ShiftShift可视化变量依赖关系(仅限单个节点)
+ +## 画布导航 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
WindowsmacOS操作
Ctrl + 1Cmd + 1适应视图
Ctrl + -Cmd + -缩小
Ctrl + =Cmd + =放大
Shift + 1Shift + 1重置为 100%
Shift + 5Shift + 5设置为 50%
HH抓手工具(平移)
VV选择工具
+ +## 历史记录 + + + + + + + + + + + + + + + + + + + + + + + + + + +
WindowsmacOS操作
Ctrl + ZCmd + Z撤销
Ctrl + YCmd + Y重做
Ctrl + Shift + ZCmd + Shift + Z重做
+ +## 测试 + + + + + + + + + + + + + + + + +
WindowsmacOS操作
Alt + ROption + R运行工作流
\ No newline at end of file diff --git a/zh-hans/documentation/pages/build/version-control.mdx b/zh-hans/documentation/pages/build/version-control.mdx new file mode 100644 index 00000000..1d33b864 --- /dev/null +++ b/zh-hans/documentation/pages/build/version-control.mdx @@ -0,0 +1,103 @@ +> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](../../../../en/documentation/pages/build/version-control.mdx)。 + +--- +title: "版本控制" +icon: "layer-group" +--- + +在对话流和工作流应用中跟踪变更并管理版本。 + + + 目前仅适用于对话流和工作流应用。 + + +## 工作原理 + +**当前草稿**:你的工作版本。你可以在这里进行更改。此版本不会对用户生效。 + +![](https://assets-docs.dify.ai/2025/03/38296a597c0ca31b5fb70be2234f2363.png) + +**最新版本**:用户看到的线上版本。 + +![](https://assets-docs.dify.ai/2025/03/e4c06a0817c30cf9e8893487c889cb02.png) + +**过往版本**:已发布的旧版本。 + +![](https://assets-docs.dify.ai/2025/03/4cd05033b93d84b53496f3d02e88601f.png) + +## 发布版本 + +点击 **发布** → **发布更新** 以将你的草稿上线。 + +![](https://assets-docs.dify.ai/2025/03/26f3f324ab4ecb965708d553ddd78d97.png) + +你的草稿将成为新的最新版本,同时你会得到一个新的草稿用于后续工作。 + +![](https://assets-docs.dify.ai/2025/03/67e95de17577bc272addad6c33f8ea59.png) + +## 查看版本 + +点击历史记录图标查看所有版本: + +![](https://assets-docs.dify.ai/2025/03/eed667bbc9498425342c09039054cf98.png) + +筛选条件: +- **所有版本** 或 **仅自己创建的** +- **仅已命名的版本**(跳过自动生成的名称) + +![](https://assets-docs.dify.ai/2025/03/0bf8fef8858671a8fef160f49dd83dad.jpg) + +## 管理版本 + +**命名版本**:为其指定一个正式名称,以替代自动生成的名称 + +![](https://assets-docs.dify.ai/2025/03/ac149f63da6611d7080d305dd3fad65c.jpg) + +**编辑版本信息**:更改名称并添加发布说明 + +![](https://assets-docs.dify.ai/2025/03/1d840edf979132a9bbf1e065f95e663c.jpg) + +**删除旧版本**:清理不再需要的版本 + +![](https://assets-docs.dify.ai/2025/03/25ad1999fc9f6f44fcac04526ac5563a.jpg) + + + 你不能删除当前草稿或最新版本。 + + +**恢复版本**:将旧版本加载回你的草稿中 + +![](https://assets-docs.dify.ai/2025/03/c96b714accc29df8e46e711782a7a6a9.jpg) + + + 此操作会完全替换你当前的草稿。请确保没有未保存的工作。 + + +## 示例工作流 + +以下是版本在典型开发周期中的工作方式: + +### 1. 从草稿开始 +![](https://assets-docs.dify.ai/2025/03/35ece9d5d5d4d8c46a3fb5ceae4d0c15.jpeg) + +### 2. 发布第一个版本 +![](https://assets-docs.dify.ai/2025/03/3d1f66cdeb08710f01462a6b0f3ed0a8.jpeg) + +### 3. 发布第二个版本 +![](https://assets-docs.dify.ai/2025/03/92ffbf88a3cbeeeeab47c1bd8b4f7198.jpeg) + +### 4. 将旧版本恢复至草稿 +![](https://assets-docs.dify.ai/2025/03/541f1891416af90dab5b51bfec833249.jpeg) + +### 5. 发布恢复后的版本 +![](https://assets-docs.dify.ai/2025/03/3572a4f2edef166c3f14e4ec4e68b297.jpeg) + +完整演示: +![](https://assets-docs.dify.ai/2025/03/dc7c15a4dfafb72ce7fffea294d5b5e5.gif) + +## 提示 + +- 发布前务必在草稿中进行测试 +- 为重要版本使用描述性的版本名称 +- 当需要快速回滚时,恢复旧版本 +- 保留旧版本以供参考 \ No newline at end of file diff --git a/zh-hans/guides/workflow/error-handling/error-type.mdx b/zh-hans/documentation/pages/debug/error-type.mdx similarity index 100% rename from zh-hans/guides/workflow/error-handling/error-type.mdx rename to zh-hans/documentation/pages/debug/error-type.mdx diff --git a/zh-hans/guides/workflow/debug-and-preview/history-and-logs.mdx b/zh-hans/documentation/pages/debug/history-and-logs.mdx similarity index 100% rename from zh-hans/guides/workflow/debug-and-preview/history-and-logs.mdx rename to zh-hans/documentation/pages/debug/history-and-logs.mdx diff --git a/zh-hans/guides/workflow/debug-and-preview/step-run.mdx b/zh-hans/documentation/pages/debug/step-run.mdx similarity index 100% rename from zh-hans/guides/workflow/debug-and-preview/step-run.mdx rename to zh-hans/documentation/pages/debug/step-run.mdx diff --git a/zh-hans/guides/workflow/debug-and-preview/variable-inspect.mdx b/zh-hans/documentation/pages/debug/variable-inspect.mdx similarity index 100% rename from zh-hans/guides/workflow/debug-and-preview/variable-inspect.mdx rename to zh-hans/documentation/pages/debug/variable-inspect.mdx diff --git a/zh-hans/documentation/pages/getting-started/faq.mdx b/zh-hans/documentation/pages/getting-started/faq.mdx new file mode 100644 index 00000000..0a1dc3fc --- /dev/null +++ b/zh-hans/documentation/pages/getting-started/faq.mdx @@ -0,0 +1,128 @@ +> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](../../../../en/documentation/pages/getting-started/faq.mdx)。 + +--- +title: "常见问题解答" +description: "Common questions and answers about using Dify" +icon: "circle-question" +--- + +欢迎来到 Dify 的常见问题解答(FAQ)部分。在这里,您将找到关于使用 Dify 最常见问题的答案。 + +## 入门指南 + + + + Dify 是一个用于构建 AI 应用程序的开源平台。它提供了一套全面的工具和功能,帮助您在无需大量编码知识的情况下构建、部署和管理您的 AI 应用程序。 + + + + 要开始使用 Dify: + + 1. 在 [dify.ai](https://dify.ai) **注册**一个 Dify 账户 + 2. 使用我们直观的界面**创建您的第一个应用程序** + 3. 通过连接到 OpenAI、Anthropic 等提供商来**配置您的 AI 模型** + 4. **测试和迭代**您的应用程序 + 5. 将您的 AI 应用程序**部署**到生产环境 + + + + 您可以使用 Dify 构建各种类型的 AI 应用程序: + + - 用于客户服务的**聊天机器人** + - 能回答有关您文档问题的**知识库**助手 + - 智能处理数据的**工作流**自动化工具 + - 用于市场营销和写作的**内容生成工具** + - 能够执行复杂任务的 **AI 智能代理** + + + +## 技术问题 + + + + Dify 支持多种 AI 模型,包括: + + - **OpenAI 模型**:GPT-4、GPT-3.5 及其他模型 + - **Anthropic 模型**:Claude 3 和 Claude 2 + - **开源模型**:通过 Hugging Face、Ollama 等提供商 + - **本地模型**:您可以托管自己的模型 + + + + 数据安全和隐私是我们的首要任务: + + - **您的数据归您所有** - 我们不会使用您的私人数据进行训练 + - **传输中和静态加密** + - **SOC2 合规性**,面向企业客户 + - **GDPR 合规性**,面向欧洲用户 + + + + 可以!Dify 同时提供: + + - **开源版本**,采用 Apache 2.0 许可证,可用于自托管 + - **云版本**,提供商业计划,用于托管服务 + - **企业计划**,提供高级功能和支持 + + + +## 问题排查 + + + + 请尝试以下故障排查步骤: + + 1. **检查您的提示词** - 确保它清晰具体 + 2. **检查您的知识库** - 确保已上传相关文档 + 3. **调整模型参数** - 尝试不同的温度或 top-k 设置 + 4. **使用不同模型测试** - 某些模型更适合特定任务 + + + + 要提高响应速度: + + 1. **检查您的模型配置** - 有些模型比其他模型更快 + 2. **优化您的知识库** - 移除不必要的文档 + 3. **使用缓存** - 为常见问题启用响应缓存 + 4. **考虑升级**您的计划以获得更好的性能 + + + + 您可以通过以下方式获得支持: + + - **社区论坛** - 与其他 Dify 用户交流 + - **文档** - 全面的指南和教程 + - **GitHub issues** - 用于报告错误和功能请求 + - **邮件支持** - 适用于付费计划客户 + - **企业支持** - 为企业客户提供专属支持 + + + +## 计费与方案 + + + + Dify 提供多种方案: + + - **免费套餐** - 非常适合入门和小型项目 + - **专业版方案** - 适用于使用量需求较高的成长型企业 + - **企业版方案** - 为大型组织提供定制解决方案 + + + + 使用量通常基于以下几点计算: + + - 对 AI 模型的 **API 调用** + - 文档和数据的**存储** + - 应用程序的**活跃用户** + - 根据您的计划而定的**定制功能** + + 有关详细的定价信息,请访问我们的[定价页面](https://dify.ai/pricing)。 + + + +--- + + + 需要更多帮助?请联系我们的支持团队或查看我们[全面的文档](../../../guides/)。 + \ No newline at end of file diff --git a/zh-hans/introduction.mdx b/zh-hans/documentation/pages/getting-started/introduction.mdx similarity index 100% rename from zh-hans/introduction.mdx rename to zh-hans/documentation/pages/getting-started/introduction.mdx diff --git a/zh-hans/guides/knowledge-base/connect-external-knowledge-base.mdx b/zh-hans/documentation/pages/knowledge/connect-external-knowledge-base.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/connect-external-knowledge-base.mdx rename to zh-hans/documentation/pages/knowledge/connect-external-knowledge-base.mdx diff --git a/zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text.mdx b/zh-hans/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/chunking-and-cleaning-text.mdx rename to zh-hans/documentation/pages/knowledge/create-knowledge/chunking-and-cleaning-text.mdx diff --git a/zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/readme.mdx b/zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/readme.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/readme.mdx rename to zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/readme.mdx diff --git a/zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.mdx b/zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-notion.mdx rename to zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-notion.mdx diff --git a/zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website.mdx b/zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/import-content-data/sync-from-website.mdx rename to zh-hans/documentation/pages/knowledge/create-knowledge/import-text-data/sync-from-website.mdx diff --git a/zh-hans/guides/knowledge-base/knowledge-base-creation/introduction.mdx b/zh-hans/documentation/pages/knowledge/create-knowledge/introduction.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/knowledge-base-creation/introduction.mdx rename to zh-hans/documentation/pages/knowledge/create-knowledge/introduction.mdx diff --git a/zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods.mdx b/zh-hans/documentation/pages/knowledge/create-knowledge/setting-indexing-methods.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods.mdx rename to zh-hans/documentation/pages/knowledge/create-knowledge/setting-indexing-methods.mdx diff --git a/zh-hans/guides/knowledge-base/integrate-knowledge-within-application.mdx b/zh-hans/documentation/pages/knowledge/integrate-knowledge-within-application.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/integrate-knowledge-within-application.mdx rename to zh-hans/documentation/pages/knowledge/integrate-knowledge-within-application.mdx diff --git a/zh-hans/guides/knowledge-base/knowledge-request-rate-limit.mdx b/zh-hans/documentation/pages/knowledge/knowledge-request-rate-limit.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/knowledge-request-rate-limit.mdx rename to zh-hans/documentation/pages/knowledge/knowledge-request-rate-limit.mdx diff --git a/zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/introduction.mdx b/zh-hans/documentation/pages/knowledge/manage-knowledge/introduction.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/introduction.mdx rename to zh-hans/documentation/pages/knowledge/manage-knowledge/introduction.mdx diff --git a/zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.mdx b/zh-hans/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-dataset-via-api.mdx rename to zh-hans/documentation/pages/knowledge/manage-knowledge/maintain-dataset-via-api.mdx diff --git a/zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents.mdx b/zh-hans/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents.mdx rename to zh-hans/documentation/pages/knowledge/manage-knowledge/maintain-knowledge-documents.mdx diff --git a/zh-hans/guides/knowledge-base/metadata.mdx b/zh-hans/documentation/pages/knowledge/metadata.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/metadata.mdx rename to zh-hans/documentation/pages/knowledge/metadata.mdx diff --git a/zh-hans/guides/knowledge-base/readme.mdx b/zh-hans/documentation/pages/knowledge/readme.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/readme.mdx rename to zh-hans/documentation/pages/knowledge/readme.mdx diff --git a/zh-hans/guides/knowledge-base/retrieval-test-and-citation.mdx b/zh-hans/documentation/pages/knowledge/retrieval-test-and-citation.mdx similarity index 100% rename from zh-hans/guides/knowledge-base/retrieval-test-and-citation.mdx rename to zh-hans/documentation/pages/knowledge/retrieval-test-and-citation.mdx diff --git a/zh-hans/guides/monitoring/analysis.mdx b/zh-hans/documentation/pages/monitor/analysis.mdx similarity index 100% rename from zh-hans/guides/monitoring/analysis.mdx rename to zh-hans/documentation/pages/monitor/analysis.mdx diff --git a/zh-hans/guides/annotation/annotation-reply.mdx b/zh-hans/documentation/pages/monitor/annotation-reply.mdx similarity index 100% rename from zh-hans/guides/annotation/annotation-reply.mdx rename to zh-hans/documentation/pages/monitor/annotation-reply.mdx diff --git a/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-arize.mdx b/zh-hans/documentation/pages/monitor/integrate-arize.mdx similarity index 100% rename from zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-arize.mdx rename to zh-hans/documentation/pages/monitor/integrate-arize.mdx diff --git a/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.mdx b/zh-hans/documentation/pages/monitor/integrate-langfuse.mdx similarity index 100% rename from zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-langfuse.mdx rename to zh-hans/documentation/pages/monitor/integrate-langfuse.mdx diff --git a/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.mdx b/zh-hans/documentation/pages/monitor/integrate-langsmith.mdx similarity index 100% rename from zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-langsmith.mdx rename to zh-hans/documentation/pages/monitor/integrate-langsmith.mdx diff --git a/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-opik.mdx b/zh-hans/documentation/pages/monitor/integrate-opik.mdx similarity index 100% rename from zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-opik.mdx rename to zh-hans/documentation/pages/monitor/integrate-opik.mdx diff --git a/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-phoenix.mdx b/zh-hans/documentation/pages/monitor/integrate-phoenix.mdx similarity index 100% rename from zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-phoenix.mdx rename to zh-hans/documentation/pages/monitor/integrate-phoenix.mdx diff --git a/zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-weave.mdx b/zh-hans/documentation/pages/monitor/integrate-weave.mdx similarity index 100% rename from zh-hans/guides/monitoring/integrate-external-ops-tools/integrate-weave.mdx rename to zh-hans/documentation/pages/monitor/integrate-weave.mdx diff --git a/zh-hans/guides/annotation/logs.mdx b/zh-hans/documentation/pages/monitor/logs.mdx similarity index 100% rename from zh-hans/guides/annotation/logs.mdx rename to zh-hans/documentation/pages/monitor/logs.mdx diff --git a/zh-hans/guides/workflow/node/agent.mdx b/zh-hans/documentation/pages/nodes/agent.mdx similarity index 100% rename from zh-hans/guides/workflow/node/agent.mdx rename to zh-hans/documentation/pages/nodes/agent.mdx diff --git a/zh-hans/guides/workflow/node/answer.mdx b/zh-hans/documentation/pages/nodes/answer.mdx similarity index 100% rename from zh-hans/guides/workflow/node/answer.mdx rename to zh-hans/documentation/pages/nodes/answer.mdx diff --git a/zh-hans/guides/workflow/node/code.mdx b/zh-hans/documentation/pages/nodes/code.mdx similarity index 100% rename from zh-hans/guides/workflow/node/code.mdx rename to zh-hans/documentation/pages/nodes/code.mdx diff --git a/zh-hans/guides/workflow/node/doc-extractor.mdx b/zh-hans/documentation/pages/nodes/doc-extractor.mdx similarity index 100% rename from zh-hans/guides/workflow/node/doc-extractor.mdx rename to zh-hans/documentation/pages/nodes/doc-extractor.mdx diff --git a/zh-hans/guides/workflow/node/end.mdx b/zh-hans/documentation/pages/nodes/end.mdx similarity index 100% rename from zh-hans/guides/workflow/node/end.mdx rename to zh-hans/documentation/pages/nodes/end.mdx diff --git a/zh-hans/guides/workflow/node/http-request.mdx b/zh-hans/documentation/pages/nodes/http-request.mdx similarity index 100% rename from zh-hans/guides/workflow/node/http-request.mdx rename to zh-hans/documentation/pages/nodes/http-request.mdx diff --git a/zh-hans/guides/workflow/node/ifelse.mdx b/zh-hans/documentation/pages/nodes/ifelse.mdx similarity index 100% rename from zh-hans/guides/workflow/node/ifelse.mdx rename to zh-hans/documentation/pages/nodes/ifelse.mdx diff --git a/zh-hans/guides/workflow/node/iteration.mdx b/zh-hans/documentation/pages/nodes/iteration.mdx similarity index 100% rename from zh-hans/guides/workflow/node/iteration.mdx rename to zh-hans/documentation/pages/nodes/iteration.mdx diff --git a/zh-hans/guides/workflow/node/knowledge-retrieval.mdx b/zh-hans/documentation/pages/nodes/knowledge-retrieval.mdx similarity index 100% rename from zh-hans/guides/workflow/node/knowledge-retrieval.mdx rename to zh-hans/documentation/pages/nodes/knowledge-retrieval.mdx diff --git a/zh-hans/guides/workflow/node/list-operator.mdx b/zh-hans/documentation/pages/nodes/list-operator.mdx similarity index 100% rename from zh-hans/guides/workflow/node/list-operator.mdx rename to zh-hans/documentation/pages/nodes/list-operator.mdx diff --git a/zh-hans/guides/workflow/node/llm.mdx b/zh-hans/documentation/pages/nodes/llm.mdx similarity index 100% rename from zh-hans/guides/workflow/node/llm.mdx rename to zh-hans/documentation/pages/nodes/llm.mdx diff --git a/zh-hans/guides/workflow/node/loop.mdx b/zh-hans/documentation/pages/nodes/loop.mdx similarity index 100% rename from zh-hans/guides/workflow/node/loop.mdx rename to zh-hans/documentation/pages/nodes/loop.mdx diff --git a/zh-hans/guides/workflow/node/parameter-extractor.mdx b/zh-hans/documentation/pages/nodes/parameter-extractor.mdx similarity index 100% rename from zh-hans/guides/workflow/node/parameter-extractor.mdx rename to zh-hans/documentation/pages/nodes/parameter-extractor.mdx diff --git a/zh-hans/guides/workflow/node/question-classifier.mdx b/zh-hans/documentation/pages/nodes/question-classifier.mdx similarity index 100% rename from zh-hans/guides/workflow/node/question-classifier.mdx rename to zh-hans/documentation/pages/nodes/question-classifier.mdx diff --git a/zh-hans/guides/workflow/node/start.mdx b/zh-hans/documentation/pages/nodes/start.mdx similarity index 100% rename from zh-hans/guides/workflow/node/start.mdx rename to zh-hans/documentation/pages/nodes/start.mdx diff --git a/zh-hans/guides/workflow/node/template.mdx b/zh-hans/documentation/pages/nodes/template.mdx similarity index 100% rename from zh-hans/guides/workflow/node/template.mdx rename to zh-hans/documentation/pages/nodes/template.mdx diff --git a/zh-hans/guides/workflow/node/tools.mdx b/zh-hans/documentation/pages/nodes/tools.mdx similarity index 100% rename from zh-hans/guides/workflow/node/tools.mdx rename to zh-hans/documentation/pages/nodes/tools.mdx diff --git a/zh-hans/guides/workflow/node/variable-aggregator.mdx b/zh-hans/documentation/pages/nodes/variable-aggregator.mdx similarity index 100% rename from zh-hans/guides/workflow/node/variable-aggregator.mdx rename to zh-hans/documentation/pages/nodes/variable-aggregator.mdx diff --git a/zh-hans/guides/workflow/node/variable-assigner.mdx b/zh-hans/documentation/pages/nodes/variable-assigner.mdx similarity index 100% rename from zh-hans/guides/workflow/node/variable-assigner.mdx rename to zh-hans/documentation/pages/nodes/variable-assigner.mdx diff --git a/zh-hans/guides/application-publishing/launch-your-webapp-quickly/conversation-application.mdx b/zh-hans/documentation/pages/publish/chatflow-webapp.mdx similarity index 100% rename from zh-hans/guides/application-publishing/launch-your-webapp-quickly/conversation-application.mdx rename to zh-hans/documentation/pages/publish/chatflow-webapp.mdx diff --git a/zh-hans/guides/application-publishing/developing-with-apis.mdx b/zh-hans/documentation/pages/publish/developing-with-apis.mdx similarity index 100% rename from zh-hans/guides/application-publishing/developing-with-apis.mdx rename to zh-hans/documentation/pages/publish/developing-with-apis.mdx diff --git a/zh-hans/guides/application-publishing/embedding-in-websites.mdx b/zh-hans/documentation/pages/publish/embedding-in-websites.mdx similarity index 100% rename from zh-hans/guides/application-publishing/embedding-in-websites.mdx rename to zh-hans/documentation/pages/publish/embedding-in-websites.mdx diff --git a/zh-hans/guides/application-publishing/publish-mcp.mdx b/zh-hans/documentation/pages/publish/publish-mcp.mdx similarity index 100% rename from zh-hans/guides/application-publishing/publish-mcp.mdx rename to zh-hans/documentation/pages/publish/publish-mcp.mdx diff --git a/zh-hans/guides/application-publishing/launch-your-webapp-quickly/web-app-settings.mdx b/zh-hans/documentation/pages/publish/web-app-settings.mdx similarity index 100% rename from zh-hans/guides/application-publishing/launch-your-webapp-quickly/web-app-settings.mdx rename to zh-hans/documentation/pages/publish/web-app-settings.mdx diff --git a/zh-hans/guides/application-publishing/launch-your-webapp-quickly/text-generator.mdx b/zh-hans/documentation/pages/publish/workflow-webapp.mdx similarity index 100% rename from zh-hans/guides/application-publishing/launch-your-webapp-quickly/text-generator.mdx rename to zh-hans/documentation/pages/publish/workflow-webapp.mdx diff --git a/zh-hans/workshop/intermediate/article-reader.mdx b/zh-hans/documentation/pages/tutorials/article-reader.mdx similarity index 100% rename from zh-hans/workshop/intermediate/article-reader.mdx rename to zh-hans/documentation/pages/tutorials/article-reader.mdx diff --git a/zh-hans/workshop/basic/build-ai-image-generation-app.mdx b/zh-hans/documentation/pages/tutorials/build-ai-image-generation-app.mdx similarity index 100% rename from zh-hans/workshop/basic/build-ai-image-generation-app.mdx rename to zh-hans/documentation/pages/tutorials/build-ai-image-generation-app.mdx diff --git a/zh-hans/workshop/intermediate/customer-service-bot.mdx b/zh-hans/documentation/pages/tutorials/customer-service-bot.mdx similarity index 100% rename from zh-hans/workshop/intermediate/customer-service-bot.mdx rename to zh-hans/documentation/pages/tutorials/customer-service-bot.mdx diff --git a/zh-hans/workshop/intermediate/twitter-chatflow.mdx b/zh-hans/documentation/pages/tutorials/twitter-chatflow.mdx similarity index 100% rename from zh-hans/workshop/intermediate/twitter-chatflow.mdx rename to zh-hans/documentation/pages/tutorials/twitter-chatflow.mdx diff --git a/zh-hans/guides/management/app-management.mdx b/zh-hans/documentation/pages/workspace/app-management.mdx similarity index 100% rename from zh-hans/guides/management/app-management.mdx rename to zh-hans/documentation/pages/workspace/app-management.mdx diff --git a/zh-hans/guides/workspace/app.mdx b/zh-hans/documentation/pages/workspace/app.mdx similarity index 100% rename from zh-hans/guides/workspace/app.mdx rename to zh-hans/documentation/pages/workspace/app.mdx diff --git a/zh-hans/guides/management/personal-account-management.mdx b/zh-hans/documentation/pages/workspace/personal-account-management.mdx similarity index 100% rename from zh-hans/guides/management/personal-account-management.mdx rename to zh-hans/documentation/pages/workspace/personal-account-management.mdx diff --git a/zh-hans/guides/model-configuration/readme.mdx b/zh-hans/documentation/pages/workspace/readme.mdx similarity index 100% rename from zh-hans/guides/model-configuration/readme.mdx rename to zh-hans/documentation/pages/workspace/readme.mdx diff --git a/zh-hans/guides/management/subscription-management.mdx b/zh-hans/documentation/pages/workspace/subscription-management.mdx similarity index 100% rename from zh-hans/guides/management/subscription-management.mdx rename to zh-hans/documentation/pages/workspace/subscription-management.mdx diff --git a/zh-hans/guides/management/team-members-management.mdx b/zh-hans/documentation/pages/workspace/team-members-management.mdx similarity index 100% rename from zh-hans/guides/management/team-members-management.mdx rename to zh-hans/documentation/pages/workspace/team-members-management.mdx diff --git a/zh-hans/guides/application-publishing/launch-your-webapp-quickly/readme.mdx b/zh-hans/guides/application-publishing/launch-your-webapp-quickly/readme.mdx deleted file mode 100644 index 9fe8afe8..00000000 --- a/zh-hans/guides/application-publishing/launch-your-webapp-quickly/readme.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: 发布为公开 Web 站点 ---- - -使用 Dify 创建 AI 应用的一个好处在于,你可以在几分钟内就发布一个可供用户在互联网上公开访问的 Web 应用,该应用将根据你的 Prompt 和编排设置进行工作。 - -* 如果你使用的是自部署的开源版,该应用将运行在你的服务器上 -* 如果你使用的是云服务,该应用将托管至网址 [https://udify.app/](https://udify.app/) - -*** - -### 发布 AI 站点 - -在应用监测页中,你可以找到 WebApp 的管理卡片。打开访问开关后,你可以得到一个能够在互联网上公开分享的网址。 - -![](https://assets-docs.dify.ai/2025/03/40a972bc270777a3bedd1b2bc5d34114.png) - -我们对以下两种应用类型均预置了漂亮的 WebApp 界面: - -* 文本生成型([前往预览](./text-generator)) -* 对话型([前往预览](./conversation-application)) - -*** - -### 设置你的 AI 站点 - -点击 WebApp 卡片上的**设置**按钮,为 AI 站点配置一些选项,它们都会被最终用户所见: - -![](https://assets-docs.dify.ai/2025/04/2985d21d7e186c01a8d700378246b9a1.png) - - -界面语言目前已支持:英文,中文,繁体中文,葡萄牙语,德语,日本语,韩语,乌克兰语,越南语。如果你需要增加更多语言,可以在 GitHub 内提交 Issue[ 寻求支持](/zh-hans/community/support)或者提交 PR 贡献代码。 - - -*** - -### 嵌入你的 AI 站点 - -除了将应用发布为一个公开的 AI 网站,你还可以将它嵌入并集成至你的网站、博客或其它任意网页中。详细说明请参考 [《嵌入网站》](/zh-hans/guides/application-publishing/embedding-in-websites)。 - -{/* -Contributing Section -DO NOT edit this section! -It will be automatically generated by the script. -*/} - ---- - -[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/zh-hans/guides/application-publishing/launch-your-webapp-quickly/readme.mdx) | [提交问题](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/zh-hans/guides/management/version-control.mdx b/zh-hans/guides/management/version-control.mdx deleted file mode 100644 index a0766822..00000000 --- a/zh-hans/guides/management/version-control.mdx +++ /dev/null @@ -1,203 +0,0 @@ ---- -title: 版本管理 ---- - -## 简介 - -版本管理是 **Dify 聊天流/工作流管理界面** 中的一项核心功能,用于帮助用户高效地管理和发布应用的多个版本。 - -通过版本管理功能,用户可以清晰地区分应用的**草稿版本**和**已发布版本**,并在需要时回滚到**历史版本**。该功能可以让应用的迭代和管理更为简便和直观,确保应用的持续更新与稳定性。 - -## 相关定义 - -- **草稿版本(Current Draft)**: 草稿版本是 Dify 聊天流/工作流管理界面中**唯一呈现当前工作进度的版本**。用户可在此版本中编辑、修改与预览聊天流/工作流。 - -current_draft - -- **已发布版本(Published Version)**: 用户发布到线上的所有版本,即最新发布版本和历史发布版本的统称。每一次发布操作都会生成一个新的已发布版本。 - -- **最新发布版本(Latest Version)**: 用户最近一次发布到线上的版本。Dify 在版本管理界面中将其标记为 `Latest` ,以便与其他历史发布版本区分。 - -latest_version - -- **历史发布版本(Previous Version)**: 用户曾经发布过,但现在已经不再处于当前线上状态的版本。 - -prevous_version - -- **版本回滚(Restore)**: 版本管理中的版本回滚功能允许用户将应用恢复到某个历史版本。 - -restore - -## 功能 - -- **查看所有版本**:在版本管理界面中,你可以查看所有已发布的版本,了解每个版本的详细信息。 - -- **查找所需版本**: 你可以使用筛选功能快速查找所需的特定版本。 - -- **发布新版本**: 你可以发布一个新的应用版本,并为该版本创建相应的版本名和版本描述。 - -- **编辑已发布版本的信息**: 你可以编辑已发布版本的版本名和版本描述。 - -- **删除历史版本**: 你可以删除不再需要的历史版本,清理版本列表。 - -- **回滚到历史版本**: 通过版本回滚功能,你可以将历史版本的内容加载到草稿中并进行修改。 - -## 如何查看所有版本? - -1. 点击右上角的 **版本管理功能** 按钮,进入版本管理界面。 - -![view_all_versions](https://assets-docs.dify.ai/2025/03/eed667bbc9498425342c09039054cf98.png) - -2. 版本管理界面显示了一个按时间倒序排列的版本列表。你可以在列表内查看过往版本的 **版本名、版本信息、发布时间、发布者**。 - -3. *(可选)* 如果版本列表超过当前可见的数量,你可以点击 **加载更多** 按钮,加载更多的版本记录。 - -![load_more](https://assets-docs.dify.ai/2025/03/df9aeb06128f11089dc2294f0338e2ca.png) - -## 如何查找我需要的版本? - -- **查找由我发布的版本**: 点击 **筛选** 按钮,弹出筛选框。该筛选框有两个选项: - - - **所有版本**: 显示所有版本,包括你自己和其他用户发布的版本。 - - **由我发布的版本**: 仅显示由你发布的版本。 - - 你可以根据需要选择合适的筛选项,以查看对应的版本。 - -all_or_only_yours - -- **查找已命名的版本**: 如果你只想查看已命名的版本,可以点击 **查找已命名的版本** 选项。启用该选项后,只有已命名版本会出现在版本列表中,其他未命名的版本将被隐藏。 - -only_show_named_versions - -## 如何发布新版本? - -1. 在 Dify 聊天流/工作流管理界面中完成聊天流/工作流创建后,点击面板的右上角的 **发布 > 发布更新** 按钮,即可直接发布当前版本。 - -![publish_new_version](https://assets-docs.dify.ai/2025/03/26f3f324ab4ecb965708d553ddd78d97.png) - -2. 发布后,此最新发布版本将被标记为 `Latest` 。相关信息会显示在版本管理界面中。 - -![latest_version_marked](https://assets-docs.dify.ai/2025/03/67e95de17577bc272addad6c33f8ea59.png) - -## 如何编辑已发布版本的信息? - -1. 在版本管理界面,找到你需要编辑版本信息的版本,并点击该版本右上角的操作菜单。 - -- 如果你之前以默认名称保存了该版本,可以点击 **命名此版本**,更新版本名与版本信息。 - -edit_version_info_1 - -- 如果你已经为该版本填写过版本名,可以点击 **编辑版本信息** 修改版本名与版本信息。 - -edit_version_info_1 - -2. 点击 **发布**,发布版本信息。 - -![edit_version_info_2](https://assets-docs.dify.ai/2025/03/838e5a12aa277bada6c2a4a214450fa5.jpg) - -## 如何删除历史版本? - -1. 在版本管理界面,找到你需要删除的已发布版本,点击该版本右上角的操作菜单。 - -2. 选择 **删除**,弹出确认操作的弹窗。 - -delete_version - -3. 点击 **删除**,该版本将从版本管理界面中删除。 - -![delete_version_confirm](https://assets-docs.dify.ai/2025/03/9326fd0463d024aac1907c83a37fe13b.jpg) - - -- **草稿版本**(即 Current Draft)为当前聊天流 / 工作流界面正在编辑的草稿版本,无法删除。 -- **最新发布版本**(即标记为 Latest 的版本)为用户最近一次发布到线上的版本,无法删除。 - - -## 如何回滚到某个已发布版本? - -1. 在版本管理界面,找到你需要回滚的历史版本,点击该版本右上角的操作菜单。 - -2. 选择 **回滚**,弹出确认操作的弹窗。 - -restore_version - -3. 点击 **回滚**,当前的草稿版本将回滚为该历史版本。 - -![restore_version_confirm](https://assets-docs.dify.ai/2025/03/f3a6e13f2e910f5c7917f52fe77bdfca.jpg) - -## 使用场景 - -以下用一个典型的用户使用场景来说明各版本之间的联系。 - -> 相同颜色代表相同的版本内容。 - -### 阶段一 - -- 系统自动新建 **草稿版本** Version A。 - -![phase 1](https://assets-docs.dify.ai/2025/03/35ece9d5d5d4d8c46a3fb5ceae4d0c15.jpeg) - -### 阶段二:首次发布 - -- Version A 发布,成为 **最新发布版本**。 -- 系统自动新建 **草稿版本** Version B。 - -![phase 2](https://assets-docs.dify.ai/2025/03/3d1f66cdeb08710f01462a6b0f3ed0a8.jpeg) - -### 阶段三:再次发布 - -- Version B 发布,成为 **最新发布版本**。 -- Version A 成为 **历史发布版本**。 -- 系统自动新建 **草稿版本** Version C。 - -![phase 3](https://assets-docs.dify.ai/2025/03/92ffbf88a3cbeeeeab47c1bd8b4f7198.jpeg) - -### 阶段四:回滚操作 - -- Version A 回滚至 **草稿版本**,覆盖 Version C。 -- Version B 仍为 **最新发布版本**。 - -![phase 4](https://assets-docs.dify.ai/2025/03/541f1891416af90dab5b51bfec833249.jpeg) - -### 阶段五:发布回滚 - -- Version A(回滚版)发布,成为 **最新发布版本**。 -- Version A 与 Version B 成为 **历史发布版本**。 -- 系统自动新建 **草稿版本** Version D。 - -![phase 5](https://assets-docs.dify.ai/2025/03/3572a4f2edef166c3f14e4ec4e68b297.jpeg) - -### 全流程演示 - -![workflow](https://assets-docs.dify.ai/2025/03/dc7c15a4dfafb72ce7fffea294d5b5e5.gif) - -## FAQ - -- **草稿版本、已发布版本、最新发布版本和历史发布版本有什么区别?** - -| 定义 | 操作方式 | 是否可以从线上访问 | 是否可以删除 | 是否可以回滚 | -|-----|---------|------------------|------------|------------| -| 草稿版本 | 当前正在编辑和修改的版本,代表用户的最新工作进度。 | 只能通过 发布 (Publish) 操作推送至线上环境。 | 不可以从线上访问,必须通过发布操作将其推送为最新发布版本才可以从线上访问。 | 无法删除。 | -| 最新发布版本 | 目前线上生效的版本,是最新的已发布版本。 | 是当前线上的版本,不能直接编辑,需通过发布新的草稿版本来更新。 | 可以从线上访问和使用。 | 可以通过回滚操作恢复到该版本内容。 | -| 历史发布版本 | 过去已发布并保存的版本,用户可回滚使用,但不再对外生效。 | 可以通过 回滚 (Restore) 操作将历史版本加载到草稿版本中,再进行编辑和发布。 | 不可以从线上访问,仅保存在版本列表里。 | 可以通过回滚操作恢复到该版本内容。 | -| 已发布版本 | 最新发布版本和历史发布版本的统称。 | / | / | / | - -- **回滚到历史版本后,当前的草稿版本会丢失吗?** - -当你选择回滚到历史版本后,系统会将你选择的历史版本的内容加载到新的草稿版本中。你可以继续在该草稿上进行修改并发布。 - -因此,回滚到历史版本后,当前的草稿版本将会丢失。请谨慎操作。 - -- **版本管理功能适用于哪些应用类型?** - -目前,版本管理功能仅适用于 **聊天流** 和 **工作流** 应用类型。**聊天助手**、**文本生成应用** 以及 **Agent** 暂不支持此功能。 - -{/* -Contributing Section -DO NOT edit this section! -It will be automatically generated by the script. -*/} - ---- - -[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/zh-hans/guides/management/version-control.mdx) | [提交问题](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/zh-hans/guides/monitoring/README.mdx b/zh-hans/guides/monitoring/README.mdx index d8bd1a03..d739a695 100644 --- a/zh-hans/guides/monitoring/README.mdx +++ b/zh-hans/guides/monitoring/README.mdx @@ -1,10 +1,12 @@ +> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处,请参考[英文原版](../../../en/guides/monitoring/README.mdx)。 + --- -title: 监测 +title: 仪表盘 --- -你可以在 **概览** 内监控、跟踪应用程序在生产环境中的性能,在数据分析仪表盘内分析生产环境中应用的使用成本、延迟、用户反馈、性能等指标,并通过持续调试、迭代不断改进你的应用程序。 +你可以在 **概览** 部分监控和追踪你的应用在生产环境中的性能表现。在数据分析仪表盘中,你可以分析各项指标,如用量成本、延迟、用户反馈以及在生产环境中的性能。通过持续的调试和迭代,你可以不断改进你的应用。 -![](https://assets-docs.dify.ai/2025/03/57814ba88e96305d0c92c68b1b5ea20e.png) +![](https://assets-docs.dify.ai/2025/04/7b1c25b1f6d5e95d46056285abb079f5.png) {/* Contributing Section @@ -14,5 +16,4 @@ It will be automatically generated by the script. --- -[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/zh-hans/guides/monitoring/README.mdx) | [提交问题](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - +[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/en/guides/monitoring/README.mdx) | [报告问题](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) \ No newline at end of file diff --git a/zh-hans/guides/workflow/orchestrate-node.mdx b/zh-hans/guides/workflow/orchestrate-node.mdx deleted file mode 100644 index b0d6dd23..00000000 --- a/zh-hans/guides/workflow/orchestrate-node.mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: 编排节点 ---- - -Chatflow 和 Workflow 类型应用内的节点均可以通过可视化拖拉拽的形式进行编排,支持**串行**和**并行**两种编排设计模式。 - - - 串行和并行节点流对比图 - - -## 串行设计 - -该结构要求节点按照预设顺序依次执行,每个节点需等待前一个节点完成并输出结果后才能开始工作,有助于**确保任务按照逻辑顺序执行。** - -例如,在一个采用串行结构设计的"小说生成" AI 应用内,用户输入小说风格、节奏和角色后,LLM 按照顺序补全小说大纲、小说剧情和结尾;每个节点都基于前一个节点的输出结果展开工作,确保小说的风格一致性。 - -### 设计串行结构 - -点击两个节点中间连线的 + 号即可在中间添加一个串行节点;按照顺序将节点依次串线连接,最后将线收拢至 **"结束"节点**(Workflow)/ **"直接回复"节点**(Chatflow)完成设计。 - - - 串行结构设计示意图 - - -### 查看串行结构应用日志 - -串行结构应用内的日志将按照顺序展示各个节点的运行情况。点击对话框右上角的 「查看日志-追踪」,查看工作流完整运行过程各节点的输入 / 输出、Token 消耗、运行时长等。 - - - 串行结构应用日志界面 - - -## 并行设计 - -该设计模式允许多个节点在同一时间内共同执行,前置节点可以同时触发位于并行结构内的多个节点。并行结构内的节点不存在依赖关系,能够同时执行任务,更好地提升**节点的任务执行效率。** - -例如,在某个并行设计的翻译工作流应用内,用户输入源文本触发工作流后,位于并行结构内的节点将共同收到前置节点的流转指令,同时开展多语言的翻译任务,缩短任务的处理耗时。 - - - 并行设计示意图 - - -### 新建并行结构 - -你可以参考以下四种方式,通过新建节点或拖拽的方式创建并行结构。 - -**方式 1** - -将鼠标 Hover 至某个节点,显示 `+` 按钮,支持新建多个节点,创建后自动形成并行结构。 - - - 新建并行结构方式1 - - -**方式 2** - -拖拽节点末尾的 `+` 按钮,拉出连线形成并行结构。 - - - 新建并行结构方式2 - - -**方式 3** - -如果画布存在多个节点,通过可视化拖拽的方式组成并行结构。 - - - 新建并行结构方式3 - - -**方式 4** - -除了在画布中通过直接添加并行节点或可视化拖拽方式组成并行结构,你也可以在节点右侧清单的"下一步"中添加并行节点,自动生成并行结构。 - - - 新建并行结构方式4 - - -**Tips:** - -* 画布上的"线"可以被删除; -* 并行结构的下游节点可以是任意节点; -* 在 Workflow 类型应用内需确定唯一的 "end" 节点; -* Chatflow 类型应用支持添加多个 **"直接回复"** 节点,该类型应用内的所有并行结构在末尾处均需要配置 **"直接回复"** 节点才能正常输出各个并行结构里的内容; -* 所有的并行结构都会同时运行;并行结构内的节点处理完任务后即输出结果,**输出结果时不存在顺序关系**。并行结构越简单,输出结果的速度越快。 - - - Chatflow 应用中的并行结构示例 - - -### 设计并行结构应用 - -下文将展示四种常见的并行节点设计思路。 - -1. **普通并行** - -普通并行指的是 `开始 | 并行结构 | 结束` 三层关系也是并行结构的最小单元。这种结构较为直观,用户输入内容后,工作流能同时执行多条任务。 - -> 并行分支的上限数为 10 个。 - - - 普通并行结构示例 - - -2. **嵌套并行** - -嵌套并行指的是 `开始 | 多个并行结构 | 结束`多层关系,它适用于内部较为复杂的工作流,例如需要在某个节点内请求外部 API,将返回的结果同时交给下游节点处理。 - -一个工作流内最多支持 3 层嵌套关系。 - - - 嵌套并行结构示例 - - -3. **条件分支 + 并行** - -并行结构也可以和条件分支共同使用。 - - - 条件分支和并行结构结合示例 - - -4. **迭代分支 + 并行** - -迭代分支内同样支持编排并行结构,加速迭代内各节点的执行效率。 - - - 迭代分支和并行结构结合示例 - - -### 查看并行结构应用日志 - -包含并行结构的应用的运行日志支持以树状结构进行展示,你可以折叠并行节点组以更好地查看各个节点的运行日志。 - - - 并行结构应用日志界面 - - -{/* -Contributing Section -DO NOT edit this section! -It will be automatically generated by the script. -*/} - ---- - -[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/zh-hans/guides/workflow/orchestrate-node.mdx) | [提交问题](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/zh-hans/guides/workflow/shortcut-key.mdx b/zh-hans/guides/workflow/shortcut-key.mdx deleted file mode 100644 index 01535b8a..00000000 --- a/zh-hans/guides/workflow/shortcut-key.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: 快捷键 ---- - -Chatflow / Workflow 应用编排页支持以下快捷键,帮助你提升编排节点的效率。 - -| Windows | macOS | 说明 | -| ---------------- | ------------------- | ------------- | -| Ctrl + C | Command + C | 复制节点 | -| Ctrl + V | Command + V | 粘贴节点 | -| Ctrl + D | Command + D | 复制并新建节点 | -| Ctrl + O | Command + O | 整理节点 | -| Ctrl + Z | Command + Z | 撤销 | -| Ctrl + Y | Command + Y | 重做 | -| Ctrl + Shift + Z | Command + Shift + Z | 重做 | -| Ctrl + 1 | Command + 1 | 画布适合视图 | -| Ctrl + (-) | Command + (-) | 画布缩小 | -| Ctrl + (=) | Command + (=) | 画布放大 | -| Shift + 1 | Shift + 1 | 将画布视图重置为 100% | -| Shift + 5 | Shift + 5 | 将画布缩放至 50% | -| H | H | 画布切换至手动模式 | -| V | V | 画布切换至指针模式 | -| Delete/Backspace | Delete/Backspace | 删除选定节点 | -| Alt + R | Option + R | 工作流开始运行 | - -{/* -Contributing Section -DO NOT edit this section! -It will be automatically generated by the script. -*/} - ---- - -[编辑此页面](https://github.com/langgenius/dify-docs/edit/main/zh-hans/guides/workflow/shortcut-key.mdx) | [提交问题](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml) - diff --git a/zh-hans/getting-started/cloud.mdx b/zh-hans/self-hosting/cloud.mdx similarity index 100% rename from zh-hans/getting-started/cloud.mdx rename to zh-hans/self-hosting/cloud.mdx diff --git a/zh-hans/getting-started/install-self-hosted/bt-panel.mdx b/zh-hans/self-hosting/dify-community/bt-panel.mdx similarity index 100% rename from zh-hans/getting-started/install-self-hosted/bt-panel.mdx rename to zh-hans/self-hosting/dify-community/bt-panel.mdx diff --git a/zh-hans/getting-started/install-self-hosted/docker-compose.mdx b/zh-hans/self-hosting/dify-community/docker-compose.mdx similarity index 100% rename from zh-hans/getting-started/install-self-hosted/docker-compose.mdx rename to zh-hans/self-hosting/dify-community/docker-compose.mdx diff --git a/zh-hans/getting-started/install-self-hosted/environments.mdx b/zh-hans/self-hosting/dify-community/environments.mdx similarity index 100% rename from zh-hans/getting-started/install-self-hosted/environments.mdx rename to zh-hans/self-hosting/dify-community/environments.mdx diff --git a/zh-hans/getting-started/install-self-hosted/local-source-code.mdx b/zh-hans/self-hosting/dify-community/local-source-code.mdx similarity index 100% rename from zh-hans/getting-started/install-self-hosted/local-source-code.mdx rename to zh-hans/self-hosting/dify-community/local-source-code.mdx diff --git a/zh-hans/getting-started/install-self-hosted/readme.mdx b/zh-hans/self-hosting/dify-community/readme.mdx similarity index 100% rename from zh-hans/getting-started/install-self-hosted/readme.mdx rename to zh-hans/self-hosting/dify-community/readme.mdx diff --git a/zh-hans/getting-started/install-self-hosted/start-the-frontend-docker-container.mdx b/zh-hans/self-hosting/dify-community/start-the-frontend-docker-container.mdx similarity index 100% rename from zh-hans/getting-started/install-self-hosted/start-the-frontend-docker-container.mdx rename to zh-hans/self-hosting/dify-community/start-the-frontend-docker-container.mdx diff --git a/zh-hans/getting-started/dify-for-education.mdx b/zh-hans/self-hosting/dify-for-education.mdx similarity index 100% rename from zh-hans/getting-started/dify-for-education.mdx rename to zh-hans/self-hosting/dify-for-education.mdx diff --git a/zh-hans/getting-started/dify-premium.mdx b/zh-hans/self-hosting/dify-premium.mdx similarity index 100% rename from zh-hans/getting-started/dify-premium.mdx rename to zh-hans/self-hosting/dify-premium.mdx diff --git a/zh-hans/learn-more/faq/install-faq.mdx b/zh-hans/self-hosting/install-faq.mdx similarity index 100% rename from zh-hans/learn-more/faq/install-faq.mdx rename to zh-hans/self-hosting/install-faq.mdx diff --git a/zh-hans/openapi-api-access-readme.mdx b/zh-hans/self-hosting/openapi-api-access-readme.mdx similarity index 100% rename from zh-hans/openapi-api-access-readme.mdx rename to zh-hans/self-hosting/openapi-api-access-readme.mdx