mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
change flat to flatten from lodash
This commit is contained in:
@@ -3,6 +3,7 @@ import { BaseChatModel } from 'langchain/chat_models/base'
|
||||
import { AutoGPT } from 'langchain/experimental/autogpt'
|
||||
import { Tool } from 'langchain/tools'
|
||||
import { VectorStoreRetriever } from 'langchain/vectorstores/base'
|
||||
import { flatten } from 'lodash'
|
||||
|
||||
class AutoGPT_Agents implements INode {
|
||||
label: string
|
||||
@@ -67,7 +68,7 @@ class AutoGPT_Agents implements INode {
|
||||
const model = nodeData.inputs?.model as BaseChatModel
|
||||
const vectorStoreRetriever = nodeData.inputs?.vectorStoreRetriever as VectorStoreRetriever
|
||||
let tools = nodeData.inputs?.tools as Tool[]
|
||||
tools = tools.flat()
|
||||
tools = flatten(tools)
|
||||
const aiName = (nodeData.inputs?.aiName as string) || 'AutoGPT'
|
||||
const aiRole = (nodeData.inputs?.aiRole as string) || 'Assistant'
|
||||
const maxLoop = nodeData.inputs?.maxLoop as string
|
||||
|
||||
Reference in New Issue
Block a user