multimodal-Parent-Child and multimodal-General.
For the Knowledge Base node to recognize and embed a tool plugin’s multimodal output (such as text, images, audio, or video), complete two configurations:
- In the tool code file: Call the tool session interface to upload files and construct the
filesobject. - In the tool provider YAML file: Declare the
output_schemaas eithermultimodal-Parent-Childormultimodal-General.
Upload Files and Construct File Objects
When processing multimodal data such as images, first upload the file through Dify’s tool session to obtain the file metadata. The following example, taken from the official Dify Extractor plugin, shows how to upload a file and construct afiles object.
UploadFileResponse object containing the file information:
name, size, extension, mime_type, and so on) to the files field in the multimodal output structure.
Declare Multimodal Output Structure
Dify’s official JSON schemas define the structure of multimodal data. To let the Knowledge Base node recognize the plugin’s multimodal output type, point theresult field under output_schema in the plugin’s provider YAML file to the corresponding official schema URL.
multimodal-Parent-Child looks like this: