mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 11:01:18 +03:00
add Zapier NLP
This commit is contained in:
@@ -66,7 +66,8 @@ class AutoGPT_Agents implements INode {
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const model = nodeData.inputs?.model as BaseChatModel
|
||||
const vectorStoreRetriever = nodeData.inputs?.vectorStoreRetriever as VectorStoreRetriever
|
||||
const tools = nodeData.inputs?.tools as Tool[]
|
||||
let tools = nodeData.inputs?.tools as Tool[]
|
||||
tools = tools.flat()
|
||||
const aiName = (nodeData.inputs?.aiName as string) || 'AutoGPT'
|
||||
const aiRole = (nodeData.inputs?.aiRole as string) || 'Assistant'
|
||||
const maxLoop = nodeData.inputs?.maxLoop as string
|
||||
|
||||
@@ -62,7 +62,8 @@ class ConversationalAgent_Agents implements INode {
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const model = nodeData.inputs?.model as BaseChatModel
|
||||
const tools = nodeData.inputs?.tools as Tool[]
|
||||
let tools = nodeData.inputs?.tools as Tool[]
|
||||
tools = tools.flat()
|
||||
const memory = nodeData.inputs?.memory as BaseChatMemory
|
||||
const humanMessage = nodeData.inputs?.humanMessage as string
|
||||
const systemMessage = nodeData.inputs?.systemMessage as string
|
||||
|
||||
@@ -39,7 +39,8 @@ class MRKLAgentChat_Agents implements INode {
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const model = nodeData.inputs?.model as BaseChatModel
|
||||
const tools = nodeData.inputs?.tools as Tool[]
|
||||
let tools = nodeData.inputs?.tools as Tool[]
|
||||
tools = tools.flat()
|
||||
const executor = await initializeAgentExecutorWithOptions(tools, model, {
|
||||
agentType: 'chat-zero-shot-react-description',
|
||||
verbose: true
|
||||
|
||||
@@ -26,7 +26,7 @@ class MRKLAgentLLM_Agents implements INode {
|
||||
{
|
||||
label: 'Allowed Tools',
|
||||
name: 'tools',
|
||||
type: 'Tool' || 'Tool[]',
|
||||
type: 'Tool',
|
||||
list: true
|
||||
},
|
||||
{
|
||||
@@ -39,8 +39,9 @@ class MRKLAgentLLM_Agents implements INode {
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const model = nodeData.inputs?.model as BaseLLM
|
||||
const tools = nodeData.inputs?.tools as Tool[]
|
||||
console.log(`something about tools: ${JSON.stringify(tools)}`)
|
||||
let tools = nodeData.inputs?.tools as Tool[]
|
||||
tools = tools.flat()
|
||||
|
||||
const executor = await initializeAgentExecutorWithOptions(tools, model, {
|
||||
agentType: 'zero-shot-react-description',
|
||||
verbose: true
|
||||
|
||||
Reference in New Issue
Block a user