@digipair/skill-chatbot 0.2.4 → 0.2.5

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
@@ -40971,7 +40971,7 @@ let ChatbotService = class ChatbotService {
40971
40971
  var _context_private;
40972
40972
  const session = `${context.request.digipair}-${context.request.body.userId}`;
40973
40973
  var _context_private_VESPA_SERVER;
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 = `Vous êtes un assistant utile, capable d'expliquer des concepts de manière simple à comprendre. Si vous n'êtes pas sûr d'une réponse, vous pouvez dire "Je ne sais pas" ou "Je ne suis pas sûr".`, question = 'Bonjour, comment puis-je vous aider ?' } = params;
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
40976
  const history1 = await this.searchDocuments(baseUrl, session, `is_parent = true and !(role contains "system") order by date desc limit ${maxHistory}`);
40977
40977
  messages = history1.sort((a, b)=>a.date - b.date).map((document)=>({
@@ -41045,13 +41045,13 @@ let ChatbotService = class ChatbotService {
41045
41045
  const session = `${context.request.digipair}-${context.request.body.userId}`;
41046
41046
  var _context_private_OLLAMA_SERVER, _context_private_VESPA_SERVER;
41047
41047
  const { modelName = 'mistral', temperature = 0, baseUrlOllama = (_context_private_OLLAMA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.OLLAMA_SERVER) != null ? _context_private_OLLAMA_SERVER : OLLAMA_SERVER, baseUrlVespa = (_context_private_VESPA_SERVER = (_context_private1 = context.private) == null ? void 0 : _context_private1.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, promptSummary = `
41048
- Résumé de l'historique la conversation:
41048
+ Summary of conversation history:
41049
41049
  {summary}
41050
41050
 
41051
- Nouveaux messages:
41051
+ New messages:
41052
41052
  {history}
41053
41053
 
41054
- Résumer dans un texte court, précis et concis l'historique de la conversation en prenant en compte les nouveaux messages.`, command = [], assistant, sources, logs } = params;
41054
+ Summarize the conversation history in a short, clear and concise text, taking into account the new messages.`, command = [], assistant, sources, logs } = params;
41055
41055
  const input = context.request.body;
41056
41056
  const date = Date.now();
41057
41057
  var _input_inputs;
package/index.esm2.js CHANGED
@@ -40949,7 +40949,7 @@ let ChatbotService = class ChatbotService {
40949
40949
  var _context_private;
40950
40950
  const session = `${context.request.digipair}-${context.request.body.userId}`;
40951
40951
  var _context_private_VESPA_SERVER;
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 = `Vous êtes un assistant utile, capable d'expliquer des concepts de manière simple à comprendre. Si vous n'êtes pas sûr d'une réponse, vous pouvez dire "Je ne sais pas" ou "Je ne suis pas sûr".`, question = 'Bonjour, comment puis-je vous aider ?' } = params;
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
40954
  const history1 = await this.searchDocuments(baseUrl, session, `is_parent = true and !(role contains "system") order by date desc limit ${maxHistory}`);
40955
40955
  messages = history1.sort((a, b)=>a.date - b.date).map((document)=>({
@@ -41023,13 +41023,13 @@ let ChatbotService = class ChatbotService {
41023
41023
  const session = `${context.request.digipair}-${context.request.body.userId}`;
41024
41024
  var _context_private_OLLAMA_SERVER, _context_private_VESPA_SERVER;
41025
41025
  const { modelName = 'mistral', temperature = 0, baseUrlOllama = (_context_private_OLLAMA_SERVER = (_context_private = context.private) == null ? void 0 : _context_private.OLLAMA_SERVER) != null ? _context_private_OLLAMA_SERVER : OLLAMA_SERVER, baseUrlVespa = (_context_private_VESPA_SERVER = (_context_private1 = context.private) == null ? void 0 : _context_private1.VESPA_SERVER) != null ? _context_private_VESPA_SERVER : VESPA_SERVER, promptSummary = `
41026
- Résumé de l'historique la conversation:
41026
+ Summary of conversation history:
41027
41027
  {summary}
41028
41028
 
41029
- Nouveaux messages:
41029
+ New messages:
41030
41030
  {history}
41031
41031
 
41032
- Résumer dans un texte court, précis et concis l'historique de la conversation en prenant en compte les nouveaux messages.`, command = [], assistant, sources, logs } = params;
41032
+ Summarize the conversation history in a short, clear and concise text, taking into account the new messages.`, command = [], assistant, sources, logs } = params;
41033
41033
  const input = context.request.body;
41034
41034
  const date = Date.now();
41035
41035
  var _input_inputs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-chatbot",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"