Path Specifications
When filling in file paths in Manifest or any yaml files, follow these two specifications depending on the type of file:- If the target file is a multimedia file such as an image or video, for example when filling in the plugin’s
icon, you should place these files in the_assetsfolder under the plugin’s root directory. - If the target file is a regular text file, such as
.pyor.yamlcode files, you should fill in the absolute path of the file within the plugin project.
Common Structures
When defining plugins, there are some data structures that can be shared between tools, models, and Endpoints. These shared structures are defined here.I18nObject
I18nObject is an internationalization structure that conforms to the IETF BCP 47 standard. Currently, four languages are supported:
English (United States)
Simplified Chinese
Japanese
Portuguese (Brazil)
ProviderConfig
ProviderConfig is a common provider form structure, applicable to both Tool and Endpoint
Form item name
Display labels following IETF BCP 47 standard
Form field type - determines how the field will be rendered in the UI
Optional range specification, varies based on the value of
typeWhether the field cannot be empty
Default value, only supports basic types:
float, int, stringAvailable options, only used when type is
selectHelp document link label, following IETF BCP 47
Help document link
Placeholder text in multiple languages, following IETF BCP 47
ProviderConfigOption(object)
The value of the option
Display label for the option, following IETF BCP 47
ProviderConfigType(string)
Configuration information that will be encrypted
Plain text input field
Dropdown selection field
Switch/toggle control
Model configuration selector, including provider name, model name, model parameters, etc.
Application ID selector
Tool configuration selector, including tool provider, name, parameters, etc.
Dataset selector (TBD)
ProviderConfigScope(string)
Whentype is model-selector:
All model types
Large Language Models only
Text embedding models only
Reranking models only
Text-to-speech models only
Speech-to-text models only
Content moderation models only
Vision models only
type is app-selector:
All application types
Chat applications only
Workflow applications only
Completion applications only
type is tool-selector:
All tool types
Plugin tools only
API tools only
Workflow tools only
ModelConfig
Model provider name containing plugin_id, in the form of
langgenius/openai/openaiSpecific model name
Enumeration of model types, refer to the Model Design Rules document
NodeResponse
Variables that are finally input to the node
Output results of the node
Data generated during node execution
ToolSelector
Tool provider name
Tool name
Tool description
Tool configuration information
Related Resources
- Basic Concepts of Plugin Development - Comprehensive understanding of Dify plugin development
- Developer Cheatsheet - Quick reference for common commands and concepts in plugin development
- Tool Plugin Development Details - Understanding how to define plugin information and the tool plugin development process
- Model Design Rules - Understanding the standards for model configuration
Edit this page | Report an issue