Node
This document describes how plugins can reverse invoke the functionality of Chatflow/Workflow application nodes within the Dify platform. It primarily covers the invocation methods for two specific nodes, ParameterExtractor and QuestionClassifier. The document details the entry points, interface parameters, and example code for invoking these two nodes.
Reverse invoking a Node means that a plugin can access the capabilities of certain nodes within a Dify Chatflow/Workflow application.
The ParameterExtractor
and QuestionClassifier
nodes in Workflow
encapsulate complex Prompt and code logic, enabling tasks that are difficult to solve with hardcoding through LLMs. Plugins can call these two nodes.
Calling the Parameter Extractor Node
Entry Point
Interface
Here, parameters
is a list of parameters to be extracted, model
conforms to the LLMModelConfig
specification, query
is the source text for parameter extraction, and instruction
provides any additional instructions that might be needed for the LLM. For the structure of NodeResponse
, please refer to this document.
Use Case
To extract a person’s name from a conversation, you can refer to the following code:
Calling the Question Classifier Node
Entry Point
Interface
The interface parameters are consistent with ParameterExtractor
. The final result is stored in NodeResponse.outputs['class_name']
.