Feature/Seq Agent Nodes Update (#2942)

update all seg agent nodes to 2.0 for UI UX improvements
This commit is contained in:
Henry Heng
2024-08-06 11:30:08 +01:00
committed by GitHub
parent 7153093bfc
commit 70d7420d02
21 changed files with 1789 additions and 887 deletions
@@ -162,17 +162,19 @@ class Agent_SeqAgents implements INode {
baseClasses: string[]
inputs?: INodeParams[]
badge?: string
documentation?: string
outputs: INodeOutputsValue[]
constructor() {
this.label = 'Agent'
this.name = 'seqAgent'
this.version = 1.0
this.version = 2.0
this.type = 'Agent'
this.icon = 'seqAgent.png'
this.category = 'Sequential Agents'
this.description = 'Agent that can execute tools'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-4.-agent-node'
this.inputs = [
{
label: 'Agent Name',
@@ -201,12 +203,13 @@ class Agent_SeqAgents implements INode {
label: 'Tools',
name: 'tools',
type: 'Tool',
list: true
list: true,
optional: true
},
{
label: 'Start | Agent | LLM | Tool Node',
label: 'Start | Agent | Condition | LLM | Tool Node',
name: 'sequentialNode',
type: 'Start | Agent | LLMNode | ToolNode',
type: 'Start | Agent | Condition | LLMNode | ToolNode',
list: true
},
{
@@ -90,17 +90,19 @@ class Condition_SeqAgents implements INode {
baseClasses: string[]
credential: INodeParams
inputs: INodeParams[]
documentation?: string
outputs: INodeOutputsValue[]
constructor() {
this.label = 'Condition'
this.name = 'seqCondition'
this.version = 1.0
this.version = 2.0
this.type = 'Condition'
this.icon = 'condition.svg'
this.category = 'Sequential Agents'
this.description = 'Conditional function to determine which route to take next'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-7.-conditional-node'
this.inputs = [
{
label: 'Condition Name',
@@ -214,13 +216,13 @@ class Condition_SeqAgents implements INode {
{
label: 'Next',
name: 'next',
baseClasses: ['Agent', 'LLMNode', 'ToolNode'],
baseClasses: ['Condition'],
isAnchor: true
},
{
label: 'End',
name: 'end',
baseClasses: ['Agent', 'LLMNode', 'ToolNode'],
baseClasses: ['Condition'],
isAnchor: true
}
]
@@ -143,17 +143,19 @@ class ConditionAgent_SeqAgents implements INode {
baseClasses: string[]
credential: INodeParams
inputs: INodeParams[]
documentation?: string
outputs: INodeOutputsValue[]
constructor() {
this.label = 'Condition Agent'
this.name = 'seqConditionAgent'
this.version = 1.0
this.version = 2.0
this.type = 'ConditionAgent'
this.icon = 'condition.svg'
this.category = 'Sequential Agents'
this.description = 'Uses an agent to determine which route to take next'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-8.-conditional-agent-node'
this.inputs = [
{
label: 'Name',
@@ -330,13 +332,13 @@ class ConditionAgent_SeqAgents implements INode {
{
label: 'Next',
name: 'next',
baseClasses: ['Agent', 'LLMNode', 'ToolNode'],
baseClasses: ['Condition'],
isAnchor: true
},
{
label: 'End',
name: 'end',
baseClasses: ['Agent', 'LLMNode', 'ToolNode'],
baseClasses: ['Condition'],
isAnchor: true
}
]
@@ -11,23 +11,25 @@ class End_SeqAgents implements INode {
category: string
baseClasses: string[]
credential: INodeParams
documentation?: string
inputs: INodeParams[]
hideOutput: boolean
constructor() {
this.label = 'End'
this.name = 'seqEnd'
this.version = 1.0
this.version = 2.0
this.type = 'End'
this.icon = 'end.svg'
this.category = 'Sequential Agents'
this.description = 'End conversation'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-10.-end-node'
this.inputs = [
{
label: 'Start | Agent | LLM | Tool Node',
label: 'Agent | Condition | LLM | Tool Node',
name: 'sequentialNode',
type: 'Start | Agent | LLMNode | ToolNode'
type: 'Agent | Condition | LLMNode | ToolNode'
}
]
this.hideOutput = true
@@ -141,17 +141,19 @@ class LLMNode_SeqAgents implements INode {
baseClasses: string[]
inputs?: INodeParams[]
badge?: string
documentation?: string
outputs: INodeOutputsValue[]
constructor() {
this.label = 'LLM Node'
this.name = 'seqLLMNode'
this.version = 1.0
this.version = 2.0
this.type = 'LLMNode'
this.icon = 'llmNode.svg'
this.category = 'Sequential Agents'
this.description = 'Run Chat Model and return the output'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-5.-llm-node'
this.inputs = [
{
label: 'Name',
@@ -177,9 +179,9 @@ class LLMNode_SeqAgents implements INode {
additionalParams: true
},
{
label: 'Start | Agent | LLM | Tool Node',
label: 'Start | Agent | Condition | LLM | Tool Node',
name: 'sequentialNode',
type: 'Start | Agent | LLMNode | ToolNode',
type: 'Start | Agent | Condition | LLMNode | ToolNode',
list: true
},
{
@@ -9,6 +9,7 @@ class Loop_SeqAgents implements INode {
icon: string
category: string
baseClasses: string[]
documentation?: string
credential: INodeParams
inputs: INodeParams[]
hideOutput: boolean
@@ -16,25 +17,26 @@ class Loop_SeqAgents implements INode {
constructor() {
this.label = 'Loop'
this.name = 'seqLoop'
this.version = 1.0
this.version = 2.0
this.type = 'Loop'
this.icon = 'loop.svg'
this.category = 'Sequential Agents'
this.description = 'Loop back to the specific sequential node'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-9.-loop-node'
this.inputs = [
{
label: 'Start | Agent | LLM | Tool Node',
label: 'Agent | Condition | LLM | Tool Node',
name: 'sequentialNode',
type: 'Start | Agent | LLMNode | ToolNode',
type: 'Agent | Condition | LLMNode | ToolNode',
list: true
},
{
label: 'Loop To',
name: 'loopToName',
description: 'Name of the agent to loop back to',
description: 'Name of the agent/llm to loop back to',
type: 'string',
placeholder: 'agent1'
placeholder: 'Agent'
}
]
this.hideOutput = true
@@ -12,18 +12,20 @@ class Start_SeqAgents implements INode {
icon: string
category: string
baseClasses: string[]
documentation?: string
credential: INodeParams
inputs: INodeParams[]
constructor() {
this.label = 'Start'
this.name = 'seqStart'
this.version = 1.0
this.version = 2.0
this.type = 'Start'
this.icon = 'start.svg'
this.category = 'Sequential Agents'
this.description = 'Starting point of the conversation'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-1.-start-node'
this.inputs = [
{
label: 'Chat Model',
@@ -34,21 +34,23 @@ class State_SeqAgents implements INode {
icon: string
category: string
baseClasses: string[]
documentation?: string
credential: INodeParams
inputs: INodeParams[]
constructor() {
this.label = 'State'
this.name = 'seqState'
this.version = 1.0
this.version = 2.0
this.type = 'State'
this.icon = 'state.svg'
this.category = 'Sequential Agents'
this.description = 'A centralized state object, updated by nodes in the graph, passing from one node to another'
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-3.-state-node'
this.inputs = [
{
label: 'State',
label: 'Custom State',
name: 'stateMemory',
type: 'tabs',
tabIdentifier: TAB_IDENTIFIER,
@@ -56,7 +58,7 @@ class State_SeqAgents implements INode {
default: 'stateMemoryUI',
tabs: [
{
label: 'State (Table)',
label: 'Custom State (Table)',
name: 'stateMemoryUI',
type: 'datagrid',
description:
@@ -80,7 +82,7 @@ class State_SeqAgents implements INode {
additionalParams: true
},
{
label: 'State (Code)',
label: 'Custom State (Code)',
name: 'stateMemoryCode',
type: 'code',
description: `JSON object representing the state`,
@@ -136,18 +136,20 @@ class ToolNode_SeqAgents implements INode {
icon: string
category: string
baseClasses: string[]
documentation?: string
credential: INodeParams
inputs: INodeParams[]
constructor() {
this.label = 'Tool Node'
this.name = 'seqToolNode'
this.version = 1.0
this.version = 2.0
this.type = 'ToolNode'
this.icon = 'toolNode.svg'
this.category = 'Sequential Agents'
this.description = `Execute tool and return tool's output`
this.baseClasses = [this.type]
this.documentation = 'https://docs.flowiseai.com/using-flowise/agentflows/sequential-agents#id-6.-tool-node'
this.inputs = [
{
label: 'Tools',