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:
- en_US
- zh_Hans
- ja_JP
- pt_BR
ProviderConfig
ProviderConfig is a common provider form structure, applicable to both Tool and Endpoint
name(string): Form item namelabel(I18nObject, required): Following IETF BCP 47type(provider_config_type, required): Form typescope(provider_config_scope): Optional range, varies based ontyperequired(bool): Cannot be emptydefault(any): Default value, only supports basic typesfloatintstringoptions(list[provider_config_option]): Options, only used when type isselecthelper(object): Help document link label, following IETF BCP 47url(string): Help document linkplaceholder(object): Following IETF BCP 47
ProviderConfigOption(object)
value(string, required): Valuelabel(object, required): Following IETF BCP 47
ProviderConfigType(string)
secret-input(string): Configuration information will be encryptedtext-input(string): Plain textselect(string): Dropdownboolean(bool): Switchmodel-selector(object): Model configuration information, including provider name, model name, model parameters, etc.app-selector(object): app idtool-selector(object): Tool configuration information, including tool provider, name, parameters, etc.dataset-selector(string): TBD
ProviderConfigScope(string)
- When
typeismodel-selectorallllmtext-embeddingrerankttsspeech2textmoderationvision
- When
typeisapp-selectorallchatworkflowcompletion
- When
typeistool-selectorallpluginapiworkflow
ModelConfig
provider(string): Model provider name containing plugin_id, in the form oflanggenius/openai/openai.model(string): Specific model name.model_type(enum): Enumeration of model types, refer to the Model Design Rules document.
NodeResponse
inputs(dict): Variables that are finally input to the node.outputs(dict): Output results of the node.process_data(dict): Data generated during node execution.
ToolSelector
provider_id(string): Tool provider nametool_name(string): Tool nametool_description(string): Tool descriptiontool_configuration(dict[str, Any]): Tool configuration informationtool_parameters(dict[str, dict]): Parameters that need LLM reasoningname(string): Parameter nametype(string): Parameter typerequired(bool): Whether requireddescription(string): Parameter descriptiondefault(any): Defaultoptions(list[string]): Options
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