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 <riskey47@dify.ai>
This commit is contained in:
非法操作
2025-12-12 14:13:19 +08:00
committed by GitHub
parent 6669cce727
commit bb1d1e0503
15 changed files with 24 additions and 30 deletions

View File

@@ -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:

View File

@@ -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 Apps 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, youll 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! Youve 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/).

View File

@@ -285,7 +285,7 @@ Always handle exceptions gracefully and return user-friendly error messages. Rem
</Step>
</Steps>
## Step 9: Package and distribute
## Step 8: Package and distribute
When you're ready to share your plugin:

View File

@@ -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.

View File

@@ -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:
<CodeGroup>
```bash
dify version
```
</CodeGroup>
You can create a new Dify plugin project using the following command:

View File

@@ -94,7 +94,7 @@ python -m main
> 詳細: [プラグインのリモートデバッグ](/ja/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)
#### 4. パッケージングとデプロイ
#### 3. パッケージングとデプロイ
プラグインをパッケージ化:

View File

@@ -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/)で公開されます。

View File

@@ -287,7 +287,7 @@ class FlomoTool(Tool):
</Step>
</Steps>
## ステップ9:パッケージ化と配布
## ステップ8:パッケージ化と配布
プラグインを共有する準備ができたら:

View File

@@ -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`ツールサービスが正しくリクエストされます。

View File

@@ -45,11 +45,9 @@ description: Difyプラグイン開発用コマンドラインインターフェ
これでDify CLIのインストールが完了しました。以下のコマンドを実行してインストールを確認できます
<CodeGroup>
```bash
dify version
```
</CodeGroup>
以下のコマンドを使用して新しいDifyプラグインプロジェクトを作成できます

View File

@@ -94,7 +94,7 @@ python -m main
> 了解更多:[远程调试插件](/zh/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)
#### 4. 打包和部署
#### 3. 打包和部署
打包插件:

View File

@@ -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/) 上线。

View File

@@ -287,7 +287,7 @@ class FlomoTool(Tool):
</Step>
</Steps>
## 步骤 9:打包和分发
## 步骤 8:打包和分发
当你准备好分享你的插件时:

View File

@@ -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` 工具服务将被正确请求。

View File

@@ -45,11 +45,9 @@ description: Dify 插件开发命令行界面
现在你已成功安装 Dify CLI。你可以通过运行以下命令来验证安装
<CodeGroup>
```bash
dify version
```
</CodeGroup>
你可以使用以下命令创建一个新的 Dify 插件项目: