mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 01:01:11 +03:00
Bugfix/add hidden properties to custom tool (#3875)
add hidden properties to custom tool
This commit is contained in:
@@ -18,7 +18,7 @@ class CustomTool_Tools implements INode {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.label = 'Custom Tool'
|
this.label = 'Custom Tool'
|
||||||
this.name = 'customTool'
|
this.name = 'customTool'
|
||||||
this.version = 2.0
|
this.version = 3.0
|
||||||
this.type = 'CustomTool'
|
this.type = 'CustomTool'
|
||||||
this.icon = 'customtool.svg'
|
this.icon = 'customtool.svg'
|
||||||
this.category = 'Tools'
|
this.category = 'Tools'
|
||||||
@@ -36,6 +36,30 @@ class CustomTool_Tools implements INode {
|
|||||||
description: 'Return the output of the tool directly to the user',
|
description: 'Return the output of the tool directly to the user',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
optional: true
|
optional: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Custom Tool Name',
|
||||||
|
name: 'customToolName',
|
||||||
|
type: 'string',
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Custom Tool Description',
|
||||||
|
name: 'customToolDesc',
|
||||||
|
type: 'string',
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Custom Tool Schema',
|
||||||
|
name: 'customToolSchema',
|
||||||
|
type: 'string',
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Custom Tool Func',
|
||||||
|
name: 'customToolFunc',
|
||||||
|
type: 'string',
|
||||||
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
this.baseClasses = [this.type, 'Tool', ...getBaseClasses(DynamicStructuredTool)]
|
this.baseClasses = [this.type, 'Tool', ...getBaseClasses(DynamicStructuredTool)]
|
||||||
|
|||||||
@@ -1067,12 +1067,12 @@ export const replaceInputsWithConfig = (
|
|||||||
* Several conditions:
|
* Several conditions:
|
||||||
* 1. If config is 'analytics', always allow it
|
* 1. If config is 'analytics', always allow it
|
||||||
* 2. If config is 'vars', check its object and filter out the variables that are not enabled for override
|
* 2. If config is 'vars', check its object and filter out the variables that are not enabled for override
|
||||||
* 3. If typeof config is an object, check if the node id is in the overrideConfig object and if the parameter (systemMessagePrompt) is enabled
|
* 3. If typeof config's value is an object, check if the node id is in the overrideConfig object and if the parameter (systemMessagePrompt) is enabled
|
||||||
* Example:
|
* Example:
|
||||||
* "systemMessagePrompt": {
|
* "systemMessagePrompt": {
|
||||||
* "chatPromptTemplate_0": "You are an assistant"
|
* "chatPromptTemplate_0": "You are an assistant"
|
||||||
* }
|
* }
|
||||||
* 4. If typeof config is a string, check if the parameter is enabled
|
* 4. If typeof config's value is a string, check if the parameter is enabled
|
||||||
* Example:
|
* Example:
|
||||||
* "systemMessagePrompt": "You are an assistant"
|
* "systemMessagePrompt": "You are an assistant"
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user