Skip to content

Commit 0edf8d0

Browse files
author
Riskey
committed
fix the zh and jp docs as well
1 parent 827f86a commit 0edf8d0

11 files changed

Lines changed: 17 additions & 21 deletions

File tree

en/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ extra:
161161
source: "endpoints/slack.py"
162162
```
163163

164-
#### 2. Edit the function code
164+
### 2. Edit the function code
165165

166166
Modify the `endpoints/slack.py` file and add the following code:
167167

ja/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ python -m main
9494

9595
> 詳細: [プラグインのリモートデバッグ](/ja/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)
9696
97-
#### 4. パッケージングとデプロイ
97+
#### 3. パッケージングとデプロイ
9898

9999
プラグインをパッケージ化:
100100

ja/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ extra:
160160
source: "endpoints/slack.py"
161161
```
162162

163-
#### 2. 関数コードの編集
163+
### 2. 関数コードの編集
164164

165165
`endpoints/slack.py`ファイルを修正し、以下のコードを追加します:
166166

@@ -239,7 +239,7 @@ class SlackEndpoint(Endpoint):
239239
return Response(status=200, response="ok")
240240
```
241241

242-
### 2. プラグインのデバッグ
242+
### 3. プラグインのデバッグ
243243

244244
Difyプラットフォームに移動し、プラグインのリモートデバッグアドレスとキーを取得します。
245245

@@ -290,15 +290,15 @@ alt="Generated POST Request URL"
290290

291291
---
292292

293-
### 3. プラグインの検証
293+
### 4. プラグインの検証
294294

295295
コード内で、`self.session.app.chat.invoke`がDifyアプリケーションを呼び出すために使用され、`app_id`や`query`などのパラメータを渡します。応答はSlack Botに返されます。`python -m main`を再度実行してプラグインをデバッグ用に再起動し、SlackがDify Appの応答を正しく表示するかどうかを確認します:
296296

297297
![](https://assets-docs.dify.ai/2025/01/6fc872d1343ce8503d63c5222f7f26f9.png)
298298

299299
---
300300

301-
### 4. プラグインのパッケージ化(オプション)
301+
### 5. プラグインのパッケージ化(オプション)
302302

303303
プラグインが正しく動作することを確認したら、以下のコマンドでパッケージ化して名前を付けることができます。実行後、現在のディレクトリに`slack_bot.difypkg`ファイルが作成されます。これが最終的なプラグインパッケージです。詳細なパッケージ化手順については、[ローカルファイルとしてパッケージ化して共有](/ja/develop-plugin/publishing/marketplace-listing/release-by-file)を参照してください。
304304

@@ -312,7 +312,7 @@ dify plugin package ./slack_bot
312312

313313
---
314314

315-
### 5. プラグインの公開(オプション)
315+
### 6. プラグインの公開(オプション)
316316

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

ja/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class FlomoTool(Tool):
287287
</Step>
288288
</Steps>
289289

290-
## ステップ9:パッケージ化と配布
290+
## ステップ8:パッケージ化と配布
291291

292292
プラグインを共有する準備ができたら:
293293

ja/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class GoogleSearchTool(Tool):
289289

290290
この例は、`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)ドキュメントを参照してください。
291291

292-
#### 4. ツールプロバイダーコードの完成
292+
#### 5. ツールプロバイダーコードの完成
293293

294294
最後に、認証情報の検証ロジックを実装するプロバイダーの実装コードを作成する必要があります。認証情報の検証が失敗した場合、`ToolProviderCredentialValidationError`例外がスローされます。検証が成功すると、`google_search`ツールサービスが正しくリクエストされます。
295295

ja/develop-plugin/getting-started/cli.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ description: Difyプラグイン開発用コマンドラインインターフェ
4545

4646
これでDify CLIのインストールが完了しました。以下のコマンドを実行してインストールを確認できます:
4747

48-
<CodeGroup>
4948
```bash
5049
dify version
5150
```
52-
</CodeGroup>
5351

5452
以下のコマンドを使用して新しいDifyプラグインプロジェクトを作成できます:
5553

zh/develop-plugin/dev-guides-and-walkthroughs/cheatsheet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ python -m main
9494

9595
> 了解更多:[远程调试插件](/zh/develop-plugin/features-and-specs/plugin-types/remote-debug-a-plugin)
9696
97-
#### 4. 打包和部署
97+
#### 3. 打包和部署
9898

9999
打包插件:
100100

zh/develop-plugin/dev-guides-and-walkthroughs/develop-a-slack-bot-plugin.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ extra:
160160
source: "endpoints/slack.py"
161161
```
162162

163-
#### 2. 编辑功能代码
163+
### 2. 编辑功能代码
164164

165165
修改 `endpoints/slack.py` 文件并添加以下代码:
166166

@@ -239,7 +239,7 @@ class SlackEndpoint(Endpoint):
239239
return Response(status=200, response="ok")
240240
```
241241

242-
### 2. 调试插件
242+
### 3. 调试插件
243243

244244
前往 Dify 平台并获取插件的远程调试地址和密钥。
245245

@@ -290,15 +290,15 @@ alt="Generated POST Request URL"
290290

291291
---
292292

293-
### 3. 验证插件
293+
### 4. 验证插件
294294

295295
在你的代码中,`self.session.app.chat.invoke` 用于调用 Dify 应用程序,传入 `app_id` 和 `query` 等参数。然后将响应返回给 Slack Bot。再次运行 `python -m main` 重启插件进行调试,并检查 Slack 是否正确显示 Dify App 的回复:
296296

297297
![](https://assets-docs.dify.ai/2025/01/6fc872d1343ce8503d63c5222f7f26f9.png)
298298

299299
---
300300

301-
### 4. 打包插件(可选)
301+
### 5. 打包插件(可选)
302302

303303
确认插件工作正常后,你可以通过以下命令打包并命名它。运行后,你会在当前目录中找到一个 `slack_bot.difypkg` 文件——这就是你的最终插件包。有关详细的打包步骤,请参阅[打包为本地文件并分享](/zh/develop-plugin/publishing/marketplace-listing/release-by-file)。
304304

@@ -312,7 +312,7 @@ dify plugin package ./slack_bot
312312

313313
---
314314

315-
### 5. 发布插件(可选)
315+
### 6. 发布插件(可选)
316316

317317
你现在可以将其上传到 [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/) 上线。
318318

zh/develop-plugin/dev-guides-and-walkthroughs/develop-flomo-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class FlomoTool(Tool):
287287
</Step>
288288
</Steps>
289289

290-
## 步骤 9:打包和分发
290+
## 步骤 8:打包和分发
291291

292292
当你准备好分享你的插件时:
293293

zh/develop-plugin/dev-guides-and-walkthroughs/tool-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class GoogleSearchTool(Tool):
289289

290290
此示例表示请求 `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) 文档。
291291

292-
#### 4. 完善工具提供者代码
292+
#### 5. 完善工具提供者代码
293293

294294
最后,你需要为提供者创建一个实现代码来实现凭据验证逻辑。如果凭据验证失败,将抛出 `ToolProviderCredentialValidationError` 异常。验证成功后,`google_search` 工具服务将被正确请求。
295295

0 commit comments

Comments
 (0)