mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Bugfix/tool node selected tool (#4579)
* fix tool node selected tool * fix tool node config * update node to display tool node icons
This commit is contained in:
@@ -187,7 +187,10 @@ class Tool_Agentflow implements INode {
|
|||||||
|
|
||||||
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {
|
async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {
|
||||||
const selectedTool = (nodeData.inputs?.selectedTool as string) || (nodeData.inputs?.toolAgentflowSelectedTool as string)
|
const selectedTool = (nodeData.inputs?.selectedTool as string) || (nodeData.inputs?.toolAgentflowSelectedTool as string)
|
||||||
const selectedToolConfig = nodeData.inputs?.selectedToolConfig as ICommonObject
|
const selectedToolConfig =
|
||||||
|
(nodeData?.inputs?.selectedToolConfig as ICommonObject) ||
|
||||||
|
(nodeData?.inputs?.toolAgentflowSelectedToolConfig as ICommonObject) ||
|
||||||
|
{}
|
||||||
|
|
||||||
const toolInputArgs = nodeData.inputs?.toolInputArgs as IToolInputArgs[]
|
const toolInputArgs = nodeData.inputs?.toolInputArgs as IToolInputArgs[]
|
||||||
const _toolUpdateState = nodeData.inputs?.toolUpdateState
|
const _toolUpdateState = nodeData.inputs?.toolUpdateState
|
||||||
|
|||||||
@@ -401,8 +401,11 @@ const AgentFlowNode = ({ data }) => {
|
|||||||
{ tools: data.inputs?.llmTools, toolProperty: 'llmSelectedTool' },
|
{ tools: data.inputs?.llmTools, toolProperty: 'llmSelectedTool' },
|
||||||
{ tools: data.inputs?.agentTools, toolProperty: 'agentSelectedTool' },
|
{ tools: data.inputs?.agentTools, toolProperty: 'agentSelectedTool' },
|
||||||
{
|
{
|
||||||
tools: data.inputs?.selectedTool ? [{ selectedTool: data.inputs?.selectedTool }] : [],
|
tools:
|
||||||
toolProperty: 'selectedTool'
|
data.inputs?.selectedTool ?? data.inputs?.toolAgentflowSelectedTool
|
||||||
|
? [{ selectedTool: data.inputs?.selectedTool ?? data.inputs?.toolAgentflowSelectedTool }]
|
||||||
|
: [],
|
||||||
|
toolProperty: ['selectedTool', 'toolAgentflowSelectedTool']
|
||||||
},
|
},
|
||||||
{ tools: data.inputs?.agentKnowledgeVSEmbeddings, toolProperty: ['vectorStore', 'embeddingModel'] }
|
{ tools: data.inputs?.agentKnowledgeVSEmbeddings, toolProperty: ['vectorStore', 'embeddingModel'] }
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user