process method. A unique node type is automatically registered once per subclass.
Example:
Constructor
CustomNode.
Type Parameters
The type of the inputs to the node, should be
any or one of the following CustomNodeInputTypes:- ClassificationResult
- Content
- GoalAdvancement
- KnowledgeRecords
- ListToolsResponse
- LLMChatRequest
- TTSRequest
- MatchedIntents
- MatchedKeywords
- MemoryState
- ToolCallResponse
- TextStream
- ContentStream
- TTSOutputStream
- SpeechChunkStream
- Custom<any>
- string
The type of the outputs from the node, should be
any or one of the following CustomNodeOutputTypes:- string
- LLMChatRequest
- TTSRequest
- TextStream
- SpeechChunkStream
- TTSOutputStream
- ListToolsResponse
- ToolCallResponse
- TransformationStreamTextToText
- TransformationStreamTextToTTS
- Custom<any>
Parameters
props (CustomNodeProps) = {}
Custom node options including optional executionConfig. Subclasses can pass an executionConfig object to surface additional execution-time properties. Execution config would be available to the process function in the ProcessContext.
Returns
CustomNode<InputType, OutputType>
Overrides AbstractNode.constructor
Methods
process
Abstract
Parameters
context (ProcessContext)
The execution context.
...inputs (InputType[])
The inputs to the node.
Returns
OutputType | Promise<OutputType> - The output of the node.