mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Add more nodes for agents, loaders
This commit is contained in:
@@ -17,6 +17,8 @@ export type NodeParamsType =
|
||||
|
||||
export type CommonType = string | number | boolean | undefined | null
|
||||
|
||||
export type MessageType = 'apiMessage' | 'userMessage'
|
||||
|
||||
/**
|
||||
* Others
|
||||
*/
|
||||
@@ -49,6 +51,7 @@ export interface INodeParams {
|
||||
rows?: number
|
||||
list?: boolean
|
||||
placeholder?: string
|
||||
fileType?: string
|
||||
}
|
||||
|
||||
export interface INodeExecutionData {
|
||||
@@ -74,10 +77,15 @@ export interface INode extends INodeProperties {
|
||||
inputs?: INodeParams[]
|
||||
getBaseClasses?(): Promise<string[]>
|
||||
getInstance?(nodeData: INodeData): Promise<string>
|
||||
run?(nodeData: INodeData, input: string): Promise<string>
|
||||
run?(nodeData: INodeData, input: string, options?: ICommonObject): Promise<string>
|
||||
}
|
||||
|
||||
export interface INodeData extends INodeProperties {
|
||||
inputs?: ICommonObject
|
||||
instance?: any
|
||||
}
|
||||
|
||||
export interface IMessage {
|
||||
message: string
|
||||
type: MessageType
|
||||
}
|
||||
|
||||
@@ -4,6 +4,13 @@ import * as path from 'path'
|
||||
export const numberOrExpressionRegex = '^(\\d+\\.?\\d*|{{.*}})$' //return true if string consists only numbers OR expression {{}}
|
||||
export const notEmptyRegex = '(.|\\s)*\\S(.|\\s)*' //return true if string is not empty or blank
|
||||
|
||||
/**
|
||||
* Get base classes of components
|
||||
*
|
||||
* @export
|
||||
* @param {any} targetClass
|
||||
* @returns {string[]}
|
||||
*/
|
||||
export const getBaseClasses = (targetClass: any) => {
|
||||
const baseClasses: string[] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user