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:
string
English (United States)
string
Simplified Chinese
string
Japanese
string
Portuguese (Brazil)
ProviderConfig
ProviderConfig is a common provider form structure, applicable to both Tool and Endpoint
string
Form item name
I18nObject
required
Display labels following IETF BCP 47 standard
provider_config_type
required
Form field type - determines how the field will be rendered in the UI
provider_config_scope
Optional range specification, varies based on the value of
typeboolean
Whether the field cannot be empty
any
Default value, only supports basic types:
float, int, stringarray[provider_config_option]
Available options, only used when type is
selectobject
Help document link label, following IETF BCP 47
string
Help document link
object
Placeholder text in multiple languages, following IETF BCP 47
ProviderConfigOption(object)
string
required
The value of the option
object
required
Display label for the option, following IETF BCP 47
ProviderConfigType(string)
string
Configuration information that will be encrypted
string
Plain text input field
string
Dropdown selection field
boolean
Switch/toggle control
object
Model configuration selector, including provider name, model name, model parameters, etc.
object
Application ID selector
object
Tool configuration selector, including tool provider, name, parameters, etc.
string
Dataset selector (TBD)
ProviderConfigScope(string)
Whentype is model-selector:
string
All model types
string
Large Language Models only
string
Text embedding models only
string
Reranking models only
string
Text-to-speech models only
string
Speech-to-text models only
string
Content moderation models only
string
Vision models only
type is app-selector:
string
All application types
string
Chat applications only
string
Workflow applications only
string
Completion applications only
type is tool-selector:
string
All tool types
string
Plugin tools only
string
API tools only
string
Workflow tools only
ModelConfig
string
Model provider name containing plugin_id, in the form of
langgenius/openai/openaistring
Specific model name
enum
Enumeration of model types, refer to the Model Design Rules document
NodeResponse
dict
Variables that are finally input to the node
dict
Output results of the node
dict
Data generated during node execution
ToolSelector
string
Tool provider name
string
Tool name
string
Tool description
dict[string, any]
Tool configuration information
dict[string, dict]
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