mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Feature/seq agents (#2798)
* update build functions * sequential agents * update langchain to 0.2, added sequential agent nodes * add marketplace templates * update howto wordings * Merge branch 'main' into feature/Seq-Agents # Conflicts: # pnpm-lock.yaml * update deprecated functions and add new sequential nodes * add marketplace templates * update marketplace templates, add structured output to llm node * add multi agents template * update llm node with bindmodels * update cypress version * update templates sticky note wordings * update tool node to include human in loop action * update structured outputs error from models * update cohere package to resolve google genai pipeThrough bug * update mistral package version, added message reconstruction before invoke seq agent * add HITL to agent * update state messages restructuring * update load and split methods for s3 directory
This commit is contained in:
@@ -21,17 +21,19 @@ class Worker_MultiAgents implements INode {
|
||||
icon: string
|
||||
category: string
|
||||
baseClasses: string[]
|
||||
hideOutput: boolean
|
||||
inputs?: INodeParams[]
|
||||
badge?: string
|
||||
|
||||
constructor() {
|
||||
this.label = 'Worker'
|
||||
this.name = 'worker'
|
||||
this.version = 1.0
|
||||
this.version = 2.0
|
||||
this.type = 'Worker'
|
||||
this.icon = 'worker.svg'
|
||||
this.category = 'Multi Agents'
|
||||
this.baseClasses = [this.type]
|
||||
this.hideOutput = true
|
||||
this.inputs = [
|
||||
{
|
||||
label: 'Worker Name',
|
||||
@@ -137,6 +139,7 @@ class Worker_MultiAgents implements INode {
|
||||
state,
|
||||
agent: agent,
|
||||
name: workerName,
|
||||
nodeId: nodeData.id,
|
||||
abortControllerSignal
|
||||
},
|
||||
config
|
||||
@@ -269,8 +272,9 @@ async function agentNode(
|
||||
state,
|
||||
agent,
|
||||
name,
|
||||
nodeId,
|
||||
abortControllerSignal
|
||||
}: { state: ITeamState; agent: AgentExecutor | RunnableSequence; name: string; abortControllerSignal: AbortController },
|
||||
}: { state: ITeamState; agent: AgentExecutor | RunnableSequence; name: string; nodeId: string; abortControllerSignal: AbortController },
|
||||
config: RunnableConfig
|
||||
) {
|
||||
try {
|
||||
@@ -279,7 +283,7 @@ async function agentNode(
|
||||
}
|
||||
|
||||
const result = await agent.invoke({ ...state, signal: abortControllerSignal.signal }, config)
|
||||
const additional_kwargs: ICommonObject = {}
|
||||
const additional_kwargs: ICommonObject = { nodeId }
|
||||
if (result.usedTools) {
|
||||
additional_kwargs.usedTools = result.usedTools
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user