@digipair/skill-chatbot 0.5.6 → 0.5.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
@@ -41030,7 +41030,7 @@ Summary of conversation history:
41030
41030
  New messages:
41031
41031
  {history}
41032
41032
 
41033
- Summarize the conversation history in a short, clear and concise text, taking into account the new messages.`, command = [], assistant, sources, logs } = params;
41033
+ Summarize the conversation history in a short, clear and concise text, taking into account the new messages.`, command = [], boosts = [], minBoostSemanticScore = 0.65, assistant, sources, logs } = params;
41034
41034
  const input = context.request.body;
41035
41035
  const date = Date.now();
41036
41036
  var _input_inputs;
@@ -41073,9 +41073,21 @@ Summarize the conversation history in a short, clear and concise text, taking in
41073
41073
  temperature,
41074
41074
  baseUrl: baseUrlOllama
41075
41075
  });
41076
+ const filteredBoosts = [];
41077
+ let i = boosts.length - 1;
41078
+ while(i >= 0){
41079
+ if (boosts[i].matchfeatures.semantic_score >= minBoostSemanticScore) {
41080
+ while(i >= 0){
41081
+ filteredBoosts.push(JSON.parse(boosts[i].trigger));
41082
+ i--;
41083
+ }
41084
+ }
41085
+ i--;
41086
+ }
41076
41087
  return {
41077
41088
  assistant,
41078
41089
  command: await Promise.all(command.map((settings)=>engine.preparePinsSettings(settings, context))),
41090
+ boosts: filteredBoosts,
41079
41091
  sources,
41080
41092
  logs
41081
41093
  };
package/index.esm2.js CHANGED
@@ -41028,7 +41028,7 @@ Summary of conversation history:
41028
41028
  New messages:
41029
41029
  {history}
41030
41030
 
41031
- Summarize the conversation history in a short, clear and concise text, taking into account the new messages.`, command = [], assistant, sources, logs } = params;
41031
+ Summarize the conversation history in a short, clear and concise text, taking into account the new messages.`, command = [], boosts = [], minBoostSemanticScore = 0.65, assistant, sources, logs } = params;
41032
41032
  const input = context.request.body;
41033
41033
  const date = Date.now();
41034
41034
  var _input_inputs;
@@ -41071,9 +41071,21 @@ Summarize the conversation history in a short, clear and concise text, taking in
41071
41071
  temperature,
41072
41072
  baseUrl: baseUrlOllama
41073
41073
  });
41074
+ const filteredBoosts = [];
41075
+ let i = boosts.length - 1;
41076
+ while(i >= 0){
41077
+ if (boosts[i].matchfeatures.semantic_score >= minBoostSemanticScore) {
41078
+ while(i >= 0){
41079
+ filteredBoosts.push(JSON.parse(boosts[i].trigger));
41080
+ i--;
41081
+ }
41082
+ }
41083
+ i--;
41084
+ }
41074
41085
  return {
41075
41086
  assistant,
41076
41087
  command: await Promise.all(command.map((settings)=>preparePinsSettings(settings, context))),
41088
+ boosts: filteredBoosts,
41077
41089
  sources,
41078
41090
  logs
41079
41091
  };
@@ -5,6 +5,7 @@ export declare const search: (params: any, pinsSettingsList: PinsSettings[], con
5
5
  export declare const chatbot: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<{
6
6
  assistant: any;
7
7
  command: any[];
8
+ boosts: any[];
8
9
  sources: any;
9
10
  logs: any;
10
11
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-chatbot",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",