update fields

This commit is contained in:
Henry 2023-09-25 11:32:31 +01:00
parent 2bd3b7d4ea
commit ea4d3d0278
2 changed files with 46 additions and 4 deletions

View File

@ -43,7 +43,7 @@ class SqlDatabaseChain_Chains implements INode {
constructor() { constructor() {
this.label = 'Sql Database Chain' this.label = 'Sql Database Chain'
this.name = 'sqlDatabaseChain' this.name = 'sqlDatabaseChain'
this.version = 3.0 this.version = 4.0
this.type = 'SqlDatabaseChain' this.type = 'SqlDatabaseChain'
this.icon = 'sqlchain.svg' this.icon = 'sqlchain.svg'
this.category = 'Chains' this.category = 'Chains'
@ -89,7 +89,8 @@ class SqlDatabaseChain_Chains implements INode {
label: 'Include Tables', label: 'Include Tables',
name: 'includesTables', name: 'includesTables',
type: 'string', type: 'string',
description: 'Tables to include for queries.', description: 'Tables to include for queries, seperated by comma. Can only use Include Tables or Ignore Tables',
placeholder: 'table1, table2',
additionalParams: true, additionalParams: true,
optional: true optional: true
}, },
@ -97,7 +98,8 @@ class SqlDatabaseChain_Chains implements INode {
label: 'Ignore Tables', label: 'Ignore Tables',
name: 'ignoreTables', name: 'ignoreTables',
type: 'string', type: 'string',
description: 'Tables to ignore for queries.', description: 'Tables to ignore for queries, seperated by comma. Can only use Ignore Tables or Include Tables',
placeholder: 'table1, table2',
additionalParams: true, additionalParams: true,
optional: true optional: true
}, },

View File

@ -167,7 +167,7 @@
"data": { "data": {
"id": "sqlDatabaseChain_0", "id": "sqlDatabaseChain_0",
"label": "Sql Database Chain", "label": "Sql Database Chain",
"version": 2, "version": 4,
"name": "sqlDatabaseChain", "name": "sqlDatabaseChain",
"type": "SqlDatabaseChain", "type": "SqlDatabaseChain",
"baseClasses": ["SqlDatabaseChain", "BaseChain", "Runnable"], "baseClasses": ["SqlDatabaseChain", "BaseChain", "Runnable"],
@ -206,6 +206,46 @@
"placeholder": "1270.0.0.1:5432/chinook", "placeholder": "1270.0.0.1:5432/chinook",
"id": "sqlDatabaseChain_0-input-url-string" "id": "sqlDatabaseChain_0-input-url-string"
}, },
{
"label": "Include Tables",
"name": "includesTables",
"type": "string",
"description": "Tables to include for queries, seperated by comma. Can only use Include Tables or Ignore Tables",
"placeholder": "table1, table2",
"additionalParams": true,
"optional": true,
"id": "sqlDatabaseChain_0-input-includesTables-string"
},
{
"label": "Ignore Tables",
"name": "ignoreTables",
"type": "string",
"description": "Tables to ignore for queries, seperated by comma. Can only use Ignore Tables or Include Tables",
"placeholder": "table1, table2",
"additionalParams": true,
"optional": true,
"id": "sqlDatabaseChain_0-input-ignoreTables-string"
},
{
"label": "Sample table's rows info",
"name": "sampleRowsInTableInfo",
"type": "number",
"description": "Number of sample row for tables to load for info.",
"placeholder": "3",
"additionalParams": true,
"optional": true,
"id": "sqlDatabaseChain_0-input-sampleRowsInTableInfo-number"
},
{
"label": "Top Keys",
"name": "topK",
"type": "number",
"description": "If you are querying for several rows of a table you can select the maximum number of results you want to get by using the top_k parameter (default is 10). This is useful for avoiding query results that exceed the prompt max length or consume tokens unnecessarily.",
"placeholder": "10",
"additionalParams": true,
"optional": true,
"id": "sqlDatabaseChain_0-input-topK-number"
},
{ {
"label": "Custom Prompt", "label": "Custom Prompt",
"name": "customPrompt", "name": "customPrompt",