@sprucelabs/sprucebot-llm 2.1.1 → 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.
- package/build/bots/SprucebotLlmFactory.d.ts +2 -0
- package/build/bots/SprucebotLlmFactory.js +7 -1
- package/build/esm/bots/SprucebotLlmFactory.d.ts +2 -0
- package/build/esm/bots/SprucebotLlmFactory.js +7 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -1
- package/package.json +1 -1
|
@@ -3,9 +3,11 @@ 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>>>;
|
|
9
10
|
setBotInstance(bot: SprucebotLlmBot): void;
|
|
10
11
|
static Factory(): SprucebotLlmFactory;
|
|
12
|
+
static reset(): void;
|
|
11
13
|
}
|
|
@@ -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) {
|
|
@@ -33,5 +34,10 @@ class SprucebotLlmFactory {
|
|
|
33
34
|
var _a;
|
|
34
35
|
return new ((_a = this.FactoryClass) !== null && _a !== void 0 ? _a : this)();
|
|
35
36
|
}
|
|
37
|
+
static reset() {
|
|
38
|
+
this.BotClass = undefined;
|
|
39
|
+
this.FactoryClass = undefined;
|
|
40
|
+
this.SkillClass = undefined;
|
|
41
|
+
}
|
|
36
42
|
}
|
|
37
43
|
exports.default = SprucebotLlmFactory;
|
|
@@ -3,9 +3,11 @@ 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>>>;
|
|
9
10
|
setBotInstance(bot: SprucebotLlmBot): void;
|
|
10
11
|
static Factory(): SprucebotLlmFactory;
|
|
12
|
+
static reset(): void;
|
|
11
13
|
}
|
|
@@ -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) {
|
|
@@ -28,4 +29,9 @@ export default class SprucebotLlmFactory {
|
|
|
28
29
|
var _a;
|
|
29
30
|
return new ((_a = this.FactoryClass) !== null && _a !== void 0 ? _a : this)();
|
|
30
31
|
}
|
|
32
|
+
static reset() {
|
|
33
|
+
this.BotClass = undefined;
|
|
34
|
+
this.FactoryClass = undefined;
|
|
35
|
+
this.SkillClass = undefined;
|
|
36
|
+
}
|
|
31
37
|
}
|
package/build/esm/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/esm/index.js
CHANGED
|
@@ -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);
|