From bb1d1e050324114dfed45191ad9398db0102d89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Fri, 12 Dec 2025 14:13:19 +0800 Subject: [PATCH] Fix the order number of the documents. (#594) * Fix the order number of the documents. * fix the zh and jp docs as well --------- Co-authored-by: Riskey --- .../dev-guides-and-walkthroughs/cheatsheet.mdx | 2 +- .../develop-a-slack-bot-plugin.mdx | 10 +++++----- .../develop-flomo-plugin.mdx | 2 +- .../dev-guides-and-walkthroughs/tool-plugin.mdx | 2 +- en/develop-plugin/getting-started/cli.mdx | 2 -- .../dev-guides-and-walkthroughs/cheatsheet.mdx | 2 +- .../develop-a-slack-bot-plugin.mdx | 10 +++++----- .../develop-flomo-plugin.mdx | 2 +- .../dev-guides-and-walkthroughs/tool-plugin.mdx | 2 +- ja/develop-plugin/getting-started/cli.mdx | 2 -- .../dev-guides-and-walkthroughs/cheatsheet.mdx | 2 +- .../develop-a-slack-bot-plugin.mdx | 10 +++++----- .../develop-flomo-plugin.mdx | 2 +- .../dev-guides-and-walkthroughs/tool-plugin.mdx | 2 +- zh/develop-plugin/getting-started/cli.mdx | 2 -- 15 files changed, 24 insertions(+), 30 deletions(-) diff --git a/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx b/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx index 2647dbb2..f7cf9355 100644 --- a/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx +++ b/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx @@ -95,7 +95,7 @@ python -m main > Learn more: [Remote Debugging Plugins](/en/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin) -#### 4. Packaging and Deployment +#### 3. Packaging and Deployment Package the plugin: diff --git a/en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx b/en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx index 143fb6dc..cb243aba 100644 --- a/en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx +++ b/en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx @@ -161,7 +161,7 @@ extra: source: "endpoints/slack.py" ``` -#### 2. Edit the function code +### 2. Edit the function code Modify the `endpoints/slack.py` file and add the following code: @@ -240,7 +240,7 @@ class SlackEndpoint(Endpoint): return Response(status=200, response="ok") ``` -### 2. Debug the Plugin +### 3. Debug the Plugin Go to the Dify platform and obtain the remote debugging address and key for your plugin. @@ -291,7 +291,7 @@ Next, complete the Slack App setup: --- -### 3. Verify the Plugin +### 4. Verify the Plugin In your code, `self.session.app.chat.invoke` is used to call the Dify application, passing in parameters such as `app_id` and `query`. The response is then returned to the Slack Bot. Run `python -m main` again to restart your plugin for debugging, and check whether Slack correctly displays the Dify App’s reply: @@ -299,7 +299,7 @@ In your code, `self.session.app.chat.invoke` is used to call the Dify applicatio --- -### 4. Package the Plugin (Optional) +### 5. Package the Plugin (Optional) Once you confirm that the plugin works correctly, you can package and name it via the following command. After it runs, you’ll find a `slack_bot.difypkg` file in the current directory—your final plugin package. For detailed packaging steps, refer to [Package as a Local File and Share](/en/develop-plugin/publishing/marketplace-listing/release-by-file). @@ -313,7 +313,7 @@ Congratulations! You’ve successfully developed, tested, and packaged a plugin! --- -### 5. Publish the Plugin (Optional) +### 6. Publish the Plugin (Optional) You can now upload it to the [Dify Marketplace repository](https://github.com/langgenius/dify-plugins) for public release. Before publishing, ensure your plugin meets the [Publishing to Dify Marketplace Guidelines](/en/develop-plugin/publishing/marketplace-listing/release-to-dify-marketplace). Once approved, your code is merged into the main branch, and the plugin goes live on the [Dify Marketplace](https://marketplace.dify.ai/). diff --git a/en/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx b/en/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx index c6e4ec9c..848c6f24 100644 --- a/en/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx +++ b/en/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx @@ -285,7 +285,7 @@ Always handle exceptions gracefully and return user-friendly error messages. Rem -## Step 9: Package and distribute +## Step 8: Package and distribute When you're ready to share your plugin: diff --git a/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx b/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx index 0b172328..38ffb9af 100644 --- a/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx +++ b/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx @@ -291,7 +291,7 @@ class GoogleSearchTool(Tool): This example means requesting `serpapi` and using `self.create_json_message` to return a formatted `json` data string. If you want to learn more about return data types, you can refer to the [Remote Debugging Plugins](/en/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin) and [Persistent Storage KV](/en/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv) documents. -#### 4. Completing the Tool Provider Code +#### 5. Completing the Tool Provider Code Finally, you need to create an implementation code for the provider to implement the credential validation logic. If credential validation fails, a `ToolProviderCredentialValidationError` exception will be thrown. After validation succeeds, the `google_search` tool service will be correctly requested. diff --git a/en/develop-plugin/getting-started/cli.mdx b/en/develop-plugin/getting-started/cli.mdx index a3625611..e0935ff6 100644 --- a/en/develop-plugin/getting-started/cli.mdx +++ b/en/develop-plugin/getting-started/cli.mdx @@ -43,11 +43,9 @@ Before you begin, ensure you have the following installed: Now you have successfully installed the Dify CLI. You can verify the installation by running: - ```bash dify version ``` - You can create a new Dify plugin project using the following command: diff --git a/ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx b/ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx index 99487baa..db5aaa82 100644 --- a/ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx +++ b/ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx @@ -94,7 +94,7 @@ python -m main > 詳細: [プラグインのリモートデバッグ](/ja/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin) -#### 4. パッケージングとデプロイ +#### 3. パッケージングとデプロイ プラグインをパッケージ化: diff --git a/ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx b/ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx index 9ff4578c..2cc1f9e5 100644 --- a/ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx +++ b/ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx @@ -160,7 +160,7 @@ extra: source: "endpoints/slack.py" ``` -#### 2. 関数コードの編集 +### 2. 関数コードの編集 `endpoints/slack.py`ファイルを修正し、以下のコードを追加します: @@ -239,7 +239,7 @@ class SlackEndpoint(Endpoint): return Response(status=200, response="ok") ``` -### 2. プラグインのデバッグ +### 3. プラグインのデバッグ Difyプラットフォームに移動し、プラグインのリモートデバッグアドレスとキーを取得します。 @@ -290,7 +290,7 @@ alt="Generated POST Request URL" --- -### 3. プラグインの検証 +### 4. プラグインの検証 コード内で、`self.session.app.chat.invoke`がDifyアプリケーションを呼び出すために使用され、`app_id`や`query`などのパラメータを渡します。応答はSlack Botに返されます。`python -m main`を再度実行してプラグインをデバッグ用に再起動し、SlackがDify Appの応答を正しく表示するかどうかを確認します: @@ -298,7 +298,7 @@ alt="Generated POST Request URL" --- -### 4. プラグインのパッケージ化(オプション) +### 5. プラグインのパッケージ化(オプション) プラグインが正しく動作することを確認したら、以下のコマンドでパッケージ化して名前を付けることができます。実行後、現在のディレクトリに`slack_bot.difypkg`ファイルが作成されます。これが最終的なプラグインパッケージです。詳細なパッケージ化手順については、[ローカルファイルとしてパッケージ化して共有](/ja/develop-plugin/publishing/marketplace-listing/release-by-file)を参照してください。 @@ -312,7 +312,7 @@ dify plugin package ./slack_bot --- -### 5. プラグインの公開(オプション) +### 6. プラグインの公開(オプション) [Dify Marketplaceリポジトリ](https://github.com/langgenius/dify-plugins)にアップロードして公開できます。公開前に、プラグインが[Dify Marketplace公開ガイドライン](/ja/develop-plugin/publishing/marketplace-listing/release-to-dify-marketplace)に準拠していることを確認してください。承認されると、コードはメインブランチにマージされ、プラグインは[Dify Marketplace](https://marketplace.dify.ai/)で公開されます。 diff --git a/ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx b/ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx index e428242a..b8c275c0 100644 --- a/ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx +++ b/ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx @@ -287,7 +287,7 @@ class FlomoTool(Tool): -## ステップ9:パッケージ化と配布 +## ステップ8:パッケージ化と配布 プラグインを共有する準備ができたら: diff --git a/ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx b/ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx index 620ffe13..2d86aff6 100644 --- a/ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx +++ b/ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx @@ -289,7 +289,7 @@ class GoogleSearchTool(Tool): この例は、`serpapi`にリクエストを送信し、`self.create_json_message`を使用してフォーマットされた`json`データ文字列を返すことを意味します。返却データタイプの詳細については、[プラグインのリモートデバッグ](/ja/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)と[永続ストレージKV](/ja/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv)ドキュメントを参照してください。 -#### 4. ツールプロバイダーコードの完成 +#### 5. ツールプロバイダーコードの完成 最後に、認証情報の検証ロジックを実装するプロバイダーの実装コードを作成する必要があります。認証情報の検証が失敗した場合、`ToolProviderCredentialValidationError`例外がスローされます。検証が成功すると、`google_search`ツールサービスが正しくリクエストされます。 diff --git a/ja/develop-plugin/getting-started/cli.mdx b/ja/develop-plugin/getting-started/cli.mdx index 78795890..86ccd67d 100644 --- a/ja/develop-plugin/getting-started/cli.mdx +++ b/ja/develop-plugin/getting-started/cli.mdx @@ -45,11 +45,9 @@ description: Difyプラグイン開発用コマンドラインインターフェ これでDify CLIのインストールが完了しました。以下のコマンドを実行してインストールを確認できます: - ```bash dify version ``` - 以下のコマンドを使用して新しいDifyプラグインプロジェクトを作成できます: diff --git a/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx b/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx index de7a53bd..1391226a 100644 --- a/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx +++ b/zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx @@ -94,7 +94,7 @@ python -m main > 了解更多:[远程调试插件](/zh/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin) -#### 4. 打包和部署 +#### 3. 打包和部署 打包插件: diff --git a/zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx b/zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx index aee64f55..6b2e834e 100644 --- a/zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx +++ b/zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx @@ -160,7 +160,7 @@ extra: source: "endpoints/slack.py" ``` -#### 2. 编辑功能代码 +### 2. 编辑功能代码 修改 `endpoints/slack.py` 文件并添加以下代码: @@ -239,7 +239,7 @@ class SlackEndpoint(Endpoint): return Response(status=200, response="ok") ``` -### 2. 调试插件 +### 3. 调试插件 前往 Dify 平台并获取插件的远程调试地址和密钥。 @@ -290,7 +290,7 @@ alt="Generated POST Request URL" --- -### 3. 验证插件 +### 4. 验证插件 在你的代码中,`self.session.app.chat.invoke` 用于调用 Dify 应用程序,传入 `app_id` 和 `query` 等参数。然后将响应返回给 Slack Bot。再次运行 `python -m main` 重启插件进行调试,并检查 Slack 是否正确显示 Dify App 的回复: @@ -298,7 +298,7 @@ alt="Generated POST Request URL" --- -### 4. 打包插件(可选) +### 5. 打包插件(可选) 确认插件工作正常后,你可以通过以下命令打包并命名它。运行后,你会在当前目录中找到一个 `slack_bot.difypkg` 文件——这就是你的最终插件包。有关详细的打包步骤,请参阅[打包为本地文件并分享](/zh/develop-plugin/publishing/marketplace-listing/release-by-file)。 @@ -312,7 +312,7 @@ dify plugin package ./slack_bot --- -### 5. 发布插件(可选) +### 6. 发布插件(可选) 你现在可以将其上传到 [Dify Marketplace 仓库](https://github.com/langgenius/dify-plugins) 进行公开发布。在发布之前,请确保你的插件符合[发布到 Dify Marketplace 指南](/zh/develop-plugin/publishing/marketplace-listing/release-to-dify-marketplace)。一旦获得批准,你的代码将合并到主分支,插件将在 [Dify Marketplace](https://marketplace.dify.ai/) 上线。 diff --git a/zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx b/zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx index 8ab666ef..42283ffc 100644 --- a/zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx +++ b/zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx @@ -287,7 +287,7 @@ class FlomoTool(Tool): -## 步骤 9:打包和分发 +## 步骤 8:打包和分发 当你准备好分享你的插件时: diff --git a/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx b/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx index 2ab9f556..42eb9696 100644 --- a/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx +++ b/zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx @@ -289,7 +289,7 @@ class GoogleSearchTool(Tool): 此示例表示请求 `serpapi` 并使用 `self.create_json_message` 返回格式化的 `json` 数据字符串。如果你想了解更多关于返回数据类型的信息,可以参考[远程调试插件](/zh/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)和[持久化存储 KV](/zh/develop-plugin/features-and-specs/plugin-types/persistent-storage-kv) 文档。 -#### 4. 完善工具提供者代码 +#### 5. 完善工具提供者代码 最后,你需要为提供者创建一个实现代码来实现凭据验证逻辑。如果凭据验证失败,将抛出 `ToolProviderCredentialValidationError` 异常。验证成功后,`google_search` 工具服务将被正确请求。 diff --git a/zh/develop-plugin/getting-started/cli.mdx b/zh/develop-plugin/getting-started/cli.mdx index 565c541a..edbbfc43 100644 --- a/zh/develop-plugin/getting-started/cli.mdx +++ b/zh/develop-plugin/getting-started/cli.mdx @@ -45,11 +45,9 @@ description: Dify 插件开发命令行界面 现在你已成功安装 Dify CLI。你可以通过运行以下命令来验证安装: - ```bash dify version ``` - 你可以使用以下命令创建一个新的 Dify 插件项目: