Dify Plugin SDK Schema Documentation
Table of Contents
- Manifest
- Meta
- PluginResourceRequirements
- Plugins
- PluginType
- ModelPropertyKey
- ModelFormShowOnObject
- ToolLabelEnum
- OAuthSchema
- ModelType
- ProviderModel
- EndpointGroup
- Endpoint
- AgentStrategyProviderExtra
- Python
- CommonParameterType
- Variables
- Subscription
- ToolProvider
- Tool
- ToolProviderExtra
- ToolProviderIdentity
- AgentStrategyProvider
- AgentStrategy
- AgentStrategyProviderIdentity
- ModelProvider
- AIModelEntity
- ModelProviderHelp
- ModelPosition
- ModelConfigurateMethod
- ModelProviderCredentialSchema
- ModelProviderExtra
- FetchFrom
- AppSelectorScope
- UnsubscribeResult
- ModelConfigScope
- ParameterAutoGenerate
- I18nObject
- EventDescription
- ParameterTemplate
- TriggerProvider
- TriggerProviderIdentity
- TriggerSubscriptionConstructor
- TriggerProviderConfigurationExtra
- EventConfiguration
- DefaultParameterName
- EventParameter
- EventParameterOption
- ModelFeature
- ToolParameterOption
- ToolSelectorScope
- PluginProviderType
- DatasourceProvider
- DatasourceProviderType
- DatasourceProviderIdentity
- Datasource
- DatasourceProviderExtra
- ModelFieldModelSchema
- ProviderConfig
- ConfigOption
Manifest
The Manifest of the plugin
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| version | str | |||
| type | PluginType | |||
| author | Union[str, NoneType] | pattern='^[a-zA-Z0-9_-]{1,64}$' | ||
| name | str | pattern='^[a-z0-9_-]{1,128}$' | ||
| repo | Union[str, NoneType] | The repository URL of the plugin | None | |
| description | I18nObject | |||
| icon | str | |||
| icon_dark | Union[str, NoneType] | The dark mode icon of the plugin | None | |
| created_at | datetime | |||
| resource | PluginResourceRequirements | |||
| plugins | Plugins | |||
| meta | Meta |
Storage
Permission of storage
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | Union[bool, NoneType] | Whether to enable uses of storage | False | |
| size | int | Size of storage | 1048576 | Ge(ge=1024) Le(le=1073741824) |
TriggerSubscriptionConstructor
Configuration for a trigger subscription constructor
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| parameters | list[EventParameter] | The user input parameters required to create a subscription | ||
| credentials_schema | list[ProviderConfig] | The credentials schema required by the subscription constructor | ||
| oauth_schema | Union[OAuthSchema, NoneType] | The OAuth schema of the subscription constructor if OAuth is supported | None | |
| extra | Union[TriggerSubscriptionConstructorConfigurationExtra, NoneType] | Extra metadata for locating the constructor implementation | None |
ToolParameter
The type of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| name | str | The name of the parameter | ||
| type | ToolParameterType | The type of the parameter | ||
| auto_generate | Union[ParameterAutoGenerate, NoneType] | The auto generate of the parameter | None | |
| template | Union[ParameterTemplate, NoneType] | The template of the parameter | None | |
| scope | Union[str, NoneType] | None | ||
| form | ToolParameterForm | The form of the parameter, schema/form/llm | ||
| llm_description | Union[str, NoneType] | None | ||
| required | Union[bool, NoneType] | False | ||
| default | Union[int, float, str, NoneType] | None | ||
| min | Union[float, int, NoneType] | None | ||
| max | Union[float, int, NoneType] | None | ||
| precision | Union[int, NoneType] | None | ||
| options | Union[list[ToolParameterOption], NoneType] | None | ||
| input_schema | Union[collections.abc.Mapping[str, typing.Any], NoneType] | None |
TriggerSubscriptionConstructorConfigurationExtra
The subscription constructor configuration of the trigger provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
ModelFormType
Values
TEXT_INPUT: text-inputSECRET_INPUT: secret-inputSELECT: selectRADIO: radioSWITCH: switch
ModelPropertyKey
Values
MODE: modeCONTEXT_SIZE: context_sizeMAX_CHUNKS: max_chunksFILE_UPLOAD_LIMIT: file_upload_limitSUPPORTED_FILE_EXTENSIONS: supported_file_extensionsMAX_CHARACTERS_PER_CHUNK: max_characters_per_chunkDEFAULT_VOICE: default_voiceVOICES: voicesWORD_LIMIT: word_limitAUDIO_TYPE: audio_typeMAX_WORKERS: max_workers
ToolDescription
The description of the tool
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| llm | str | The description presented to the LLM |
Endpoint
The Manifest of the endpoint
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| path | str | |||
| method | str | |||
| hidden | bool | Whether to hide this endpoint in the UI | False | |
| extra | EndpointExtra |
ModelFormShowOnObject
Form show on
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| variable | str | |||
| value | str |
ToolLabelEnum
Values
SEARCH: searchIMAGE: imageVIDEOS: videosWEATHER: weatherFINANCE: financeDESIGN: designTRAVEL: travelSOCIAL: socialNEWS: newsMEDICAL: medicalPRODUCTIVITY: productivityEDUCATION: educationBUSINESS: businessENTERTAINMENT: entertainmentUTILITIES: utilitiesRAG: ragOTHER: other
OAuthSchema
The schema of the OAuth
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| client_schema | collections.abc.Sequence[dify_plugin.entities.provider_config.ProviderConfig] | The schema of the OAuth client | ||
| credentials_schema | collections.abc.Sequence[dify_plugin.entities.provider_config.ProviderConfig] | The schema of the OAuth credentials |
ModelType
Values
LLM: llmTEXT_EMBEDDING: text-embeddingRERANK: rerankSPEECH2TEXT: speech2textMODERATION: moderationTTS: ttsTEXT2IMG: text2img
AIModelEntity
AI model entity
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| model | str | The model name | ||
| model_type | ModelType | The model type | ||
| features | Union[list[ModelFeature], NoneType] | The features of the model | None | |
| fetch_from | FetchFrom | The fetch from | FetchFrom.PREDEFINED_MODEL | |
| model_properties | dict[ModelPropertyKey, Any] | The model properties | ||
| deprecated | bool | Whether the model is deprecated | False | |
| parameter_rules | list[ParameterRule] | [] | ||
| pricing | Union[PriceConfig, NoneType] | None |
ProviderModel
The provider model
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| model | str | The model name | ||
| model_type | ModelType | The model type | ||
| features | Union[list[ModelFeature], NoneType] | The features of the model | None | |
| fetch_from | FetchFrom | The fetch from | FetchFrom.PREDEFINED_MODEL | |
| model_properties | dict[ModelPropertyKey, Any] | The model properties | ||
| deprecated | bool | Whether the model is deprecated | False |
ModelConfigurateMethod
Values
PREDEFINED_MODEL: predefined-modelCUSTOMIZABLE_MODEL: customizable-model
PluginRunner
Runner of plugin
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| language | PluginLanguage | |||
| version | str | |||
| entrypoint | str |
Python
The python configuration for event
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| source | str | The source file path for the event implementation |
ToolProviderExtra
The extra of the tool provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
EndpointGroup
The Manifest of the endpoint group
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| settings | list[ProviderConfig] | |||
| endpoints | list[str] | Paths to yaml files that will be loaded as Endpoint |
ToolProviderIdentity
The identity of the tool provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the tool | ||
| name | str | The name of the tool | ||
| icon | str | The icon of the tool | ||
| icon_dark | Union[str, NoneType] | The dark mode icon of the tool | None | |
| tags | list[ToolLabelEnum] | The tags of the tool | [] |
AgentStrategyProviderExtra
The extra of the agent provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
EventConfigurationExtra
The extra configuration for an event
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
CommonParameterType
Values
SECRET_INPUT: secret-inputTEXT_INPUT: text-inputSELECT: selectSTRING: stringNUMBER: numberFILE: fileFILES: filesBOOLEAN: booleanCHECKBOX: checkboxAPP_SELECTOR: app-selectorMODEL_SELECTOR: model-selectorTOOLS_SELECTOR: array[tools]ANY: anyOBJECT: objectARRAY: arrayDYNAMIC_SELECT: dynamic-select
AgentStrategyExtra
The extra of the agent strategy
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
DatasourceLabelEnum
Values
SEARCH: searchIMAGE: imageVIDEOS: videosWEATHER: weatherFINANCE: financeDESIGN: designTRAVEL: travelSOCIAL: socialNEWS: newsMEDICAL: medicalPRODUCTIVITY: productivityEDUCATION: educationBUSINESS: businessENTERTAINMENT: entertainmentUTILITIES: utilitiesOTHER: other
ParameterAutoGenerate
The auto generate of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| type | Type |
Variables
The structured output variables from an event
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| variables | collections.abc.Mapping[str, typing.Any] | The output variables of the event, same with the schema defined in output_schema in the YAML |
ParameterTemplate
The template of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | bool | Whether the parameter is jinja enabled |
Subscription
Result of a successful trigger subscription operation
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| expires_at | int | The timestamp when the subscription will expire, used for refreshing the subscription. Set to -1 if the subscription does not expire | -1 | |
| endpoint | str | The webhook endpoint URL allocated by Dify for receiving events | ||
| parameters | Union[collections.abc.Mapping[str, typing.Any], NoneType] | The parameters of the subscription, only available when the subscription is created by the trigger subscription constructor | None | |
| properties | collections.abc.Mapping[str, typing.Any] | The necessary information for this subscription, e.g., external_id, events, repository, etc. These properties are defined in subscription_schema in the provider's YAML |
Python
The python configuration for trigger provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| source | str | The source file path for the trigger provider implementation |
AgentStrategyIdentity
The identity of the agent strategy
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the tool | ||
| name | str | The name of the tool |
ToolProvider
The Manifest of the tool provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | ToolProviderIdentity | |||
| credentials_schema | list[ProviderConfig] | The credentials schema of the tool provider | ||
| oauth_schema | Union[OAuthSchema, NoneType] | The OAuth schema of the tool provider if OAuth is supported | None | |
| tools | list[str] | The tools of the tool provider (Paths to yaml files that will be loaded as Tool) | [] | |
| extra | ToolProviderExtra |
AgentStrategyProvider
The Manifest of the agent strategy provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | AgentStrategyProviderIdentity | |||
| strategies | list[str] | The strategies of the agent provider (Paths to yaml files that will be loaded as AgentStrategy) | [] |
AgentStrategy
The Manifest of the agent strategy
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | AgentStrategyIdentity | |||
| parameters | list[AgentStrategyParameter] | The parameters of the agent | [] | |
| extra | AgentStrategyExtra | |||
| has_runtime_parameters | bool | Whether the tool has runtime parameters | False | |
| output_schema | Union[collections.abc.Mapping[str, typing.Any], NoneType] | None | ||
| features | list[AgentStrategyFeature] | The features of the agent | [] |
TriggerProviderIdentity
The identity of the trigger provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the trigger provider | ||
| name | str | The name of the trigger provider | ||
| icon | Union[str, NoneType] | The icon of the trigger provider | None | |
| icon_dark | Union[str, NoneType] | The dark mode icon of the trigger provider | None | |
| tags | list[EventLabelEnum] | The tags of the trigger provider |
ModelProvider
Model provider configuration
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| provider | str | |||
| description | Union[I18nObject, NoneType] | None | ||
| icon_small | Union[I18nObject, NoneType] | None | ||
| icon_large | Union[I18nObject, NoneType] | None | ||
| background | Union[str, NoneType] | None | ||
| help | Union[ModelProviderHelp, NoneType] | None | ||
| supported_model_types | collections.abc.Sequence[dify_plugin.entities.model.schema.ModelType] | |||
| configurate_methods | list[ModelConfigurateMethod] | |||
| models | list[str] | Paths to yaml files that will be loaded as AIModelEntity | ||
| provider_credential_schema | Union[ModelProviderCredentialSchema, NoneType] | None | ||
| model_credential_schema | Union[ModelCredentialSchema, NoneType] | None | ||
| position | Union[ModelPosition, NoneType] | None | ||
| extra | ModelProviderExtra |
Plugins
Extensions of plugin
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| tools | list[str] | manifest paths of tool providers in yaml format, refers to ToolProvider | ||
| models | list[str] | manifest paths of model providers in yaml format, refers to ModelProvider | ||
| endpoints | list[str] | manifest paths of endpoint groups in yaml format, refers to EndpointGroup | ||
| agent_strategies | list[str] | manifest paths of agent strategy providers in yaml format,refers to AgentStrategyProvider | ||
| datasources | list[str] | manifest paths of datasource providers in yaml format refers to DatasourceProvider | ||
| triggers | list[str] | manifest paths of trigger providers in yaml format, refers to TriggerProvider |
FetchFrom
Values
PREDEFINED_MODEL: predefined-modelCUSTOMIZABLE_MODEL: customizable-model
App
Permission of app
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | Union[bool, NoneType] | Whether to enable invocation of app | False |
Endpoint
Permission of endpoint
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | Union[bool, NoneType] | Whether to enable registration of endpoint | False |
AppSelectorScope
Values
ALL: allCHAT: chatWORKFLOW: workflowCOMPLETION: completion
UnsubscribeResult
Result of a trigger unsubscription operation
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| success | bool | Whether the unsubscribe was successful | ||
| message | Union[str, NoneType] | Human-readable message about the operation result. Success message for successful operations, detailed error information for failures. | None |
Datasource
Datasource entity
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | DatasourceIdentity | |||
| parameters | list[DatasourceParameter] | |||
| output_schema | dict[str, Any] | Output schema definition | ||
| extra | DatasourceEntityExtra |
Tool
Permission of tool
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | Union[bool, NoneType] | False |
EventIdentity
The identity of an event
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the event | ||
| name | str | The name of the event |
DatasourceProviderType
Values
ONLINE_DOCUMENT: online_documentWEBSITE_CRAWL: website_crawlONLINE_DRIVE: online_drive
ModelConfigScope
Values
LLM: llmTEXT_EMBEDDING: text-embeddingRERANK: rerankTTS: ttsSPEECH2TEXT: speech2textMODERATION: moderationVISION: vision
ParameterAutoGenerate
The auto generate of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| type | Type |
PluginArch
Values
AMD64: amd64ARM64: arm64
Permission
Permission of plugin
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| tool | Union[Tool, NoneType] | Permission of tool | None | |
| model | Union[Model, NoneType] | Permission of model | None | |
| node | Union[Node, NoneType] | Permission of node | None | |
| endpoint | Union[Endpoint, NoneType] | Permission of endpoint | None | |
| app | Union[App, NoneType] | Permission of app | None | |
| storage | Union[Storage, NoneType] | Permission of storage | None |
AgentStrategyParameter
The parameter of the agent strategy
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| name | str | The name of the parameter | ||
| help | Union[I18nObject, NoneType] | None | ||
| type | ToolParameterType | The type of the parameter | ||
| auto_generate | Union[ParameterAutoGenerate, NoneType] | The auto generate of the parameter | None | |
| template | Union[ParameterTemplate, NoneType] | The template of the parameter | None | |
| scope | Union[str, NoneType] | None | ||
| required | Union[bool, NoneType] | False | ||
| default | Union[int, float, str, NoneType] | None | ||
| min | Union[float, int, NoneType] | None | ||
| max | Union[float, int, NoneType] | None | ||
| precision | Union[int, NoneType] | None | ||
| options | Union[list[ToolParameterOption], NoneType] | None |
PluginType
Values
Plugin: plugin
ModelProviderCredentialSchema
Model provider credential schema
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| credential_form_schemas | list[ModelCredentialFormSchema] |
ModelProviderExtra
Model provider configuration extra
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
ParameterOption
The option of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| value | str | The value of the option | ||
| icon | Union[str, NoneType] | The icon of the option, can be a URL or a base64 encoded string | None |
ToolExtra
The extra of the tool
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
Meta
Meta information of plugin
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| version | str | The version of the manifest specification, designed for backward compatibility,when installing an older plugin to a newer Dify, it's hard to ensure breaking changes never happen, but at least, Dify can detect it by this field, it knows which version of the manifest is supported. | ||
| arch | list[PluginArch] | |||
| runner | PluginRunner | |||
| minimum_dify_version | Union[str, NoneType] | The minimum version of Dify, designed for forward compatibility.When installing a newer plugin to an older Dify, many new features may not be available,but showing the minimum Dify version helps users understand how to upgrade. | None |
ConfigOption
The option of the credentials
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| value | str | The value of the option |
I18nObject
Common i18n object
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| zh_hans | Union[str, NoneType] | None | ||
| pt_br | Union[str, NoneType] | None | ||
| ja_jp | Union[str, NoneType] | None | ||
| en_us | str |
AgentStrategyProviderIdentity
The identity of the agent strategy provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the tool | ||
| name | str | The name of the tool | ||
| icon | str | The icon of the tool | ||
| icon_dark | Union[str, NoneType] | The dark mode icon of the tool | None | |
| tags | list[ToolLabelEnum] | The tags of the tool | [] |
Python
The python configuration for trigger subscription constructor
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| source | str | The source file path for the constructor implementation |
PluginResourceRequirements
Resource requirements of plugin
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| memory | int | |||
| permission | Union[Permission, NoneType] | Permission of plugin | None |
Tool
The manifest of the tool
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | ToolIdentity | |||
| parameters | list[ToolParameter] | The parameters of the tool | [] | |
| description | ToolDescription | |||
| extra | ToolExtra | |||
| has_runtime_parameters | bool | Whether the tool has runtime parameters | False | |
| output_schema | Union[collections.abc.Mapping[str, typing.Any], NoneType] | None |
ModelFormOption
Form option
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| value | str | |||
| show_on | list[ModelFormShowOnObject] |
ModelCredentialFormSchema
Credential form schema
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| variable | str | |||
| type | ModelFormType | |||
| required | bool | True | ||
| default | Union[str, NoneType] | None | ||
| options | Union[list[ModelFormOption], NoneType] | None | ||
| placeholder | Union[I18nObject, NoneType] | None | ||
| max_length | int | 0 | ||
| show_on | list[ModelFormShowOnObject] |
DatasourceEntityExtra
The extra of the datasource entity
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
EventDescription
The description of an event
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
EventParameterOption
The option of the event parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| value | str | The value of the option | ||
| icon | Union[str, NoneType] | The icon of the option, can be a URL or a base64 encoded string | None |
ParameterTemplate
The template of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | bool | Whether the parameter is jinja enabled |
Python
The extra of the agent provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| source | str |
TriggerProviderConfigurationExtra
The extra configuration for trigger provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
TriggerProvider
The configuration of a trigger provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | TriggerProviderIdentity | The identity of the trigger provider | ||
| subscription_schema | list[ProviderConfig] | The credentials schema of the trigger provider | ||
| subscription_constructor | Union[TriggerSubscriptionConstructor, NoneType] | The configuration of the trigger subscription constructor | None | |
| events | list[str] | The Events of the trigger (Paths to yaml files that will be loaded as EventConfiguration) | [] | |
| extra | TriggerProviderConfigurationExtra | The extra configuration of the trigger provider |
DefaultParameterName
Values
TEMPERATURE: temperatureTOP_P: top_pTOP_K: top_kPRESENCE_PENALTY: presence_penaltyFREQUENCY_PENALTY: frequency_penaltyMAX_TOKENS: max_tokensRESPONSE_FORMAT: response_formatJSON_SCHEMA: json_schema
DatasourceProviderExtra
The extra of the datasource provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
EventParameter
The type of the parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| name | str | The name of the parameter | ||
| type | EventParameterType | The type of the parameter | ||
| auto_generate | Union[ParameterAutoGenerate, NoneType] | The auto generate of the parameter | None | |
| template | Union[ParameterTemplate, NoneType] | The template of the parameter | None | |
| scope | Union[str, NoneType] | None | ||
| required | Union[bool, NoneType] | False | ||
| multiple | Union[bool, NoneType] | Whether the parameter is multiple select, only valid for select or dynamic-select type | False | |
| default | Union[int, float, str, list, NoneType] | None | ||
| min | Union[float, int, NoneType] | None | ||
| max | Union[float, int, NoneType] | None | ||
| precision | Union[int, NoneType] | None | ||
| options | Union[list[EventParameterOption], NoneType] | None | ||
| description | Union[I18nObject, NoneType] | None |
ParameterType
Values
FLOAT: floatINT: intSTRING: stringBOOLEAN: booleanTEXT: text
ModelFeature
Values
TOOL_CALL: tool-callMULTI_TOOL_CALL: multi-tool-callAGENT_THOUGHT: agent-thoughtVISION: visionSTREAM_TOOL_CALL: stream-tool-callDOCUMENT: documentVIDEO: videoAUDIO: audioSTRUCTURED_OUTPUT: structured-outputPOLLING: polling
PriceConfig
The price config
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| input | Decimal | Input price | ||
| output | Union[Decimal, NoneType] | Output price | None | |
| unit | Decimal | Unit, e.g. 0.0001 -> per 10000 tokens | ||
| currency | str | Currency, e.g. USD |
ModelProviderHelp
Model provider help
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
ModelPosition
Model position
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| llm | Union[list[str], NoneType] | Sorts of llm model in ascending order, fill model name here | ||
| text_embedding | Union[list[str], NoneType] | Sorts of text embedding model in ascending order, fill model name here | ||
| rerank | Union[list[str], NoneType] | Sorts of rerank model in ascending order, fill model name here | ||
| tts | Union[list[str], NoneType] | Sorts of tts model in ascending order, fill model name here | ||
| speech2text | Union[list[str], NoneType] | Sorts of speech2text model in ascending order, fill model name here | ||
| moderation | Union[list[str], NoneType] | Sorts of moderation model in ascending order, fill model name here |
Model
Permission of model
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | Union[bool, NoneType] | Whether to enable invocation of model | False | |
| llm | Union[bool, NoneType] | Whether to enable invocation of llm | False | |
| text_embedding | Union[bool, NoneType] | Whether to enable invocation of text embedding | False | |
| rerank | Union[bool, NoneType] | Whether to enable invocation of rerank | False | |
| tts | Union[bool, NoneType] | Whether to enable invocation of tts | False | |
| speech2text | Union[bool, NoneType] | Whether to enable invocation of speech2text | False | |
| moderation | Union[bool, NoneType] | Whether to enable invocation of moderation | False |
EventConfiguration
The configuration of an event
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | EventIdentity | The identity of the event | ||
| parameters | list[EventParameter] | The parameters of the event | ||
| extra | EventConfigurationExtra | The extra configuration of the event | ||
| output_schema | Union[collections.abc.Mapping[str, typing.Any], NoneType] | The output schema that this event produces | None |
ToolParameterOption
The option of the tool parameter
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| value | str | The value of the option | ||
| icon | Union[str, NoneType] | The icon of the option, can be a URL or a base64 encoded string | None |
Node
Permission of node
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| enabled | Union[bool, NoneType] | Whether to enable invocation of node | False |
ToolSelectorScope
Values
ALL: allPLUGIN: pluginAPI: apiWORKFLOW: workflow
DatasourceParameter
Parameter of datasource entity
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| name | str | The name of the parameter | ||
| placeholder | Union[I18nObject, NoneType] | The placeholder presented to the user | None | |
| scope | Union[str, NoneType] | None | ||
| auto_generate | Union[ParameterAutoGenerate, NoneType] | None | ||
| template | Union[ParameterTemplate, NoneType] | None | ||
| required | bool | False | ||
| default | Union[float, int, str, NoneType] | None | ||
| min | Union[float, int, NoneType] | None | ||
| max | Union[float, int, NoneType] | None | ||
| precision | Union[int, NoneType] | None | ||
| options | list[ParameterOption] | |||
| type | DatasourceParameterType | The type of the parameter |
PluginProviderType
Values
Tool: toolModel: modelEndpoint: endpoint
DatasourceProvider
Manifest of datasource providers
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| identity | DatasourceProviderIdentity | The identity of the datasource provider | ||
| credentials_schema | list[ProviderConfig] | The credentials schema of the datasource provider | ||
| oauth_schema | Union[OAuthSchema, NoneType] | The OAuth schema of the datasource provider if OAuth is supported | None | |
| provider_type | DatasourceProviderType | The type of the datasource provider | ||
| datasources | list[str] | The datasources of the datasource provider (Paths to yaml files that will be loaded as Datasource) | ||
| extra | DatasourceProviderExtra | The extra of the datasource provider |
ParameterRule
The parameter rule of the model
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| name | str | The name of the parameter | ||
| use_template | Union[str, NoneType] | The template of the parameter | None | |
| type | ParameterType | The type of the parameter | ||
| help | Union[I18nObject, NoneType] | The help of the parameter | None | |
| required | bool | Whether the parameter is required | False | |
| default | Union[Any, NoneType] | The default value of the parameter | None | |
| min | Union[float, NoneType] | The minimum value of the parameter | None | |
| max | Union[float, NoneType] | The maximum value of the parameter | None | |
| precision | Union[int, NoneType] | The precision of the parameter | None | |
| options | list[str] | The options of the parameter | [] |
DatasourceIdentity
Identity of datasource entity
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the datasource | ||
| name | str | The name of the datasource | ||
| icon | Union[str, NoneType] | None |
ModelFieldModelSchema
Field model schema
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| placeholder | Union[I18nObject, NoneType] | None |
ToolIdentity
The identity of the tool
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the tool | ||
| name | str | The name of the tool |
ProviderConfig
A common config schema
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| name | str | The name of the credentials | ||
| type | Config | The type of the credentials | ||
| scope | Union[str, NoneType] | None | ||
| required | bool | False | ||
| default | Union[int, float, str, bool, list, NoneType] | None | ||
| options | Union[list[ConfigOption], NoneType] | None | ||
| multiple | Union[bool, NoneType] | False | ||
| help | Union[I18nObject, NoneType] | None | ||
| url | Union[str, NoneType] | None | ||
| placeholder | Union[I18nObject, NoneType] | None |
PluginLanguage
Values
PYTHON: python
Python
The extra of the agent strategy
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| source | str |
DatasourceProviderIdentity
Identity of datasource provider
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| author | str | The author of the datasource | ||
| name | str | The name of the datasource | ||
| icon | str | The icon of the datasource | ||
| tags | Union[list[DatasourceLabelEnum], NoneType] | The tags of the datasource | [] |
EndpointExtra
The extra of the endpoint
Fields
| Name | Type | Description | Default | Extra |
|---|---|---|---|---|
| python | Python |
AgentStrategyFeature
Values
HISTORY_MESSAGES: history-messages