@digipair/skill-chatbot 0.2.5 → 0.2.7

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
@@ -40973,7 +40973,7 @@ let ChatbotService = class ChatbotService {
40973
40973
  var _context_private_VESPA_SERVER;
40974
40974
  const { baseUrl = (_context_private_VESPA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, maxHistory = 100, system = `You are a useful assistant, capable of explaining concepts in an easy-to-understand manner. If you're not sure of an answer, you can say "I don't know" or "I'm not sure."`, question = 'Hello, how can I help you?' } = params;
40975
40975
  let messages = [];
40976
- const history1 = await this.searchDocuments(baseUrl, session, `is_parent = true and !(role contains "system") order by date desc limit ${maxHistory}`);
40976
+ const history1 = await this.searchDocuments(baseUrl, session, `is_parent = true and (role contains "assistant" or role contains "user") order by date desc limit ${maxHistory}`);
40977
40977
  messages = history1.sort((a, b)=>a.date - b.date).map((document)=>({
40978
40978
  role: document.role,
40979
40979
  content: document.content
package/index.esm2.js CHANGED
@@ -40951,7 +40951,7 @@ let ChatbotService = class ChatbotService {
40951
40951
  var _context_private_VESPA_SERVER;
40952
40952
  const { baseUrl = (_context_private_VESPA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, maxHistory = 100, system = `You are a useful assistant, capable of explaining concepts in an easy-to-understand manner. If you're not sure of an answer, you can say "I don't know" or "I'm not sure."`, question = 'Hello, how can I help you?' } = params;
40953
40953
  let messages = [];
40954
- const history1 = await this.searchDocuments(baseUrl, session, `is_parent = true and !(role contains "system") order by date desc limit ${maxHistory}`);
40954
+ const history1 = await this.searchDocuments(baseUrl, session, `is_parent = true and (role contains "assistant" or role contains "user") order by date desc limit ${maxHistory}`);
40955
40955
  messages = history1.sort((a, b)=>a.date - b.date).map((document)=>({
40956
40956
  role: document.role,
40957
40957
  content: document.content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-chatbot",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"