@futdevpro/nts-dynamo 1.14.32 → 1.14.33
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/_modules/ai/_services/ai-llm-chat.service-base.d.ts +0 -4
- package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts +1 -1
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts +1 -2
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass-main.control-service.js +4 -7
- package/build/_modules/assistant/_services/ass-main.control-service.js.map +1 -1
- package/package.json +1 -1
- package/src/_modules/ai/_services/ai-llm-chat.service-base.ts +3 -3
- package/src/_modules/assistant/_services/ass-io.control-service.ts +1 -1
- package/src/_modules/assistant/_services/ass-main.control-service.ts +4 -8
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DyNTS_AI_LLM_ServiceBase } from './ai-llm.service-base';
|
|
2
|
-
import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
|
|
3
2
|
import { DyFM_AI_ConversationQuestion_Input, DyFM_AI_ConversationSelect_Input, DyFM_AI_ConversationGenericSelect_Input, DyFM_AI_ConversationMultiSelect_Input, DyFM_AI_ConversationGenericMultiSelect_Input, DyFM_AI_ConversationJSONKeysDescription_Input, DyFM_AI_ConversationJSONExactKeys_Input, DyFM_AI_ConversationGetAnswer_Input } from '../_models/ai-input-interfaces';
|
|
4
3
|
/**
|
|
5
4
|
* Abstract base class for LLM Chat services
|
|
@@ -9,15 +8,12 @@ export declare abstract class DyNTS_AI_LLMChat_ServiceBase extends DyNTS_AI_LLM_
|
|
|
9
8
|
/**
|
|
10
9
|
* Add a message to the conversation history
|
|
11
10
|
*/
|
|
12
|
-
abstract addMessageToHistory(message: DyFM_AI_Message, issuer: string): void;
|
|
13
11
|
/**
|
|
14
12
|
* Clear the conversation history for an issuer
|
|
15
13
|
*/
|
|
16
|
-
abstract clearHistory(issuer: string): void;
|
|
17
14
|
/**
|
|
18
15
|
* Get the conversation history for an issuer
|
|
19
16
|
*/
|
|
20
|
-
abstract getHistory(issuer: string): DyFM_AI_Message[];
|
|
21
17
|
abstract yesNoQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<boolean>;
|
|
22
18
|
abstract simpleQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string>;
|
|
23
19
|
abstract percentageQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_services/ai-llm-chat.service-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_services/ai-llm-chat.service-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EACL,kCAAkC,EAClC,gCAAgC,EAChC,uCAAuC,EACvC,qCAAqC,EACrC,4CAA4C,EAC5C,6CAA6C,EAC7C,uCAAuC,EACvC,mCAAmC,EACpC,MAAM,gCAAgC,CAAC;AAExC;;;GAGG;AACH,8BAAsB,4BAA6B,SAAQ,wBAAwB;IAEjF;;OAEG;IAGH;;OAEG;IAGH;;OAEG;IAIH,QAAQ,CAAC,2BAA2B,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,OAAO,CAAC;IAC/F,QAAQ,CAAC,4BAA4B,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/F,QAAQ,CAAC,gCAAgC,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC;IACnG,QAAQ,CAAC,4BAA4B,CAAC,GAAG,EAAE,gCAAgC,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7F,QAAQ,CAAC,2BAA2B,CAAC,CAAC,EAAE,GAAG,EAAE,uCAAuC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC;IACnI,QAAQ,CAAC,+CAA+C,CAAC,GAAG,EAAE,qCAAqC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IACvH,QAAQ,CAAC,gCAAgC,CAAC,CAAC,EAAE,GAAG,EAAE,4CAA4C,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAChH,QAAQ,CAAC,6CAA6C,CAAC,GAAG,EAAE,6CAA6C,GAAG,OAAO,CAAC,MAAM,CAAC;IAC3H,QAAQ,CAAC,uCAAuC,CAAC,GAAG,EAAE,uCAAuC,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/G,QAAQ,CAAC,sCAAsC,CAAC,CAAC,EAAE,GAAG,EAAE,uCAAuC,GAAG,OAAO,CAAC,CAAC,CAAC;IAC5G,QAAQ,CAAC,+BAA+B,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC;IAClG,QAAQ,CAAC,uBAAuB,CAAC,GAAG,EAAE,mCAAmC,GAAG,OAAO,CAAC,MAAM,CAAC;CAC5F"}
|
|
@@ -8,8 +8,8 @@ import { DyNTS_Ass_Main_ControlService } from './ass-main.control-service';
|
|
|
8
8
|
* EXACT SAME LOGIC as DiAs_IO_ControlService but platform and AI provider agnostic
|
|
9
9
|
*/
|
|
10
10
|
export declare abstract class DyNTS_Ass_IO_ControlService extends DyNTS_Bot_IO_ControlService {
|
|
11
|
-
protected abstract getMainBotControlService(): DyNTS_Ass_Main_ControlService;
|
|
12
11
|
protected mainBot_CS: DyNTS_Ass_Main_ControlService;
|
|
12
|
+
protected abstract getMainBotControlService(): DyNTS_Ass_Main_ControlService;
|
|
13
13
|
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
14
14
|
/**
|
|
15
15
|
* Handle incoming message with AI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ass-io.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/assistant/_services/ass-io.control-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAI3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;GAIG;AACH,8BAAsB,2BAA4B,SAAQ,2BAA2B;
|
|
1
|
+
{"version":3,"file":"ass-io.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/assistant/_services/ass-io.control-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAI3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E;;;;GAIG;AACH,8BAAsB,2BAA4B,SAAQ,2BAA2B;IAEnF,UAAkB,UAAU,EAAE,6BAA6B,CAAC;uBAChC,wBAAwB,IAAI,6BAA6B;IAErF,IAAI,UAAU,IAAI,4BAA4B,CAE7C;IAED;;;OAGG;IACG,aAAa,CACjB,OAAO,EAAE,wBAAwB,CAAC,GAAG,CAAC,EACtC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;CA0C1C"}
|
|
@@ -10,9 +10,8 @@ import { DyNTS_Bot_MessagingProvider_Type } from '../../bot/_enums/bot-message-p
|
|
|
10
10
|
* USES EXISTING AI ABSTRACTIONS - no duplication
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class DyNTS_Ass_Main_ControlService<T_MessagingPlatformProvider_Type extends DyNTS_Bot_MessagingProvider_Type | string = DyNTS_Bot_MessagingProvider_Type> extends DyNTS_Bot_Main_ControlService<T_MessagingPlatformProvider_Type> {
|
|
13
|
-
|
|
13
|
+
aiProvider: DyNTS_AI_LLMChat_ServiceBase;
|
|
14
14
|
protected abstract getAIProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
15
|
-
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
16
15
|
botIO_CS: DyNTS_Ass_IO_ControlService;
|
|
17
16
|
protected abstract getBotIOControlService(): DyNTS_Ass_IO_ControlService;
|
|
18
17
|
defaultSystemPrompt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ass-main.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/assistant/_services/ass-main.control-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAC;AAE9F;;;;GAIG;AACH,8BAAsB,6BAA6B,CACjD,gCAAgC,SAAS,gCAAgC,GAAG,MAAM,GAAG,gCAAgC,CACrH,SAAQ,6BAA6B,CAAC,gCAAgC,CAAC;IAGvE,
|
|
1
|
+
{"version":3,"file":"ass-main.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/assistant/_services/ass-main.control-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAC;AAE9F;;;;GAIG;AACH,8BAAsB,6BAA6B,CACjD,gCAAgC,SAAS,gCAAgC,GAAG,MAAM,GAAG,gCAAgC,CACrH,SAAQ,6BAA6B,CAAC,gCAAgC,CAAC;IAGvE,UAAU,EAAE,4BAA4B,CAAC;IACzC,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,4BAA4B;IAKxD,QAAQ,EAAE,2BAA2B,CAAC;uBAClB,sBAAsB,IAAI,2BAA2B;IAGjF,mBAAmB,EAAE,MAAM,CAAiD;IAE5E,SAAS;IAeT;;;;OAIG;IACG,wBAAwB,CAC5B,OAAO,EAAE,wBAAwB,CAAC,GAAG,CAAC,EACtC,KAAK,GAAE,MAAY,GAClB,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;IAY3C;;OAEG;IACG,8BAA8B,CAClC,OAAO,EAAE,wBAAwB,CAAC,GAAG,CAAC,EACtC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,eAAe,EAAE,CAAC;CAU9B"}
|
|
@@ -12,19 +12,16 @@ const ass_util_1 = require("../_collections/ass.util");
|
|
|
12
12
|
*/
|
|
13
13
|
class DyNTS_Ass_Main_ControlService extends bot_main_control_service_1.DyNTS_Bot_Main_ControlService {
|
|
14
14
|
// AI Provider - uses EXISTING abstraction
|
|
15
|
-
|
|
16
|
-
get aiProvider() {
|
|
17
|
-
return this._aiProvider;
|
|
18
|
-
}
|
|
15
|
+
aiProvider;
|
|
19
16
|
// Assistant-specific settings
|
|
20
17
|
defaultSystemPrompt = ass_global_settings_const_1.DyNTS_Ass_global_settings.defaultSystemPrompt;
|
|
21
18
|
constructor() {
|
|
22
19
|
super();
|
|
23
20
|
// Initialize AI provider
|
|
24
|
-
this.
|
|
21
|
+
this.aiProvider = this.getAIProvider();
|
|
25
22
|
// Apply system prompt
|
|
26
|
-
if (this.
|
|
27
|
-
this.
|
|
23
|
+
if (this.aiProvider.defaultSettings) {
|
|
24
|
+
this.aiProvider.defaultSettings.systemPrompt = this.defaultSystemPrompt;
|
|
28
25
|
}
|
|
29
26
|
// Set global settings
|
|
30
27
|
global_settings_const_1.DyNTS_global_settings.assistant_settings ??= ass_global_settings_const_1.DyNTS_Ass_global_settings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ass-main.control-service.js","sourceRoot":"","sources":["../../../../src/_modules/assistant/_services/ass-main.control-service.ts"],"names":[],"mappings":";;;AAAA,2FAA6F;AAI7F,yFAAsF;AACtF,uFAAoF;AACpF,uDAA0D;AAI1D;;;;GAIG;AACH,MAAsB,6BAEpB,SAAQ,wDAA+D;IAEvE,0CAA0C;
|
|
1
|
+
{"version":3,"file":"ass-main.control-service.js","sourceRoot":"","sources":["../../../../src/_modules/assistant/_services/ass-main.control-service.ts"],"names":[],"mappings":";;;AAAA,2FAA6F;AAI7F,yFAAsF;AACtF,uFAAoF;AACpF,uDAA0D;AAI1D;;;;GAIG;AACH,MAAsB,6BAEpB,SAAQ,wDAA+D;IAEvE,0CAA0C;IAC1C,UAAU,CAA+B;IASzC,8BAA8B;IAC9B,mBAAmB,GAAW,qDAAyB,CAAC,mBAAmB,CAAC;IAE5E;QACE,KAAK,EAAE,CAAC;QAER,yBAAyB;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEvC,sBAAsB;QACtB,IAAI,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YACpC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAC1E,CAAC;QAED,sBAAsB;QACtB,6CAAqB,CAAC,kBAAkB,KAAK,qDAAyB,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,wBAAwB,CAC5B,OAAsC,EACtC,QAAgB,GAAG;QAEnB,qEAAqE;QACrE,MAAM,QAAQ,GAAoC,MAAM,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAEjH,sCAAsC;QACtC,OAAO,QAAQ,CAAC,MAAM,CACpB,GAAG,CAAC,EAAE,CAAC,CAAC,qDAAyB,CAAC,6BAA6B,CAAC,IAAI,CAClE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CACnC,CACF,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,8BAA8B,CAClC,OAAsC,EACtC,MAAc;QAEd,MAAM,QAAQ,GAAoC,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAE/F,OAAO,yBAAc,CAAC,kCAAkC,CAAC;YACvD,QAAQ,EAAE,QAAQ;YAClB,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK;YACnC,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,cAAc;YAC/C,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;IACL,CAAC;CACF;AApED,sEAoEC"}
|
package/package.json
CHANGED
|
@@ -20,17 +20,17 @@ export abstract class DyNTS_AI_LLMChat_ServiceBase extends DyNTS_AI_LLM_ServiceB
|
|
|
20
20
|
/**
|
|
21
21
|
* Add a message to the conversation history
|
|
22
22
|
*/
|
|
23
|
-
abstract addMessageToHistory(message: DyFM_AI_Message, issuer: string): void;
|
|
23
|
+
/* abstract addMessageToHistory(message: DyFM_AI_Message, issuer: string): void; */
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Clear the conversation history for an issuer
|
|
27
27
|
*/
|
|
28
|
-
abstract clearHistory(issuer: string): void;
|
|
28
|
+
/* abstract clearHistory(issuer: string): void; */
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Get the conversation history for an issuer
|
|
32
32
|
*/
|
|
33
|
-
abstract getHistory(issuer: string): DyFM_AI_Message[];
|
|
33
|
+
/* abstract getHistory(issuer: string): DyFM_AI_Message[]; */
|
|
34
34
|
|
|
35
35
|
// Conversation methods (from OAI_LLMChat_ServiceBase)
|
|
36
36
|
abstract yesNoQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<boolean>;
|
|
@@ -15,8 +15,8 @@ import { DyNTS_Ass_Main_ControlService } from './ass-main.control-service';
|
|
|
15
15
|
*/
|
|
16
16
|
export abstract class DyNTS_Ass_IO_ControlService extends DyNTS_Bot_IO_ControlService {
|
|
17
17
|
|
|
18
|
-
protected abstract override getMainBotControlService(): DyNTS_Ass_Main_ControlService;
|
|
19
18
|
protected declare mainBot_CS: DyNTS_Ass_Main_ControlService;
|
|
19
|
+
protected abstract override getMainBotControlService(): DyNTS_Ass_Main_ControlService;
|
|
20
20
|
|
|
21
21
|
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase {
|
|
22
22
|
return this.mainBot_CS.aiProvider;
|
|
@@ -18,12 +18,8 @@ export abstract class DyNTS_Ass_Main_ControlService<
|
|
|
18
18
|
> extends DyNTS_Bot_Main_ControlService<T_MessagingPlatformProvider_Type> {
|
|
19
19
|
|
|
20
20
|
// AI Provider - uses EXISTING abstraction
|
|
21
|
-
|
|
21
|
+
aiProvider: DyNTS_AI_LLMChat_ServiceBase;
|
|
22
22
|
protected abstract getAIProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
23
|
-
|
|
24
|
-
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase {
|
|
25
|
-
return this._aiProvider;
|
|
26
|
-
}
|
|
27
23
|
|
|
28
24
|
// Override botIO to use assistant IO
|
|
29
25
|
/* protected abstract override getBotIOControlService(): DyNTS_Ass_IO_ControlService; */
|
|
@@ -38,11 +34,11 @@ export abstract class DyNTS_Ass_Main_ControlService<
|
|
|
38
34
|
super();
|
|
39
35
|
|
|
40
36
|
// Initialize AI provider
|
|
41
|
-
this.
|
|
37
|
+
this.aiProvider = this.getAIProvider();
|
|
42
38
|
|
|
43
39
|
// Apply system prompt
|
|
44
|
-
if (this.
|
|
45
|
-
this.
|
|
40
|
+
if (this.aiProvider.defaultSettings) {
|
|
41
|
+
this.aiProvider.defaultSettings.systemPrompt = this.defaultSystemPrompt;
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
// Set global settings
|