@digipair/skill-llm 0.112.3 → 0.114.1

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.
@@ -337,12 +337,12 @@ function formatSet(input) {
337
337
  * const overallChain = new SequentialChain({
338
338
  * chains: [
339
339
  * new LLMChain({
340
- * llm: new ChatOpenAI({ temperature: 0 }),
340
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
341
341
  * prompt: promptTemplate,
342
342
  * outputKey: "synopsis",
343
343
  * }),
344
344
  * new LLMChain({
345
- * llm: new OpenAI({ temperature: 0 }),
345
+ * llm: new OpenAI({ model: "gpt-4o-mini", temperature: 0 }),
346
346
  * prompt: reviewPromptTemplate,
347
347
  * outputKey: "review",
348
348
  * }),
@@ -850,8 +850,7 @@ function formatSet(input) {
850
850
  var chain = _step.value;
851
851
  if (chain.inputKeys.filter(function(k) {
852
852
  var _chain_memory;
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
+ return !((_chain_memory = chain.memory) === null || _chain_memory === void 0 ? void 0 : _chain_memory.memoryKeys.includes(k));
855
854
  }).length !== 1) {
856
855
  throw new Error("Chains used in SimpleSequentialChain should all have one input, got ".concat(chain.inputKeys.length, " for ").concat(chain._chainType(), "."));
857
856
  }
@@ -1,4 +1,4 @@
1
- import { g as BaseChain } from './index.esm2.js';
1
+ import { b 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
@@ -334,12 +334,12 @@ function formatSet(input) {
334
334
  * const overallChain = new SequentialChain({
335
335
  * chains: [
336
336
  * new LLMChain({
337
- * llm: new ChatOpenAI({ temperature: 0 }),
337
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
338
338
  * prompt: promptTemplate,
339
339
  * outputKey: "synopsis",
340
340
  * }),
341
341
  * new LLMChain({
342
- * llm: new OpenAI({ temperature: 0 }),
342
+ * llm: new OpenAI({ model: "gpt-4o-mini", temperature: 0 }),
343
343
  * prompt: reviewPromptTemplate,
344
344
  * outputKey: "review",
345
345
  * }),
@@ -847,8 +847,7 @@ function formatSet(input) {
847
847
  var chain = _step.value;
848
848
  if (chain.inputKeys.filter(function(k) {
849
849
  var _chain_memory;
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;
850
+ return !((_chain_memory = chain.memory) === null || _chain_memory === void 0 ? void 0 : _chain_memory.memoryKeys.includes(k));
852
851
  }).length !== 1) {
853
852
  throw new Error("Chains used in SimpleSequentialChain should all have one input, got ".concat(chain.inputKeys.length, " for ").concat(chain._chainType(), "."));
854
853
  }
@@ -0,0 +1,2 @@
1
+ export * from './lib/skill-llm';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -7,3 +7,4 @@ 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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-llm.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-llm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAuT7D,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACtB,CAAC;AAE7D,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG;;EACtB,CAAC;AAEpE,eAAO,MAAM,KAAK,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,wCACtB,CAAC;AAE5D,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,wCACtB,CAAC;AAE7D,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,wCACtB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index.cjs2.js');
4
- var chat = require('./chat.cjs.js');
5
4
  require('@digipair/engine');
6
5
 
7
6
  /**
@@ -66,7 +65,6 @@ function _defineProperties$1(target, props) {
66
65
  }
67
66
  function _create_class$1(Constructor, protoProps, staticProps) {
68
67
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
69
- if (staticProps) _defineProperties$1(Constructor, staticProps);
70
68
  return Constructor;
71
69
  }
72
70
  function _get_prototype_of$1(o) {
@@ -373,10 +371,10 @@ var DEFAULT_QA_PROMPT = /*#__PURE__*/ new index.PromptTemplate({
373
371
  });
374
372
  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}";
375
373
  var messages = [
376
- /*#__PURE__*/ chat.SystemMessagePromptTemplate.fromTemplate(system_template),
377
- /*#__PURE__*/ chat.HumanMessagePromptTemplate.fromTemplate("{question}")
374
+ /*#__PURE__*/ index.SystemMessagePromptTemplate.fromTemplate(system_template),
375
+ /*#__PURE__*/ index.HumanMessagePromptTemplate.fromTemplate("{question}")
378
376
  ];
379
- var CHAT_PROMPT = /*#__PURE__*/ chat.ChatPromptTemplate.fromMessages(messages);
377
+ var CHAT_PROMPT = /*#__PURE__*/ index.ChatPromptTemplate.fromMessages(messages);
380
378
  var QA_PROMPT_SELECTOR = /*#__PURE__*/ new ConditionalPromptSelector(DEFAULT_QA_PROMPT, [
381
379
  [
382
380
  isChatModel,
@@ -510,11 +508,6 @@ function ownKeys(object, enumerableOnly) {
510
508
  var keys = Object.keys(object);
511
509
  if (Object.getOwnPropertySymbols) {
512
510
  var symbols = Object.getOwnPropertySymbols(object);
513
- if (enumerableOnly) {
514
- symbols = symbols.filter(function(sym) {
515
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
516
- });
517
- }
518
511
  keys.push.apply(keys, symbols);
519
512
  }
520
513
  return keys;
@@ -1,5 +1,4 @@
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';
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';
3
2
 
4
3
  /**
5
4
  * Abstract class that defines the interface for selecting a prompt for a
@@ -63,7 +62,6 @@ function _defineProperties$1(target, props) {
63
62
  }
64
63
  function _create_class$1(Constructor, protoProps, staticProps) {
65
64
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
66
- if (staticProps) _defineProperties$1(Constructor, staticProps);
67
65
  return Constructor;
68
66
  }
69
67
  function _get_prototype_of$1(o) {
@@ -507,11 +505,6 @@ function ownKeys(object, enumerableOnly) {
507
505
  var keys = Object.keys(object);
508
506
  if (Object.getOwnPropertySymbols) {
509
507
  var symbols = Object.getOwnPropertySymbols(object);
510
- if (enumerableOnly) {
511
- symbols = symbols.filter(function(sym) {
512
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
513
- });
514
- }
515
508
  keys.push.apply(keys, symbols);
516
509
  }
517
510
  return keys;
package/package.json CHANGED
@@ -1,12 +1,35 @@
1
1
  {
2
2
  "name": "@digipair/skill-llm",
3
- "version": "0.112.3",
3
+ "version": "0.114.1",
4
+ "main": "./dist/index.cjs.js",
5
+ "module": "./dist/index.esm.js",
6
+ "types": "./dist/index.d.ts",
4
7
  "keywords": [
5
8
  "digipair",
6
9
  "service",
7
10
  "tool"
8
11
  ],
9
- "dependencies": {},
10
- "main": "./index.cjs.js",
11
- "module": "./index.esm.js"
12
- }
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.esm.js",
16
+ "default": "./dist/index.cjs.js"
17
+ },
18
+ "./index.esm.js": "./dist/index.esm.js",
19
+ "./index.esm2.js": "./dist/index.esm2.js",
20
+ "./index.cjs.js": "./dist/index.cjs.js",
21
+ "./index.cjs2.js": "./dist/index.cjs2.js",
22
+ "./package.json": "./package.json",
23
+ "./schema.json": "./dist/schema.json",
24
+ "./schema.fr.json": "./dist/schema.fr.json"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md",
29
+ "package.json"
30
+ ],
31
+ "nx": {
32
+ "name": "skill-llm"
33
+ },
34
+ "dependencies": {}
35
+ }