@saltcorn/agents 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +1 -1
- package/skills/EmbeddingRetrieval.js +10 -1
- package/skills/FTSRetrieval.js +12 -1
package/README.md
CHANGED
|
@@ -6,3 +6,5 @@ To use this plugin:
|
|
|
6
6
|
|
|
7
7
|
1. Create an action of type Agent. Configure with system prompt and skills
|
|
8
8
|
2. Create a view of type Agent chat, picking that agent in the configuration
|
|
9
|
+
|
|
10
|
+
The module is currently unstable. Some skills will be moved to other modules which will have to be installed as well.
|
package/package.json
CHANGED
|
@@ -25,7 +25,11 @@ class RetrievalByEmbedding {
|
|
|
25
25
|
table.name
|
|
26
26
|
}${
|
|
27
27
|
table.description ? ` (${table.description})` : ""
|
|
28
|
-
} for documents related to a search phrase or a question
|
|
28
|
+
} for documents related to a search phrase or a question.${
|
|
29
|
+
this.add_sys_prompt
|
|
30
|
+
? ` Additional information for the ${this.toolName} tool: ${this.add_sys_prompt}`
|
|
31
|
+
: ""
|
|
32
|
+
}`;
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
|
|
@@ -82,6 +86,11 @@ class RetrievalByEmbedding {
|
|
|
82
86
|
sublabel: "Max number of rows to find",
|
|
83
87
|
type: "String",
|
|
84
88
|
},
|
|
89
|
+
{
|
|
90
|
+
name: "add_sys_prompt",
|
|
91
|
+
label: "Additional prompt",
|
|
92
|
+
type: "String",
|
|
93
|
+
},
|
|
85
94
|
];
|
|
86
95
|
}
|
|
87
96
|
|
package/skills/FTSRetrieval.js
CHANGED
|
@@ -23,7 +23,13 @@ class RetrievalByFullTextSearch {
|
|
|
23
23
|
|
|
24
24
|
systemPrompt() {
|
|
25
25
|
if (this.mode === "Tool")
|
|
26
|
-
return `Use the ${this.toolName} tool to search the ${
|
|
26
|
+
return `Use the ${this.toolName} tool to search the ${
|
|
27
|
+
this.table_name
|
|
28
|
+
} database by a search phrase which will locate rows where any field match that query.${
|
|
29
|
+
this.add_sys_prompt
|
|
30
|
+
? ` Additional information for the ${this.toolName} tool: ${this.add_sys_prompt}`
|
|
31
|
+
: ""
|
|
32
|
+
}`;
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
static async configFields() {
|
|
@@ -68,6 +74,11 @@ class RetrievalByFullTextSearch {
|
|
|
68
74
|
type: "String",
|
|
69
75
|
sublabel: "Comma-separated list of fields to hide from the prompt",
|
|
70
76
|
},
|
|
77
|
+
{
|
|
78
|
+
name: "add_sys_prompt",
|
|
79
|
+
label: "Additional prompt",
|
|
80
|
+
type: "String",
|
|
81
|
+
},
|
|
71
82
|
/*{
|
|
72
83
|
name: "contents_expr",
|
|
73
84
|
label: "Contents string",
|