@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.
@@ -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.94.0-4",
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
- "exports": {
13
- "./package.json": "./package.json",
14
- ".": {
15
- "types": "./dist/index.d.ts",
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
- return !((_chain_memory = chain.memory) === null || _chain_memory === void 0 ? void 0 : _chain_memory.memoryKeys.includes(k));
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 { b as BaseChain } from './index.esm2.js';
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
- return !((_chain_memory = chain.memory) === null || _chain_memory === void 0 ? void 0 : _chain_memory.memoryKeys.includes(k));
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__*/ index.SystemMessagePromptTemplate.fromTemplate(system_template),
374
- /*#__PURE__*/ index.HumanMessagePromptTemplate.fromTemplate("{question}")
376
+ /*#__PURE__*/ chat.SystemMessagePromptTemplate.fromTemplate(system_template),
377
+ /*#__PURE__*/ chat.HumanMessagePromptTemplate.fromTemplate("{question}")
375
378
  ];
376
- var CHAT_PROMPT = /*#__PURE__*/ index.ChatPromptTemplate.fromMessages(messages);
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, C as ChatPromptTemplate, S as SystemMessagePromptTemplate, H as HumanMessagePromptTemplate, L as LLMChain, d as StuffDocumentsChain, b as BaseChain } from './index.esm2.js';
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;
package/README.md DELETED
@@ -1,7 +0,0 @@
1
- # skill-test
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Building
6
-
7
- Run `nx build skill-llm` to build the library.