@digipair/skill-llm 0.94.0-4 → 0.95.0
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/{dist/api_chain.cjs.js → api_chain.cjs.js} +1 -0
- package/{dist/api_chain.esm.js → api_chain.esm.js} +1 -1
- package/chat.cjs.js +2418 -0
- package/chat.esm.js +2413 -0
- package/{dist/few_shot.cjs.js → few_shot.cjs.js} +8 -1
- package/{dist/few_shot.esm.js → few_shot.esm.js} +7 -1
- package/{dist/index.cjs.js → index.cjs.js} +3 -0
- package/index.cjs2.js +58513 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/{dist/index.esm2.js → index.esm2.js} +72711 -102633
- package/libs/skill-llm/src/index.d.ts +1 -0
- package/{dist → libs/skill-llm}/src/lib/skill-llm.d.ts +0 -1
- package/package.json +5 -21
- package/{dist/sequential_chain.cjs.js → sequential_chain.cjs.js} +3 -1
- package/{dist/sequential_chain.esm.js → sequential_chain.esm.js} +3 -2
- package/{dist/vector_db_qa.cjs.js → vector_db_qa.cjs.js} +11 -3
- package/{dist/vector_db_qa.esm.js → vector_db_qa.esm.js} +8 -1
- package/README.md +0 -7
- package/dist/index.cjs2.js +0 -116395
- package/dist/index.esm.js +0 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/skill-llm.d.ts.map +0 -1
- package/dist/src/lib/skill-llm.spec.d.ts +0 -2
- package/dist/src/lib/skill-llm.spec.d.ts.map +0 -1
- /package/{dist/index.d.ts → index.cjs.d.ts} +0 -0
- /package/{dist/schema.fr.json → schema.fr.json} +0 -0
- /package/{dist/schema.json → schema.json} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/skill-llm';
|
@@ -7,4 +7,3 @@ export declare const reasoningStep: (params: any, pinsSettingsList: PinsSettings
|
|
7
7
|
export declare const basic: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<RunnableSequence<any, any>>;
|
8
8
|
export declare const vision: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<RunnableSequence<any, any>>;
|
9
9
|
export declare const summarization: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<RunnableSequence<any, any>>;
|
10
|
-
//# sourceMappingURL=skill-llm.d.ts.map
|
package/package.json
CHANGED
@@ -1,28 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@digipair/skill-llm",
|
3
|
-
"version": "0.
|
4
|
-
"main": "./dist/index.cjs.js",
|
5
|
-
"module": "./dist/index.esm.js",
|
6
|
-
"types": "./dist/index.d.ts",
|
3
|
+
"version": "0.95.0",
|
7
4
|
"keywords": [
|
8
5
|
"digipair",
|
9
6
|
"service",
|
10
7
|
"tool"
|
11
8
|
],
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"import": "./dist/index.esm.js",
|
17
|
-
"default": "./dist/index.cjs.js"
|
18
|
-
}
|
19
|
-
},
|
20
|
-
"files": [
|
21
|
-
"dist",
|
22
|
-
"!**/*.tsbuildinfo"
|
23
|
-
],
|
24
|
-
"nx": {
|
25
|
-
"name": "skill-llm"
|
26
|
-
},
|
27
|
-
"dependencies": {}
|
28
|
-
}
|
9
|
+
"dependencies": {},
|
10
|
+
"main": "./index.cjs.js",
|
11
|
+
"module": "./index.esm.js"
|
12
|
+
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
var index = require('./index.cjs2.js');
|
4
|
+
require('@digipair/engine');
|
4
5
|
|
5
6
|
/**
|
6
7
|
* Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#implementing_basic_set_operations
|
@@ -849,7 +850,8 @@ function formatSet(input) {
|
|
849
850
|
var chain = _step.value;
|
850
851
|
if (chain.inputKeys.filter(function(k) {
|
851
852
|
var _chain_memory;
|
852
|
-
|
853
|
+
var _ref;
|
854
|
+
return (_ref = !((_chain_memory = chain.memory) === null || _chain_memory === void 0 ? void 0 : _chain_memory.memoryKeys.includes(k))) !== null && _ref !== void 0 ? _ref : true;
|
853
855
|
}).length !== 1) {
|
854
856
|
throw new Error("Chains used in SimpleSequentialChain should all have one input, got ".concat(chain.inputKeys.length, " for ").concat(chain._chainType(), "."));
|
855
857
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { g as BaseChain } from './index.esm2.js';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#implementing_basic_set_operations
|
@@ -847,7 +847,8 @@ function formatSet(input) {
|
|
847
847
|
var chain = _step.value;
|
848
848
|
if (chain.inputKeys.filter(function(k) {
|
849
849
|
var _chain_memory;
|
850
|
-
|
850
|
+
var _ref;
|
851
|
+
return (_ref = !((_chain_memory = chain.memory) === null || _chain_memory === void 0 ? void 0 : _chain_memory.memoryKeys.includes(k))) !== null && _ref !== void 0 ? _ref : true;
|
851
852
|
}).length !== 1) {
|
852
853
|
throw new Error("Chains used in SimpleSequentialChain should all have one input, got ".concat(chain.inputKeys.length, " for ").concat(chain._chainType(), "."));
|
853
854
|
}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
var index = require('./index.cjs2.js');
|
4
|
+
var chat = require('./chat.cjs.js');
|
5
|
+
require('@digipair/engine');
|
4
6
|
|
5
7
|
/**
|
6
8
|
* Abstract class that defines the interface for selecting a prompt for a
|
@@ -64,6 +66,7 @@ function _defineProperties$1(target, props) {
|
|
64
66
|
}
|
65
67
|
function _create_class$1(Constructor, protoProps, staticProps) {
|
66
68
|
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
69
|
+
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
67
70
|
return Constructor;
|
68
71
|
}
|
69
72
|
function _get_prototype_of$1(o) {
|
@@ -370,10 +373,10 @@ var DEFAULT_QA_PROMPT = /*#__PURE__*/ new index.PromptTemplate({
|
|
370
373
|
});
|
371
374
|
var system_template = "Use the following pieces of context to answer the users question. \nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\n{context}";
|
372
375
|
var messages = [
|
373
|
-
/*#__PURE__*/
|
374
|
-
/*#__PURE__*/
|
376
|
+
/*#__PURE__*/ chat.SystemMessagePromptTemplate.fromTemplate(system_template),
|
377
|
+
/*#__PURE__*/ chat.HumanMessagePromptTemplate.fromTemplate("{question}")
|
375
378
|
];
|
376
|
-
var CHAT_PROMPT = /*#__PURE__*/
|
379
|
+
var CHAT_PROMPT = /*#__PURE__*/ chat.ChatPromptTemplate.fromMessages(messages);
|
377
380
|
var QA_PROMPT_SELECTOR = /*#__PURE__*/ new ConditionalPromptSelector(DEFAULT_QA_PROMPT, [
|
378
381
|
[
|
379
382
|
isChatModel,
|
@@ -507,6 +510,11 @@ function ownKeys(object, enumerableOnly) {
|
|
507
510
|
var keys = Object.keys(object);
|
508
511
|
if (Object.getOwnPropertySymbols) {
|
509
512
|
var symbols = Object.getOwnPropertySymbols(object);
|
513
|
+
if (enumerableOnly) {
|
514
|
+
symbols = symbols.filter(function(sym) {
|
515
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
516
|
+
});
|
517
|
+
}
|
510
518
|
keys.push.apply(keys, symbols);
|
511
519
|
}
|
512
520
|
return keys;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { P as PromptTemplate,
|
1
|
+
import { P as PromptTemplate, L as LLMChain, h as StuffDocumentsChain, g as BaseChain } from './index.esm2.js';
|
2
|
+
import { C as ChatPromptTemplate, S as SystemMessagePromptTemplate, H as HumanMessagePromptTemplate } from './chat.esm.js';
|
2
3
|
|
3
4
|
/**
|
4
5
|
* Abstract class that defines the interface for selecting a prompt for a
|
@@ -62,6 +63,7 @@ function _defineProperties$1(target, props) {
|
|
62
63
|
}
|
63
64
|
function _create_class$1(Constructor, protoProps, staticProps) {
|
64
65
|
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
66
|
+
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
65
67
|
return Constructor;
|
66
68
|
}
|
67
69
|
function _get_prototype_of$1(o) {
|
@@ -505,6 +507,11 @@ function ownKeys(object, enumerableOnly) {
|
|
505
507
|
var keys = Object.keys(object);
|
506
508
|
if (Object.getOwnPropertySymbols) {
|
507
509
|
var symbols = Object.getOwnPropertySymbols(object);
|
510
|
+
if (enumerableOnly) {
|
511
|
+
symbols = symbols.filter(function(sym) {
|
512
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
513
|
+
});
|
514
|
+
}
|
508
515
|
keys.push.apply(keys, symbols);
|
509
516
|
}
|
510
517
|
return keys;
|