@sprucelabs/sprucebot-llm 2.2.0 → 2.3.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.
@@ -3,6 +3,7 @@ export default class SprucebotLlmFactory {
3
3
  private instance?;
4
4
  static FactoryClass?: typeof SprucebotLlmFactory;
5
5
  static BotClass?: new (options: any) => SprucebotLlmBot;
6
+ static SkillClass?: new (options: any) => SprucebotLLmSkill;
6
7
  Bot(options: BotOptions): SprucebotLlmBot;
7
8
  Skill(options: SkillOptions): SprucebotLLmSkill;
8
9
  getBotInstance(): SprucebotLlmBot<import("@sprucelabs/schema").Schema, import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/schema").Schema, false, never, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/schema").Schema, false>>>;
@@ -15,8 +15,9 @@ class SprucebotLlmFactory {
15
15
  return new ((_a = Class !== null && Class !== void 0 ? Class : SprucebotLlmFactory.BotClass) !== null && _a !== void 0 ? _a : SprucebotLlmBotImpl_1.default)(options);
16
16
  }
17
17
  Skill(options) {
18
+ var _a;
18
19
  (0, schema_1.assertOptions)(options, ['yourJobIfYouChooseToAcceptItIs']);
19
- return new SprucebotLlmSkillImpl_1.default(options);
20
+ return new ((_a = SprucebotLlmFactory.SkillClass) !== null && _a !== void 0 ? _a : SprucebotLlmSkillImpl_1.default)(options);
20
21
  }
21
22
  getBotInstance() {
22
23
  if (!this.instance) {
@@ -36,6 +37,7 @@ class SprucebotLlmFactory {
36
37
  static reset() {
37
38
  this.BotClass = undefined;
38
39
  this.FactoryClass = undefined;
40
+ this.SkillClass = undefined;
39
41
  }
40
42
  }
41
43
  exports.default = SprucebotLlmFactory;
@@ -3,6 +3,7 @@ export default class SprucebotLlmFactory {
3
3
  private instance?;
4
4
  static FactoryClass?: typeof SprucebotLlmFactory;
5
5
  static BotClass?: new (options: any) => SprucebotLlmBot;
6
+ static SkillClass?: new (options: any) => SprucebotLLmSkill;
6
7
  Bot(options: BotOptions): SprucebotLlmBot;
7
8
  Skill(options: SkillOptions): SprucebotLLmSkill;
8
9
  getBotInstance(): SprucebotLlmBot<import("@sprucelabs/schema").Schema, import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/schema").Schema, false, never, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/schema").Schema, false>>>;
@@ -10,8 +10,9 @@ export default class SprucebotLlmFactory {
10
10
  return new ((_a = Class !== null && Class !== void 0 ? Class : SprucebotLlmFactory.BotClass) !== null && _a !== void 0 ? _a : SprucebotLlmBotImpl)(options);
11
11
  }
12
12
  Skill(options) {
13
+ var _a;
13
14
  assertOptions(options, ['yourJobIfYouChooseToAcceptItIs']);
14
- return new SprucebotLlmSkillImpl(options);
15
+ return new ((_a = SprucebotLlmFactory.SkillClass) !== null && _a !== void 0 ? _a : SprucebotLlmSkillImpl)(options);
15
16
  }
16
17
  getBotInstance() {
17
18
  if (!this.instance) {
@@ -31,5 +32,6 @@ export default class SprucebotLlmFactory {
31
32
  static reset() {
32
33
  this.BotClass = undefined;
33
34
  this.FactoryClass = undefined;
35
+ this.SkillClass = undefined;
34
36
  }
35
37
  }
@@ -1,4 +1,5 @@
1
1
  export { default as SprucebotLlmFactory } from './bots/SprucebotLlmFactory';
2
2
  export { default as SprucebotLlmBotImpl } from './bots/SprucebotLlmBotImpl';
3
+ export { default as SprucebotLlmSkillImpl } from './bots/SprucebotLlmSkillImpl';
3
4
  export { OpenAiAdapter } from './bots/adapters/OpenAi';
4
5
  export * from './llm.types';
@@ -1,4 +1,5 @@
1
1
  export { default as SprucebotLlmFactory } from './bots/SprucebotLlmFactory.js';
2
2
  export { default as SprucebotLlmBotImpl } from './bots/SprucebotLlmBotImpl.js';
3
+ export { default as SprucebotLlmSkillImpl } from './bots/SprucebotLlmSkillImpl.js';
3
4
  export { OpenAiAdapter } from './bots/adapters/OpenAi.js';
4
5
  export * from './llm.types.js';
package/build/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as SprucebotLlmFactory } from './bots/SprucebotLlmFactory';
2
2
  export { default as SprucebotLlmBotImpl } from './bots/SprucebotLlmBotImpl';
3
+ export { default as SprucebotLlmSkillImpl } from './bots/SprucebotLlmSkillImpl';
3
4
  export { OpenAiAdapter } from './bots/adapters/OpenAi';
4
5
  export * from './llm.types';
package/build/index.js CHANGED
@@ -17,11 +17,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.OpenAiAdapter = exports.SprucebotLlmBotImpl = exports.SprucebotLlmFactory = void 0;
20
+ exports.OpenAiAdapter = exports.SprucebotLlmSkillImpl = exports.SprucebotLlmBotImpl = exports.SprucebotLlmFactory = void 0;
21
21
  var SprucebotLlmFactory_1 = require("./bots/SprucebotLlmFactory");
22
22
  Object.defineProperty(exports, "SprucebotLlmFactory", { enumerable: true, get: function () { return __importDefault(SprucebotLlmFactory_1).default; } });
23
23
  var SprucebotLlmBotImpl_1 = require("./bots/SprucebotLlmBotImpl");
24
24
  Object.defineProperty(exports, "SprucebotLlmBotImpl", { enumerable: true, get: function () { return __importDefault(SprucebotLlmBotImpl_1).default; } });
25
+ var SprucebotLlmSkillImpl_1 = require("./bots/SprucebotLlmSkillImpl");
26
+ Object.defineProperty(exports, "SprucebotLlmSkillImpl", { enumerable: true, get: function () { return __importDefault(SprucebotLlmSkillImpl_1).default; } });
25
27
  var OpenAi_1 = require("./bots/adapters/OpenAi");
26
28
  Object.defineProperty(exports, "OpenAiAdapter", { enumerable: true, get: function () { return OpenAi_1.OpenAiAdapter; } });
27
29
  __exportStar(require("./llm.types"), exports);
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "@sprucelabs/spruce-test-fixtures"
10
10
  ]
11
11
  },
12
- "version": "2.2.0",
12
+ "version": "2.3.0",
13
13
  "files": [
14
14
  "build"
15
15
  ],