@saltcorn/agents 0.3.2 → 0.3.3
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/package.json +1 -1
- package/skills/FTSRetrieval.js +2 -2
- package/skills/Table.js +9 -6
package/package.json
CHANGED
package/skills/FTSRetrieval.js
CHANGED
|
@@ -25,7 +25,7 @@ class RetrievalByFullTextSearch {
|
|
|
25
25
|
if (this.mode === "Tool")
|
|
26
26
|
return `Use the ${this.toolName} tool to search the ${
|
|
27
27
|
this.table_name
|
|
28
|
-
} database by a search phrase which will locate rows where any field match that query.${
|
|
28
|
+
} database by a search phrase (using the syntax of web search engines) which will locate rows where any field match that query.${
|
|
29
29
|
this.list_view
|
|
30
30
|
? ` When the tool call returns rows, do not describe them or repeat the information to the user. The results are already displayed to the user automatically.`
|
|
31
31
|
: ""
|
|
@@ -161,7 +161,7 @@ class RetrievalByFullTextSearch {
|
|
|
161
161
|
properties: {
|
|
162
162
|
phrase: {
|
|
163
163
|
type: "string",
|
|
164
|
-
description: "The phrase to search the table with",
|
|
164
|
+
description: "The phrase to search the table with. The search phrase is the synatx used by web search engines: use double quotes for exact match, unquoted text for words in any order, dash (minus sign) to exclude a word. Do not use SQL or any other formal query language.",
|
|
165
165
|
},
|
|
166
166
|
},
|
|
167
167
|
},
|
package/skills/Table.js
CHANGED
|
@@ -21,9 +21,11 @@ class TableToSkill {
|
|
|
21
21
|
systemPrompt() {
|
|
22
22
|
return `Use the query_${this.table_name} tool to search the ${
|
|
23
23
|
this.table_name
|
|
24
|
-
} database by a search phrase which will locate rows where any field match that query.${
|
|
25
|
-
this.
|
|
26
|
-
|
|
24
|
+
} database by specific fields or a search phrase which will locate rows where any field match that query.${
|
|
25
|
+
this.list_view
|
|
26
|
+
? ` When the tool call returns rows, do not describe them or repeat the information to the user. The results are already displayed to the user automatically.`
|
|
27
|
+
: ""
|
|
28
|
+
}${this.add_sys_prompt ? ` ${this.add_sys_prompt}` : ""}`;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
static async configFields() {
|
|
@@ -78,7 +80,7 @@ class TableToSkill {
|
|
|
78
80
|
name: "add_sys_prompt",
|
|
79
81
|
label: "Additional system prompt",
|
|
80
82
|
type: "String",
|
|
81
|
-
fieldview: "textarea"
|
|
83
|
+
fieldview: "textarea",
|
|
82
84
|
},
|
|
83
85
|
];
|
|
84
86
|
}
|
|
@@ -173,11 +175,12 @@ class TableToSkill {
|
|
|
173
175
|
{
|
|
174
176
|
type: "object",
|
|
175
177
|
description:
|
|
176
|
-
"Search the table by a phrase matched against any string field",
|
|
178
|
+
"Search the table by a phrase matched against any string field, using the syntax of web search engines",
|
|
177
179
|
properties: {
|
|
178
180
|
full_text_search: {
|
|
179
181
|
type: "string",
|
|
180
|
-
description:
|
|
182
|
+
description:
|
|
183
|
+
"A phrase to search the table with. The search phrase is the synatx used by web search engines: use double quotes for exact match, unquoted text for words in any order, dash (minus sign) to exclude a word. Do not use SQL or any other formal query language.",
|
|
181
184
|
},
|
|
182
185
|
},
|
|
183
186
|
},
|