@digipair/skill-chatbot 0.0.1 → 0.0.2
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/{few_shot.cjs.js → few_shot.esm.js} +9 -13
- package/index.esm.js +1 -0
- package/{index.cjs2.js → index.esm2.js} +12596 -84
- package/libs/engine/src/index.d.ts +2 -0
- package/libs/engine/src/lib/engine.d.ts +27 -0
- package/libs/engine/src/lib/pins-settings.interface.d.ts +20 -0
- package/package.json +2 -2
- package/index.cjs.js +0 -13
- /package/{index.cjs.d.ts → index.esm.d.ts} +0 -0
- /package/{src → libs/skill-chatbot/src}/index.d.ts +0 -0
- /package/{src → libs/skill-chatbot/src}/lib/skill-chatbot.d.ts +0 -0
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
var index = require('./index.cjs2.js');
|
4
|
-
require('@digipair/engine');
|
1
|
+
import { c as checkValidTemplate, B as BaseStringPromptTemplate, a as BaseChatPromptTemplate, P as PromptTemplate, r as renderTemplate } from './index.esm2.js';
|
5
2
|
|
6
3
|
function _array_like_to_array(arr, len) {
|
7
4
|
if (len == null || len > arr.length) len = arr.length;
|
@@ -397,7 +394,7 @@ function _ts_generator(thisArg, body) {
|
|
397
394
|
if (_this.partialVariables) {
|
398
395
|
totalInputVariables = totalInputVariables.concat(Object.keys(_this.partialVariables));
|
399
396
|
}
|
400
|
-
|
397
|
+
checkValidTemplate(_this.prefix + _this.suffix, _this.templateFormat, totalInputVariables);
|
401
398
|
}
|
402
399
|
return _this;
|
403
400
|
}
|
@@ -494,7 +491,7 @@ function _ts_generator(thisArg, body) {
|
|
494
491
|
]).join(_this.exampleSeparator);
|
495
492
|
return [
|
496
493
|
2,
|
497
|
-
|
494
|
+
renderTemplate(template, _this.templateFormat, allValues)
|
498
495
|
];
|
499
496
|
}
|
500
497
|
});
|
@@ -543,7 +540,7 @@ function _ts_generator(thisArg, body) {
|
|
543
540
|
}
|
544
541
|
return [
|
545
542
|
4,
|
546
|
-
|
543
|
+
PromptTemplate.deserialize(example_prompt)
|
547
544
|
];
|
548
545
|
case 1:
|
549
546
|
examplePrompt = _state.sent();
|
@@ -571,7 +568,7 @@ function _ts_generator(thisArg, body) {
|
|
571
568
|
}
|
572
569
|
]);
|
573
570
|
return FewShotPromptTemplate;
|
574
|
-
}(
|
571
|
+
}(BaseStringPromptTemplate);
|
575
572
|
/**
|
576
573
|
* Chat prompt template that contains few-shot examples.
|
577
574
|
* @augments BasePromptTemplateInput
|
@@ -661,7 +658,7 @@ function _ts_generator(thisArg, body) {
|
|
661
658
|
if (_this.partialVariables) {
|
662
659
|
totalInputVariables = totalInputVariables.concat(Object.keys(_this.partialVariables));
|
663
660
|
}
|
664
|
-
|
661
|
+
checkValidTemplate(_this.prefix + _this.suffix, _this.templateFormat, totalInputVariables);
|
665
662
|
}
|
666
663
|
return _this;
|
667
664
|
}
|
@@ -839,7 +836,7 @@ function _ts_generator(thisArg, body) {
|
|
839
836
|
]).join(_this.exampleSeparator);
|
840
837
|
return [
|
841
838
|
2,
|
842
|
-
|
839
|
+
renderTemplate(template, _this.templateFormat, allValues)
|
843
840
|
];
|
844
841
|
}
|
845
842
|
});
|
@@ -882,7 +879,6 @@ function _ts_generator(thisArg, body) {
|
|
882
879
|
}
|
883
880
|
]);
|
884
881
|
return FewShotChatMessagePromptTemplate;
|
885
|
-
}(
|
882
|
+
}(BaseChatPromptTemplate);
|
886
883
|
|
887
|
-
|
888
|
-
exports.FewShotPromptTemplate = FewShotPromptTemplate;
|
884
|
+
export { FewShotChatMessagePromptTemplate, FewShotPromptTemplate };
|
package/index.esm.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { e as boost, d as chatbot, b as conversation, h as history } from './index.esm2.js';
|