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:
Henry Heng
2024-07-22 17:46:14 +01:00
committed by GitHub
parent 34d0e4302c
commit bca4de0c63
152 changed files with 55307 additions and 35236 deletions
+51 -3
View File
@@ -20,6 +20,7 @@ export type NodeParamsType =
| 'date'
| 'file'
| 'folder'
| 'tabs'
export type CommonType = string | number | boolean | undefined | null
@@ -63,6 +64,8 @@ export interface INodeOutputsValue {
name: string
baseClasses: string[]
description?: string
hidden?: boolean
isAnchor?: boolean
}
export interface INodeParams {
@@ -85,7 +88,11 @@ export interface INodeParams {
additionalParams?: boolean
loadMethod?: string
hidden?: boolean
variables?: ICommonObject[]
hideCodeExecute?: boolean
codeExample?: string
hint?: Record<string, string>
tabIdentifier?: string
tabs?: Array<INodeParams>
}
export interface INodeExecutionData {
@@ -109,6 +116,7 @@ export interface INodeProperties {
filePath?: string
badge?: string
deprecateMessage?: string
hideOutput?: boolean
}
export interface INode extends INodeProperties {
@@ -151,6 +159,7 @@ export interface IUsedTool {
tool: string
toolInput: object
toolOutput: string | object
sourceDocuments?: ICommonObject[]
}
export interface IMultiAgentNode {
@@ -166,6 +175,27 @@ export interface IMultiAgentNode {
recursionLimit?: number
moderations?: Moderation[]
multiModalMessageContent?: MessageContentImageUrl[]
checkpointMemory?: any
}
type SeqAgentType = 'agent' | 'condition' | 'end' | 'start' | 'tool' | 'state' | 'llm'
export interface ISeqAgentNode {
id: string
node: any
name: string
label: string
type: SeqAgentType
output: string
llm?: any
startLLM?: any
predecessorAgents?: ISeqAgentNode[]
recursionLimit?: number
moderations?: Moderation[]
multiModalMessageContent?: MessageContentImageUrl[]
checkpointMemory?: any
agentInterruptToolNode?: any
agentInterruptToolFunc?: any
}
export interface ITeamState {
@@ -176,13 +206,31 @@ export interface ITeamState {
team_members: string[]
next: string
instructions: string
summarization: string
}
export interface ISeqAgentsState {
messages: {
value: (x: BaseMessage[], y: BaseMessage[]) => BaseMessage[]
default: () => BaseMessage[]
}
}
export interface IAgentReasoning {
agentName: string
messages: string[]
next: string
instructions: string
next?: string
instructions?: string
usedTools?: IUsedTool[]
sourceDocuments?: ICommonObject[]
state?: ICommonObject
nodeName?: string
}
export interface IAction {
id?: string
elements?: Array<{ type: string; label: string }>
mapping?: { approve: string; reject: string; toolCalls: any[] }
}
export interface IFileUpload {