diff --git a/plugin-dev-en/9231-extension-plugin.mdx b/plugin-dev-en/9231-extension-plugin.mdx index bce59c13..4e150719 100644 --- a/plugin-dev-en/9231-extension-plugin.mdx +++ b/plugin-dev-en/9231-extension-plugin.mdx @@ -37,7 +37,7 @@ If you have renamed the binary file to `dify` and copied it to the `/usr/local/b dify plugin init ``` -### **Filling in Plugin Information** +#### 1. Filling in Plugin Information Follow the prompts to configure the plugin name, author information, and plugin description. If you are working collaboratively as a team, you can also enter an organization name as the author. @@ -49,13 +49,13 @@ Once completed, select Python as the plugin development language. ![Plugins development: Python](https://assets-docs.dify.ai/2024/11/1129101623ac4c091a3f6f75f4103848.png) -### 3. Select Plugin Type and Initialize Project Template +#### 2. Select Plugin Type and Initialize Project Template All templates in the scaffolding tool provide complete code projects. For demonstration purposes, this article will use the `Extension` type plugin template as an example. For developers already familiar with plugin development, templates are not necessary, and you can refer to the [interface documentation](/plugin-dev-en/0411-general-specifications) to guide the development of different types of plugins. ![Extension](https://assets-docs.dify.ai/2024/11/ff08f77b928494e10197b456fc4e2d5b.png) -#### Configure Plugin Permissions +#### 3. Configure Plugin Permissions The plugin also needs permissions to read from the Dify main platform to connect properly. Grant the following permissions to this example plugin: diff --git a/plugin-dev-ja/9231-extension-plugin.mdx b/plugin-dev-ja/9231-extension-plugin.mdx index 7b54b299..46a32a93 100644 --- a/plugin-dev-ja/9231-extension-plugin.mdx +++ b/plugin-dev-ja/9231-extension-plugin.mdx @@ -33,7 +33,7 @@ description: 本文档提供了开发Extension类型插件的完整教程,详 dify plugin init ``` -### **填写插件信息** +#### 1. 填写插件信息 按照提示配置插件名称、作者信息与插件描述。如果你是团队协作,也可以将作者填写为组织名。 @@ -45,13 +45,13 @@ dify plugin init ![Plugins development: Python](https://assets-docs.dify.ai/2024/11/1129101623ac4c091a3f6f75f4103848.png) -### 3. 选择插件类型并初始化项目模板 +#### 2. 选择插件类型并初始化项目模板 脚手架工具内的所有模板均已提供完整的代码项目。出于演示说明,本文将以 `Extension` 类型插件模板作为示例。对于已熟悉插件的开发者而言,无需借助模板,可参考[接口文档](../../schema-definition/)指引完成不同类型的插件开发。 ![Extension](https://assets-docs.dify.ai/2024/11/ff08f77b928494e10197b456fc4e2d5b.png) -#### 配置插件权限 +#### 3. 配置插件权限 插件还需要读取 Dify 主平台的权限才能正常连接。需要为该示例插件授予以下权限: @@ -233,8 +233,9 @@ pip install dify-plugin ```bash INSTALL_METHOD=remote -REMOTE_INSTALL_URL=debug.dify.ai:5003 -REMOTE_INSTALL_KEY=********-****-****-****-************ +REMOTE_INSTALL_HOST=remote-url +REMOTE_INSTALL_PORT=5003 +REMOTE_INSTALL_KEY=****-****-****-****-**** ``` 运行 `python -m main` 命令启动插件。在插件页即可看到该插件已被安装至 Workspace 内。其他团队成员也可以访问该插件。 @@ -250,8 +251,6 @@ REMOTE_INSTALL_KEY=********-****-****-****-************ 确认插件能够正常运行后,可以通过以下命令行工具打包并命名插件。运行以后你可以在当前文件夹发现 `neko.difypkg` 文件,该文件为最终的插件包。 ```bash -# 将 ./neko 替换为插件项目的实际路径 - dify plugin package ./neko ``` diff --git a/plugin-dev-zh/9231-extension-plugin.mdx b/plugin-dev-zh/9231-extension-plugin.mdx index 892ceae2..490cecc4 100644 --- a/plugin-dev-zh/9231-extension-plugin.mdx +++ b/plugin-dev-zh/9231-extension-plugin.mdx @@ -33,7 +33,7 @@ description: 本文档提供了开发Extension类型插件的完整教程,详 dify plugin init ``` -### **填写插件信息** +#### 1. 填写插件信息 按照提示配置插件名称、作者信息与插件描述。如果你是团队协作,也可以将作者填写为组织名。 @@ -45,13 +45,13 @@ dify plugin init ![Plugins development: Python](https://assets-docs.dify.ai/2024/11/1129101623ac4c091a3f6f75f4103848.png) -### 3. 选择插件类型并初始化项目模板 +#### 2. 选择插件类型并初始化项目模板 脚手架工具内的所有模板均已提供完整的代码项目。出于演示说明,本文将以 `Extension` 类型插件模板作为示例。对于已熟悉插件的开发者而言,无需借助模板,可参考[接口文档](../../schema-definition/)指引完成不同类型的插件开发。 ![Extension](https://assets-docs.dify.ai/2024/11/ff08f77b928494e10197b456fc4e2d5b.png) -#### 配置插件权限 +#### 3. 配置插件权限 插件还需要读取 Dify 主平台的权限才能正常连接。需要为该示例插件授予以下权限: