mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
@@ -125,7 +125,10 @@ class Tool_Agentflow implements INode {
|
|||||||
async listToolInputArgs(nodeData: INodeData, options: ICommonObject): Promise<INodeOptionsValue[]> {
|
async listToolInputArgs(nodeData: INodeData, options: ICommonObject): Promise<INodeOptionsValue[]> {
|
||||||
const currentNode = options.currentNode as ICommonObject
|
const currentNode = options.currentNode as ICommonObject
|
||||||
const selectedTool = (currentNode?.inputs?.selectedTool as string) || (currentNode?.inputs?.toolAgentflowSelectedTool as string)
|
const selectedTool = (currentNode?.inputs?.selectedTool as string) || (currentNode?.inputs?.toolAgentflowSelectedTool as string)
|
||||||
const selectedToolConfig = currentNode?.inputs?.selectedToolConfig as ICommonObject
|
const selectedToolConfig =
|
||||||
|
(currentNode?.inputs?.selectedToolConfig as ICommonObject) ||
|
||||||
|
(currentNode?.inputs?.toolAgentflowSelectedToolConfig as ICommonObject) ||
|
||||||
|
{}
|
||||||
|
|
||||||
const nodeInstanceFilePath = options.componentNodes[selectedTool].filePath as string
|
const nodeInstanceFilePath = options.componentNodes[selectedTool].filePath as string
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ interface AgentToolConfig {
|
|||||||
|
|
||||||
interface NodeInputs {
|
interface NodeInputs {
|
||||||
agentTools?: AgentToolConfig[]
|
agentTools?: AgentToolConfig[]
|
||||||
selectedTool?: string
|
toolAgentflowSelectedTool?: string
|
||||||
toolInputArgs?: Record<string, any>[]
|
toolInputArgs?: Record<string, any>[]
|
||||||
selectedToolConfig?: {
|
toolAgentflowSelectedToolConfig?: {
|
||||||
selectedTool: string
|
toolAgentflowSelectedTool: string
|
||||||
}
|
}
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
}
|
}
|
||||||
@@ -284,10 +284,10 @@ Now, select the ONLY tool that is needed to achieve the given task. You must onl
|
|||||||
if (Array.isArray(tools) && tools.length > 0) {
|
if (Array.isArray(tools) && tools.length > 0) {
|
||||||
selectedTools.push(...tools)
|
selectedTools.push(...tools)
|
||||||
|
|
||||||
node.data.inputs.selectedTool = tools[0]
|
node.data.inputs.toolAgentflowSelectedTool = tools[0]
|
||||||
node.data.inputs.toolInputArgs = []
|
node.data.inputs.toolInputArgs = []
|
||||||
node.data.inputs.selectedToolConfig = {
|
node.data.inputs.toolAgentflowSelectedToolConfig = {
|
||||||
selectedTool: tools[0]
|
toolAgentflowSelectedTool: tools[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user