This article will briefly introduce common structures in plugin development.
Path Specifications
When specifying file paths in Manifest or any yaml files, follow these two rules based on file types:
For multimedia files like images or videos (e.g., plugin
icon
), place them in the_assets
folder under the plugin root directory.For regular text files like
.py
or.yaml
, use the absolute path within the plugin project.
Common Structures
When defining plugins, some data structures can be shared among tools, models, and Endpoints. Here are these shared structures.
I18nObject
I18nObject
is an internationalization structure compliant with IETF BCP 47 standard, currently supporting four languages:
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): Follows IETF BCP 47type
(provider_config_type, required): Form typescope
(provider_config_scope): Option range, varies withtype
required
(bool): Cannot be emptydefault
(any): Default value, only supports basic typesfloat
int
string
options
(list[provider_config_option]): Options, only used when type isselect
helper
(object): Help documentation link label, follows IETF BCP 47url
(string): Help documentation linkplaceholder
(object): Follows IETF BCP 47
ProviderConfigOption(object)
value
(string, required):values
ProviderConfigType(string)
secret-input
(string):Configuration information will be encryptedtext-input
(string):Plain textselect
(string):drop-down boxboolean
(bool):switchgearmodel-selector
(object):Model configuration information, including vendor name, model name, model parameters, etc.app-selector
(object):app idtool-selector
(object):Tool configuration information, including tool vendor, name, parameters, etc.dataset-selector
(string):TBD
ProviderConfigScope(string)
When
type
ismodel-selector
all
llm
text-embedding
rerank
tts
speech2text
moderation
vision
When
type
isapp-selector
all
chat
workflow
completion
When
type
istool-selector
all
plugin
api
workflow
ModelConfig
provider
(string): Model provider name including plugin_id, in the format oflanggenius/openai/openai
model
(string): Specific model namemodel_type
(enum): Model type enumeration, refer to this document
NodeResponse
inputs
(dict): Variables finally input to the nodeoutputs
(dict): Node output resultsprocess_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 requiring LLM inferencename
(string): Parameter nametype
(string): Parameter typerequired
(bool): Whether requireddescription
(string): Parameter descriptiondefault
(any): Default valueoptions
(list[string]): Available options
Last updated