@saltcorn/agents 0.2.2 → 0.2.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
CHANGED
|
@@ -14,7 +14,7 @@ class RetrievalByEmbedding {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
get toolName() {
|
|
17
|
-
return `search_${this.
|
|
17
|
+
return `search_${this.vec_field.split(".")[0].replaceAll(" ", "")}`;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
systemPrompt() {
|
|
@@ -118,7 +118,7 @@ class RetrievalByEmbedding {
|
|
|
118
118
|
|
|
119
119
|
provideTools() {
|
|
120
120
|
if (this.mode !== "Tool") return [];
|
|
121
|
-
const table0 = Table.findOne(this.vec_field.split
|
|
121
|
+
const table0 = Table.findOne(this.vec_field.split(".")[0]);
|
|
122
122
|
const table_docs = this.doc_relation
|
|
123
123
|
? Table.findOne(table0.getField(this.doc_relation).reftable_name)
|
|
124
124
|
: table0;
|
|
@@ -190,7 +190,7 @@ class RetrievalByEmbedding {
|
|
|
190
190
|
},
|
|
191
191
|
function: {
|
|
192
192
|
name: this.toolName,
|
|
193
|
-
description: `Search the ${table_docs.name
|
|
193
|
+
description: `Search the ${table_docs.name} archive${
|
|
194
194
|
table_docs.description ? ` (${table_docs.description})` : ""
|
|
195
195
|
} for information related to a search phrase or a question. The relevant documents will be returned`,
|
|
196
196
|
parameters: {
|