@digipair/skill-chatbot 0.2.8 → 0.2.10
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/index.cjs2.js
CHANGED
@@ -41114,27 +41114,27 @@ Summarize the conversation history in a short, clear and concise text, taking in
|
|
41114
41114
|
const [document] = await this.searchDocuments(baseUrl, session, `is_parent = true and userQuery() order by date desc limit 1`, {
|
41115
41115
|
query: `role:"${role}"`
|
41116
41116
|
});
|
41117
|
-
|
41117
|
+
return document;
|
41118
41118
|
}
|
41119
41119
|
async setRole(params, _pinsSettingsList, context) {
|
41120
41120
|
var _context_private;
|
41121
41121
|
const session = `${context.request.digipair}-${context.request.body.userId}`;
|
41122
41122
|
var _context_private_VESPA_SERVER;
|
41123
|
-
const { baseUrl = (_context_private_VESPA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, role,
|
41123
|
+
const { baseUrl = (_context_private_VESPA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, role, value } = params;
|
41124
41124
|
const [previous] = await this.searchDocuments(baseUrl, session, `is_parent = true and userQuery() order by date desc limit 1`, {
|
41125
41125
|
query: `role:"${role}"`
|
41126
41126
|
});
|
41127
41127
|
var _previous_uuid;
|
41128
|
-
const
|
41128
|
+
const document = _extends({
|
41129
41129
|
session,
|
41130
41130
|
date: Date.now(),
|
41131
41131
|
role
|
41132
|
-
},
|
41132
|
+
}, value, {
|
41133
41133
|
uuid: (_previous_uuid = previous == null ? void 0 : previous.uuid) != null ? _previous_uuid : v4(),
|
41134
41134
|
is_parent: true
|
41135
41135
|
});
|
41136
41136
|
await this.updateDocuments(baseUrl, [
|
41137
|
-
|
41137
|
+
document
|
41138
41138
|
]);
|
41139
41139
|
}
|
41140
41140
|
constructor(){
|
package/index.esm2.js
CHANGED
@@ -41092,27 +41092,27 @@ Summarize the conversation history in a short, clear and concise text, taking in
|
|
41092
41092
|
const [document] = await this.searchDocuments(baseUrl, session, `is_parent = true and userQuery() order by date desc limit 1`, {
|
41093
41093
|
query: `role:"${role}"`
|
41094
41094
|
});
|
41095
|
-
|
41095
|
+
return document;
|
41096
41096
|
}
|
41097
41097
|
async setRole(params, _pinsSettingsList, context) {
|
41098
41098
|
var _context_private;
|
41099
41099
|
const session = `${context.request.digipair}-${context.request.body.userId}`;
|
41100
41100
|
var _context_private_VESPA_SERVER;
|
41101
|
-
const { baseUrl = (_context_private_VESPA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, role,
|
41101
|
+
const { baseUrl = (_context_private_VESPA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, role, value } = params;
|
41102
41102
|
const [previous] = await this.searchDocuments(baseUrl, session, `is_parent = true and userQuery() order by date desc limit 1`, {
|
41103
41103
|
query: `role:"${role}"`
|
41104
41104
|
});
|
41105
41105
|
var _previous_uuid;
|
41106
|
-
const
|
41106
|
+
const document = _extends({
|
41107
41107
|
session,
|
41108
41108
|
date: Date.now(),
|
41109
41109
|
role
|
41110
|
-
},
|
41110
|
+
}, value, {
|
41111
41111
|
uuid: (_previous_uuid = previous == null ? void 0 : previous.uuid) != null ? _previous_uuid : v4(),
|
41112
41112
|
is_parent: true
|
41113
41113
|
});
|
41114
41114
|
await this.updateDocuments(baseUrl, [
|
41115
|
-
|
41115
|
+
document
|
41116
41116
|
]);
|
41117
41117
|
}
|
41118
41118
|
constructor(){
|
@@ -9,6 +9,6 @@ export declare const chatbot: (params: any, pinsSettingsList: PinsSettings[], co
|
|
9
9
|
logs: any;
|
10
10
|
}>;
|
11
11
|
export declare const boost: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
12
|
-
export declare const getRole: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<
|
12
|
+
export declare const getRole: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
13
13
|
export declare const setRole: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
14
14
|
export {};
|