@futdevpro/nts-dynamo 1.14.26 → 1.14.28
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/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts +0 -17
- package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.js +42 -39
- package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.js.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts +0 -5
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js +6 -2
- package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +26 -129
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js +25 -10
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts +5 -5
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js +3 -3
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
- package/build/_modules/ai/_modules/open-ai/index.d.ts +0 -2
- package/build/_modules/ai/_modules/open-ai/index.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/index.js +2 -2
- package/build/_modules/ai/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts +2 -2
- 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 +2 -2
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass.service-base.d.ts +5 -5
- package/build/_modules/assistant/_services/ass.service-base.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass.service-base.js.map +1 -1
- package/build/_modules/bot/_collections/bot-operations.util.d.ts +13 -13
- package/build/_modules/bot/_collections/bot-operations.util.d.ts.map +1 -1
- package/build/_modules/bot/_collections/bot-operations.util.js.map +1 -1
- package/build/_modules/bot/_enums/bot-message-provider.enum.d.ts +1 -1
- package/build/_modules/bot/_enums/bot-message-provider.enum.d.ts.map +1 -1
- package/build/_modules/bot/_enums/bot-message-provider.enum.js +9 -9
- package/build/_modules/bot/_enums/bot-message-provider.enum.js.map +1 -1
- package/build/_modules/bot/_models/bot-channel.interface.d.ts +2 -2
- package/build/_modules/bot/_models/bot-channel.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/bot-command.interface.d.ts +3 -3
- package/build/_modules/bot/_models/bot-command.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +3 -3
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts +6 -6
- package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/bot-message.interface.d.ts +2 -2
- package/build/_modules/bot/_models/bot-message.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/{bot-message-provider.interface.d.ts → bot-messaging-provider.interface.d.ts} +21 -21
- package/build/_modules/bot/_models/bot-messaging-provider.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/{bot-message-provider.interface.js → bot-messaging-provider.interface.js} +1 -1
- package/build/_modules/bot/_models/bot-messaging-provider.interface.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts +2 -2
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts +2 -2
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/_services/{dib-message-provider.service.d.ts → dib-messaging-provider.service.d.ts} +4 -4
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_services/{dib-message-provider.service.js → dib-messaging-provider.service.js} +5 -5
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/index.d.ts +1 -1
- package/build/_modules/bot/_modules/discord-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/index.js +1 -1
- package/build/_modules/bot/_modules/discord-bot/index.js.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.d.ts +3 -3
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.d.ts.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.js.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.d.ts +2 -2
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.d.ts.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.js.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/{dyb-message-provider.service.d.ts → dyb-messaging-provider.service.d.ts} +5 -5
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/dynamo-bot/_services/{dyb-message-provider.service.js → dyb-messaging-provider.service.js} +5 -5
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/dynamo-bot/index.d.ts +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/index.js +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/index.js.map +1 -1
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts +2 -2
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts.map +1 -1
- package/build/_modules/bot/_modules/slack-bot/_services/{slb-message-provider.service.d.ts → slb-messaging-provider.service.d.ts} +4 -4
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_services/{slb-message-provider.service.js → slb-messaging-provider.service.js} +5 -5
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/index.d.ts +1 -1
- package/build/_modules/bot/_modules/slack-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/slack-bot/index.js +1 -1
- package/build/_modules/bot/_modules/slack-bot/index.js.map +1 -1
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts +2 -2
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts.map +1 -1
- package/build/_modules/bot/_modules/teams-bot/_services/{teb-message-provider.service.d.ts → teb-messaging-provider.service.d.ts} +4 -4
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_services/{teb-message-provider.service.js → teb-messaging-provider.service.js} +5 -5
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/index.d.ts +1 -1
- package/build/_modules/bot/_modules/teams-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/teams-bot/index.js +1 -1
- package/build/_modules/bot/_modules/teams-bot/index.js.map +1 -1
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts +6 -6
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-commands.control-service.js.map +1 -1
- package/build/_modules/bot/_services/bot-io.control-service.d.ts +12 -12
- package/build/_modules/bot/_services/bot-io.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-io.control-service.js +4 -18
- package/build/_modules/bot/_services/bot-io.control-service.js.map +1 -1
- package/build/_modules/bot/_services/bot-main.control-service.d.ts +16 -16
- package/build/_modules/bot/_services/bot-main.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-main.control-service.js +9 -3
- package/build/_modules/bot/_services/bot-main.control-service.js.map +1 -1
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.d.ts +6 -0
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.js +47 -0
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.js.map +1 -0
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts +2 -2
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts.map +1 -1
- package/build/_modules/bot/index.d.ts +2 -2
- package/build/_modules/bot/index.d.ts.map +1 -1
- package/build/_modules/bot/index.js +2 -2
- package/build/_modules/bot/index.js.map +1 -1
- package/build/_modules/discord-assistant/_collections/dias.util.d.ts +3 -3
- package/build/_modules/discord-assistant/_collections/dias.util.d.ts.map +1 -1
- package/build/_modules/discord-assistant/_collections/dias.util.js +4 -4
- package/build/_modules/discord-assistant/_collections/dias.util.js.map +1 -1
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +4 -4
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts.map +1 -1
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js.map +1 -1
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +2 -2
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts.map +1 -1
- package/build/_modules/discord-assistant/_services/dias.service-base.js.map +1 -1
- package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts.map +1 -1
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js +2 -0
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js.map +1 -1
- package/package.json +1 -1
- package/src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts +42 -42
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts +6 -6
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts +56 -158
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +8 -9
- package/src/_modules/ai/_modules/open-ai/index.ts +2 -2
- package/src/_modules/assistant/_services/ass-io.control-service.ts +3 -3
- package/src/_modules/assistant/_services/ass-main.control-service.ts +3 -3
- package/src/_modules/assistant/_services/ass.service-base.ts +15 -15
- package/src/_modules/bot/_collections/bot-operations.util.ts +14 -14
- package/src/_modules/bot/_enums/bot-message-provider.enum.ts +1 -1
- package/src/_modules/bot/_models/bot-channel.interface.ts +2 -2
- package/src/_modules/bot/_models/bot-command.interface.ts +3 -3
- package/src/_modules/bot/_models/bot-global-settings.interface.ts +3 -3
- package/src/_modules/bot/_models/bot-message-wrapper.interface.ts +8 -7
- package/src/_modules/bot/_models/bot-message.interface.ts +2 -2
- package/src/_modules/bot/_models/{bot-message-provider.interface.ts → bot-messaging-provider.interface.ts} +23 -23
- package/src/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.ts +2 -2
- package/src/_modules/bot/_modules/discord-bot/_collections/dib.util.ts +2 -2
- package/src/_modules/bot/_modules/discord-bot/_services/{dib-message-provider.service.ts → dib-messaging-provider.service.ts} +6 -6
- package/src/_modules/bot/_modules/discord-bot/index.ts +1 -1
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts +3 -3
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.ts +2 -2
- package/src/_modules/bot/_modules/dynamo-bot/_services/{dyb-message-provider.service.ts → dyb-messaging-provider.service.ts} +7 -7
- package/src/_modules/bot/_modules/dynamo-bot/index.ts +1 -1
- package/src/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.ts +2 -2
- package/src/_modules/bot/_modules/slack-bot/_services/{slb-message-provider.service.ts → slb-messaging-provider.service.ts} +6 -6
- package/src/_modules/bot/_modules/slack-bot/index.ts +1 -1
- package/src/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.ts +2 -2
- package/src/_modules/bot/_modules/teams-bot/_services/{teb-message-provider.service.ts → teb-messaging-provider.service.ts} +6 -6
- package/src/_modules/bot/_modules/teams-bot/index.ts +1 -1
- package/src/_modules/bot/_services/bot-commands.control-service.ts +14 -14
- package/src/_modules/bot/_services/bot-io.control-service.ts +21 -38
- package/src/_modules/bot/_services/bot-main.control-service.ts +56 -49
- package/src/_modules/bot/_services/bot-messaging-provider-factory.service.ts +56 -0
- package/src/_modules/bot/_services/bot-routines.control-service.ts +3 -3
- package/src/_modules/bot/index.ts +2 -2
- package/src/_modules/discord-assistant/_collections/dias.util.ts +6 -7
- package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +5 -5
- package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +2 -2
- package/src/_modules/discord-assistant/_services/dias.service-base.ts +2 -3
- package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +2 -0
- package/build/_modules/ai/_services/oai-to-ai-adapter.service.d.ts +0 -39
- package/build/_modules/ai/_services/oai-to-ai-adapter.service.d.ts.map +0 -1
- package/build/_modules/ai/_services/oai-to-ai-adapter.service.js +0 -218
- package/build/_modules/ai/_services/oai-to-ai-adapter.service.js.map +0 -1
- package/build/_modules/bot/_enums/bot-provider.enum.d.ts +0 -8
- package/build/_modules/bot/_enums/bot-provider.enum.d.ts.map +0 -1
- package/build/_modules/bot/_enums/bot-provider.enum.js +0 -12
- package/build/_modules/bot/_enums/bot-provider.enum.js.map +0 -1
- package/build/_modules/bot/_models/bot-message-provider.interface.d.ts.map +0 -1
- package/build/_modules/bot/_models/bot-message-provider.interface.js.map +0 -1
- package/build/_modules/bot/_models/bot-provider.interface.d.ts +0 -65
- package/build/_modules/bot/_models/bot-provider.interface.d.ts.map +0 -1
- package/build/_modules/bot/_models/bot-provider.interface.js +0 -3
- package/build/_modules/bot/_models/bot-provider.interface.js.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-message-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-message-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts +0 -53
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js +0 -369
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-message-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-message-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-provider.service.d.ts +0 -54
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-provider.service.js +0 -310
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-message-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-message-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts +0 -40
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js +0 -116
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-message-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-message-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts +0 -40
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js +0 -116
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js.map +0 -1
- package/build/_modules/bot/_services/bot-provider-factory.service.d.ts +0 -6
- package/build/_modules/bot/_services/bot-provider-factory.service.d.ts.map +0 -1
- package/build/_modules/bot/_services/bot-provider-factory.service.js +0 -47
- package/build/_modules/bot/_services/bot-provider-factory.service.js.map +0 -1
- package/src/_modules/bot/_services/bot-provider-factory.service.ts +0 -56
|
@@ -1,18 +1 @@
|
|
|
1
|
-
export declare enum DyNTS_OAI_GPT_Message_Role {
|
|
2
|
-
/**
|
|
3
|
-
* Developer-provided instructions that the model should follow, regardless of
|
|
4
|
-
* messages sent by the user. With o1 models and newer, use `developer` messages
|
|
5
|
-
* for this purpose instead.
|
|
6
|
-
*/
|
|
7
|
-
system = "system",
|
|
8
|
-
/**
|
|
9
|
-
* Messages sent by an end user, containing prompts or additional context
|
|
10
|
-
* information.
|
|
11
|
-
*/
|
|
12
|
-
user = "user",
|
|
13
|
-
/**
|
|
14
|
-
* Messages sent by the model in response to user messages.
|
|
15
|
-
*/
|
|
16
|
-
assistant = "assistant"
|
|
17
|
-
}
|
|
18
1
|
//# sourceMappingURL=oai-gpt-message-role.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-gpt-message-role.enum.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oai-gpt-message-role.enum.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts"],"names":[],"mappings":""}
|
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
//export enum DyFM_AI_MessageRole {
|
|
2
|
+
//
|
|
3
|
+
// /**
|
|
4
|
+
// * Developer-provided instructions that the model should follow, regardless of
|
|
5
|
+
// * messages sent by the user. With o1 models and newer, use `developer` messages
|
|
6
|
+
// * for this purpose instead.
|
|
7
|
+
// */
|
|
8
|
+
// system = 'system',
|
|
9
|
+
//
|
|
10
|
+
// /**
|
|
11
|
+
// * Messages sent by an end user, containing prompts or additional context
|
|
12
|
+
// * information.
|
|
13
|
+
// */
|
|
14
|
+
// user = 'user',
|
|
15
|
+
//
|
|
16
|
+
// /**
|
|
17
|
+
// * Messages sent by the model in response to user messages.
|
|
18
|
+
// */
|
|
19
|
+
// assistant = 'assistant',
|
|
20
|
+
//
|
|
21
|
+
// /**
|
|
22
|
+
// * Developer-provided instructions that the model should follow, regardless of
|
|
23
|
+
// * messages sent by the user. With o1 models and newer, `developer` messages
|
|
24
|
+
// * replace the previous `system` messages.
|
|
25
|
+
// *
|
|
26
|
+
// * @deprecated
|
|
27
|
+
// */
|
|
28
|
+
// /* developer = 'developer', */
|
|
29
|
+
//
|
|
30
|
+
// /**
|
|
31
|
+
// * ???
|
|
32
|
+
// * @deprecated
|
|
33
|
+
// */
|
|
34
|
+
// /* tool = 'tool', */
|
|
35
|
+
//
|
|
36
|
+
// /**
|
|
37
|
+
// * ???
|
|
38
|
+
// * @deprecated
|
|
39
|
+
// */
|
|
40
|
+
// /* function = 'function', */
|
|
41
|
+
//}
|
|
42
|
+
//
|
|
40
43
|
//# sourceMappingURL=oai-gpt-message-role.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-gpt-message-role.enum.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oai-gpt-message-role.enum.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts"],"names":[],"mappings":"AAGA,mCAAmC;AACnC,IAAI;AACJ,OAAO;AACP,kFAAkF;AAClF,oFAAoF;AACpF,gCAAgC;AAChC,OAAO;AACP,sBAAsB;AACtB,IAAI;AACJ,OAAO;AACP,6EAA6E;AAC7E,mBAAmB;AACnB,OAAO;AACP,kBAAkB;AAClB,IAAI;AACJ,OAAO;AACP,+DAA+D;AAC/D,OAAO;AACP,4BAA4B;AAC5B,EAAE;AACF,OAAO;AACP,kFAAkF;AAClF,gFAAgF;AAChF,8CAA8C;AAC9C,OAAO;AACP,kBAAkB;AAClB,OAAO;AACP,kCAAkC;AAClC,EAAE;AACF,QAAQ;AACR,WAAW;AACX,kBAAkB;AAClB,OAAO;AACP,wBAAwB;AACxB,IAAI;AACJ,OAAO;AACP,UAAU;AACV,kBAAkB;AAClB,OAAO;AACP,gCAAgC;AAChC,GAAG;AACH,EAAE"}
|
package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-gpt-message.interface.d.ts","sourceRoot":"","sources":["../../../../../../../src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oai-gpt-message.interface.d.ts","sourceRoot":"","sources":["../../../../../../../src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//import { DyFM_AI_MessageRole } from '../../_enums/oai-gpt-message-role.enum';
|
|
2
|
+
//
|
|
3
|
+
//export interface DyFM_AI_Message {
|
|
4
|
+
// role: DyFM_AI_MessageRole /* | string */;
|
|
5
|
+
// content: string;
|
|
6
|
+
//}
|
|
3
7
|
//# sourceMappingURL=oai-gpt-message.interface.js.map
|
package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-gpt-message.interface.js","sourceRoot":"","sources":["../../../../../../../src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"oai-gpt-message.interface.js","sourceRoot":"","sources":["../../../../../../../src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,EAAE;AACF,oCAAoC;AACpC,6CAA6C;AAC7C,oBAAoB;AACpB,GAAG"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DyFM_OAI_CallSettings } from '@futdevpro/fsm-dynamo/ai/open-ai';
|
|
2
|
-
import {
|
|
2
|
+
import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
|
|
3
3
|
import { ChatCompletion } from 'openai/resources';
|
|
4
4
|
import { DyNTS_OAI_LLM_ServiceBase } from './oai-llm.service-base';
|
|
5
|
+
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';
|
|
5
6
|
/**
|
|
6
7
|
* {
|
|
7
8
|
* organization: 'org-XY',
|
|
@@ -10,64 +11,37 @@ import { DyNTS_OAI_LLM_ServiceBase } from './oai-llm.service-base';
|
|
|
10
11
|
* }
|
|
11
12
|
*/
|
|
12
13
|
export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase {
|
|
14
|
+
/**
|
|
15
|
+
* Converts generic AI messages to OpenAI-specific format
|
|
16
|
+
*
|
|
17
|
+
* Az generic AI üzeneteket OpenAI-specifikus formátumra alakítja át
|
|
18
|
+
*/
|
|
19
|
+
private convertToOAIMessages;
|
|
13
20
|
/**
|
|
14
21
|
* Asks the AI to answer a yes/no question
|
|
15
22
|
*
|
|
16
23
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.request} to ask the question,
|
|
17
24
|
* and the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.upperCaseYes} to check the answer
|
|
18
25
|
*/
|
|
19
|
-
yesNoQuestionInConversation(set:
|
|
20
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
21
|
-
question: string;
|
|
22
|
-
issuer: string;
|
|
23
|
-
settings?: DyFM_OAI_CallSettings;
|
|
24
|
-
debugLog?: boolean;
|
|
25
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
26
|
-
replaceThisInLog?: string;
|
|
27
|
-
}): Promise<boolean>;
|
|
26
|
+
yesNoQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<boolean>;
|
|
28
27
|
/**
|
|
29
28
|
* Asks the AI to answer a simple question
|
|
30
29
|
*
|
|
31
30
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.simpleQuestion} to ask the question
|
|
32
31
|
*/
|
|
33
|
-
simpleQuestionInConversation(set:
|
|
34
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
35
|
-
question: string;
|
|
36
|
-
issuer: string;
|
|
37
|
-
settings?: DyFM_OAI_CallSettings;
|
|
38
|
-
debugLog?: boolean;
|
|
39
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
40
|
-
replaceThisInLog?: string;
|
|
41
|
-
}): Promise<string>;
|
|
32
|
+
simpleQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string>;
|
|
42
33
|
/**
|
|
43
34
|
* Asks the AI to answer a percentage question
|
|
44
35
|
*
|
|
45
36
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.percentageOnly} to ask the question
|
|
46
37
|
*/
|
|
47
|
-
percentageQuestionInConversation(set:
|
|
48
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
49
|
-
question: string;
|
|
50
|
-
issuer: string;
|
|
51
|
-
settings?: DyFM_OAI_CallSettings;
|
|
52
|
-
debugLog?: boolean;
|
|
53
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
54
|
-
replaceThisInLog?: string;
|
|
55
|
-
}): Promise<number>;
|
|
38
|
+
percentageQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<number>;
|
|
56
39
|
/**
|
|
57
40
|
* Asks the AI to select one of the options from the list
|
|
58
41
|
*
|
|
59
42
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
|
|
60
43
|
*/
|
|
61
|
-
selectQuestionInConversation(set:
|
|
62
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
63
|
-
question: string;
|
|
64
|
-
selectFrom: string[];
|
|
65
|
-
issuer: string;
|
|
66
|
-
settings?: DyFM_OAI_CallSettings;
|
|
67
|
-
debugLog?: boolean;
|
|
68
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
69
|
-
replaceThisInLog?: string;
|
|
70
|
-
}): Promise<string>;
|
|
44
|
+
selectQuestionInConversation(set: DyFM_AI_ConversationSelect_Input): Promise<string>;
|
|
71
45
|
/**
|
|
72
46
|
* Asks the AI to select one of the options from the list
|
|
73
47
|
* Similar to {@link askSelectQuestion},
|
|
@@ -75,16 +49,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
75
49
|
*
|
|
76
50
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
|
|
77
51
|
*/
|
|
78
|
-
requestSelectInConversation<T>(set: {
|
|
79
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
80
|
-
question: string;
|
|
81
|
-
selectFrom: T[];
|
|
82
|
-
issuer: string;
|
|
83
|
-
settings?: DyFM_OAI_CallSettings;
|
|
84
|
-
debugLog?: boolean;
|
|
85
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
86
|
-
replaceThisInLog?: string;
|
|
87
|
-
}): Promise<T | {
|
|
52
|
+
requestSelectInConversation<T>(set: DyFM_AI_ConversationGenericSelect_Input<T>): Promise<T | {
|
|
88
53
|
unparsableResult: string;
|
|
89
54
|
}>;
|
|
90
55
|
/**
|
|
@@ -92,16 +57,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
92
57
|
*
|
|
93
58
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
|
|
94
59
|
*/
|
|
95
|
-
multipleSelectQuestionWithOptionsInConversation(set:
|
|
96
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
97
|
-
question: string;
|
|
98
|
-
options: string[];
|
|
99
|
-
issuer: string;
|
|
100
|
-
settings?: DyFM_OAI_CallSettings;
|
|
101
|
-
debugLog?: boolean;
|
|
102
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
103
|
-
replaceThisInLog?: string;
|
|
104
|
-
}): Promise<string[]>;
|
|
60
|
+
multipleSelectQuestionWithOptionsInConversation(set: DyFM_AI_ConversationMultiSelect_Input): Promise<string[]>;
|
|
105
61
|
/**
|
|
106
62
|
* Asks the AI to select one or more of the options from the list
|
|
107
63
|
* Similar to {@link askMultipleSelectQuestionWithOptions},
|
|
@@ -109,16 +65,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
109
65
|
*
|
|
110
66
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
|
|
111
67
|
*/
|
|
112
|
-
requestMultipleSelectInConversation<T>(set:
|
|
113
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
114
|
-
question: string;
|
|
115
|
-
options: T[];
|
|
116
|
-
issuer: string;
|
|
117
|
-
settings?: DyFM_OAI_CallSettings;
|
|
118
|
-
debugLog?: boolean;
|
|
119
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
120
|
-
replaceThisInLog?: string;
|
|
121
|
-
}): Promise<T[]>;
|
|
68
|
+
requestMultipleSelectInConversation<T>(set: DyFM_AI_ConversationGenericMultiSelect_Input<T>): Promise<T[]>;
|
|
122
69
|
/**
|
|
123
70
|
* Asks the AI to answer a question that must result a JSON object
|
|
124
71
|
*
|
|
@@ -128,15 +75,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
128
75
|
*
|
|
129
76
|
* (uses {@link DyFM_safeParseJSON})
|
|
130
77
|
*/
|
|
131
|
-
jsonQuestionInConversation<T = any>(set: {
|
|
132
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
133
|
-
question: string;
|
|
134
|
-
issuer: string;
|
|
135
|
-
settings?: DyFM_OAI_CallSettings;
|
|
136
|
-
debugLog?: boolean;
|
|
137
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
138
|
-
replaceThisInLog?: string;
|
|
139
|
-
}): Promise<T | {
|
|
78
|
+
jsonQuestionInConversation<T = any>(set: DyFM_AI_ConversationQuestion_Input): Promise<T | {
|
|
140
79
|
unparsableResult: string;
|
|
141
80
|
}>;
|
|
142
81
|
/**
|
|
@@ -148,16 +87,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
148
87
|
*
|
|
149
88
|
* (uses {@link DyFM_safeParseJSON})
|
|
150
89
|
*/
|
|
151
|
-
jsonQuestionWithKeysDescriptionInConversation<T = any>(set: {
|
|
152
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
153
|
-
question: string;
|
|
154
|
-
keysDescription: string;
|
|
155
|
-
issuer: string;
|
|
156
|
-
settings?: DyFM_OAI_CallSettings;
|
|
157
|
-
debugLog?: boolean;
|
|
158
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
159
|
-
replaceThisInLog?: string;
|
|
160
|
-
}): Promise<T | {
|
|
90
|
+
jsonQuestionWithKeysDescriptionInConversation<T = any>(set: DyFM_AI_ConversationJSONKeysDescription_Input): Promise<T | {
|
|
161
91
|
unparsableResult: string;
|
|
162
92
|
}>;
|
|
163
93
|
/**
|
|
@@ -169,16 +99,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
169
99
|
*
|
|
170
100
|
* (uses {@link DyFM_safeParseJSON})
|
|
171
101
|
*/
|
|
172
|
-
jsonQuestionWithExactKeysInConversation<T = any>(set: {
|
|
173
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
174
|
-
question: string;
|
|
175
|
-
keys: string[];
|
|
176
|
-
issuer: string;
|
|
177
|
-
settings?: DyFM_OAI_CallSettings;
|
|
178
|
-
debugLog?: boolean;
|
|
179
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
180
|
-
replaceThisInLog?: string;
|
|
181
|
-
}): Promise<T | {
|
|
102
|
+
jsonQuestionWithExactKeysInConversation<T = any>(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<T | {
|
|
182
103
|
unparsableResult: string;
|
|
183
104
|
}>;
|
|
184
105
|
/**
|
|
@@ -190,29 +111,13 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
190
111
|
*
|
|
191
112
|
* (uses {@link DyFM_Object.safeParseList})
|
|
192
113
|
*/
|
|
193
|
-
listQuestionInConversation(set:
|
|
194
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
195
|
-
question: string;
|
|
196
|
-
issuer: string;
|
|
197
|
-
settings?: DyFM_OAI_CallSettings;
|
|
198
|
-
debugLog?: boolean;
|
|
199
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
200
|
-
replaceThisInLog?: string;
|
|
201
|
-
}): Promise<string[]>;
|
|
114
|
+
listQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string[]>;
|
|
202
115
|
/**
|
|
203
116
|
* Asks the AI to answer a question
|
|
204
117
|
*
|
|
205
118
|
* Uses the {@link resolveSimpleUserMessage}
|
|
206
119
|
*/
|
|
207
|
-
getQuestionAnswerInConversation(set:
|
|
208
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
209
|
-
question?: string;
|
|
210
|
-
issuer: string;
|
|
211
|
-
settings?: DyFM_OAI_CallSettings;
|
|
212
|
-
debugLog?: boolean;
|
|
213
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
214
|
-
replaceThisInLog?: string;
|
|
215
|
-
}): Promise<string>;
|
|
120
|
+
getQuestionAnswerInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string>;
|
|
216
121
|
/**
|
|
217
122
|
* Asks the AI to answer a question using the whole conversation
|
|
218
123
|
* (If you want to use only the conversation, without adding a new message,
|
|
@@ -220,17 +125,9 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
220
125
|
*
|
|
221
126
|
* Uses the {@link resolveConversation}
|
|
222
127
|
*/
|
|
223
|
-
getAnswerInConversation(set:
|
|
224
|
-
conversation: DyNTS_OAI_GPT_Message[];
|
|
225
|
-
newMessage?: string;
|
|
226
|
-
issuer: string;
|
|
227
|
-
settings?: DyFM_OAI_CallSettings;
|
|
228
|
-
debugLog?: boolean;
|
|
229
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
230
|
-
replaceThisInLog?: string;
|
|
231
|
-
}): Promise<string>;
|
|
128
|
+
getAnswerInConversation(set: DyFM_AI_ConversationGetAnswer_Input): Promise<string>;
|
|
232
129
|
resolveConversationMessage(set: {
|
|
233
|
-
conversation:
|
|
130
|
+
conversation: DyFM_AI_Message[];
|
|
234
131
|
issuer: string;
|
|
235
132
|
settings?: DyFM_OAI_CallSettings;
|
|
236
133
|
getFullResponse?: boolean;
|
|
@@ -244,7 +141,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
244
141
|
* Uses the {@link getMessageCreateInput}
|
|
245
142
|
*/
|
|
246
143
|
resolveConversation(set: {
|
|
247
|
-
conversation:
|
|
144
|
+
conversation: DyFM_AI_Message[];
|
|
248
145
|
issuer: string;
|
|
249
146
|
settings?: DyFM_OAI_CallSettings;
|
|
250
147
|
getFullResponse?: boolean;
|
|
@@ -253,12 +150,12 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
253
150
|
replaceThisInLog?: string;
|
|
254
151
|
}): Promise<string | ChatCompletion>;
|
|
255
152
|
protected shortenConversation(set: {
|
|
256
|
-
conversation:
|
|
153
|
+
conversation: DyFM_AI_Message[];
|
|
257
154
|
issuer: string;
|
|
258
155
|
debugLog?: boolean;
|
|
259
|
-
}):
|
|
156
|
+
}): DyFM_AI_Message[];
|
|
260
157
|
protected logConversation(set: {
|
|
261
|
-
conversation:
|
|
158
|
+
conversation: DyFM_AI_Message[];
|
|
262
159
|
debugLog?: boolean;
|
|
263
160
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
264
161
|
replaceThisInLog?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqC,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqC,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EACL,kCAAkC,EAClC,gCAAgC,EAChC,uCAAuC,EACvC,qCAAqC,EACrC,4CAA4C,EAC5C,6CAA6C,EAC7C,uCAAuC,EACvC,mCAAmC,EACpC,MAAM,sCAAsC,CAAC;AAG9C;;;;;;GAMG;AAIH,qBAAa,6BAA8B,SAAQ,yBAAyB;IAE1E;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAO5B;;;;;OAKG;IACG,2BAA2B,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,OAAO,CAAC;IAW5F;;;;OAIG;IACG,4BAA4B,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC;IAO5F;;;;OAIG;IACG,gCAAgC,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBhG;;;;OAIG;IACG,4BAA4B,CAAC,GAAG,EAAE,gCAAgC,GAAG,OAAO,CAAC,MAAM,CAAC;IAsB1F;;;;;;OAMG;IACG,2BAA2B,CAAC,CAAC,EACjC,GAAG,EAAE,uCA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AE,OAAO,CAAC;QAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,GACA,OAAO,CAAC,MAAM,CAAC;IAIlB;;;;OAIG;IACG,mBAAmB,CACvB,GAAG,EAAE;QACH,YAAY,EAAE,eAAe,EAAE,CAAC;QAChC,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,GACA,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC;IAkDnC,SAAS,CAAC,mBAAmB,CAC3B,GAAG,EAAE;QACH,YAAY,EAAE,eAAe,EAAE,CAAC;QAChC,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,GACA,eAAe,EAAE;IAoEpB,SAAS,CAAC,eAAe,CACvB,GAAG,EAAE;QACH,YAAY,EAAE,eAAe,EAAE,CAAC;QAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B;CAYJ"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DyNTS_OAI_LLMChat_ServiceBase = void 0;
|
|
4
4
|
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
5
|
const global_settings_const_1 = require("../../../../../_collections/global-settings.const");
|
|
6
|
-
const
|
|
6
|
+
const ai_1 = require("@futdevpro/fsm-dynamo/ai");
|
|
7
7
|
const oai_llm_service_base_1 = require("./oai-llm.service-base");
|
|
8
8
|
const oai_global_settings_const_1 = require("../_collections/oai-global-settings.const");
|
|
9
9
|
/**
|
|
@@ -14,7 +14,18 @@ const oai_global_settings_const_1 = require("../_collections/oai-global-settings
|
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
// Di Dictionary DiModel DiEz DiAz
|
|
17
|
-
class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM_ServiceBase
|
|
17
|
+
class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM_ServiceBase {
|
|
18
|
+
/**
|
|
19
|
+
* Converts generic AI messages to OpenAI-specific format
|
|
20
|
+
*
|
|
21
|
+
* Az generic AI üzeneteket OpenAI-specifikus formátumra alakítja át
|
|
22
|
+
*/
|
|
23
|
+
convertToOAIMessages(messages) {
|
|
24
|
+
return messages.map(msg => ({
|
|
25
|
+
role: msg.role,
|
|
26
|
+
content: msg.content
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
18
29
|
/**
|
|
19
30
|
* Asks the AI to answer a yes/no question
|
|
20
31
|
*
|
|
@@ -197,7 +208,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
197
208
|
* Uses the {@link resolveSimpleUserMessage}
|
|
198
209
|
*/
|
|
199
210
|
/* async getQuestionAnswerInConversation(
|
|
200
|
-
conversation:
|
|
211
|
+
conversation: DyFM_AI_Message[],
|
|
201
212
|
question: string,
|
|
202
213
|
issuer: string,
|
|
203
214
|
debugLog?: boolean,
|
|
@@ -234,14 +245,18 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
234
245
|
* Uses the {@link resolveConversation}
|
|
235
246
|
*/
|
|
236
247
|
async getAnswerInConversation(set) {
|
|
248
|
+
// Convert generic AI messages to OpenAI-specific format
|
|
249
|
+
const oaiConversation = this.convertToOAIMessages(set.conversation);
|
|
237
250
|
if (set.newMessage) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
role: oai_gpt_message_role_enum_1.DyNTS_OAI_GPT_Message_Role.user,
|
|
251
|
+
oaiConversation.push({
|
|
252
|
+
role: ai_1.DyFM_AI_MessageRole.user,
|
|
241
253
|
content: set.newMessage,
|
|
242
254
|
});
|
|
243
255
|
}
|
|
244
|
-
const answer = await this.resolveConversationMessage(
|
|
256
|
+
const answer = await this.resolveConversationMessage({
|
|
257
|
+
...set,
|
|
258
|
+
conversation: oaiConversation,
|
|
259
|
+
});
|
|
245
260
|
if (set.debugLog || this.debugLog) {
|
|
246
261
|
console.log(' - answer: ', answer);
|
|
247
262
|
}
|
|
@@ -257,7 +272,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
257
272
|
*/
|
|
258
273
|
async resolveConversation(set) {
|
|
259
274
|
try {
|
|
260
|
-
if (set.conversation.find(message => message.role ===
|
|
275
|
+
if (set.conversation.find(message => message.role === ai_1.DyFM_AI_MessageRole.system)) {
|
|
261
276
|
/* throw new DyFM_Error({
|
|
262
277
|
...this.getDefaultErrorSettings(
|
|
263
278
|
'resolveConversation',
|
|
@@ -300,9 +315,9 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
300
315
|
shortenConversation(set) {
|
|
301
316
|
try {
|
|
302
317
|
const clonedConversation = fsm_dynamo_1.DyFM_Object.clone(set.conversation);
|
|
303
|
-
const systemMessages = clonedConversation.filter(message => message.role ===
|
|
318
|
+
const systemMessages = clonedConversation.filter(message => message.role === ai_1.DyFM_AI_MessageRole.system);
|
|
304
319
|
const systemMessagesStringLength = JSON.stringify(systemMessages).length;
|
|
305
|
-
const msgs = clonedConversation.filter(message => message.role !==
|
|
320
|
+
const msgs = clonedConversation.filter(message => message.role !== ai_1.DyFM_AI_MessageRole.system).map(message => message.content);
|
|
306
321
|
let stringifiedMessages = JSON.stringify(msgs);
|
|
307
322
|
if (this.debugLog) {
|
|
308
323
|
fsm_dynamo_1.DyFM_Log.info(' DyNTS_OAI_LLMChat_ServiceBase: before shortening conversation', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-llm-chat.service-base.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":";;;AAGA,sDAAoK;
|
|
1
|
+
{"version":3,"file":"oai-llm-chat.service-base.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":";;;AAGA,sDAAoK;AAGpK,6FAA0F;AAG1F,iDAA+D;AAE/D,iEAAmE;AACnE,yFAAsF;AActF;;;;;;GAMG;AAEH,kCAAkC;AAElC,MAAa,6BAA8B,SAAQ,gDAAyB;IAE1E;;;;OAIG;IACK,oBAAoB,CAAC,QAA2B;QACtD,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC1B,IAAI,EAAE,GAAG,CAAC,IAAsC;YAChD,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAAC,GAAuC;QACvE,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC;QAEtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,+BAA+B,CAAC,GAAG,CAAC,CAAC;QAE/D,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACnF,CAAC;IACD,6GAA6G;IAE7G;;;;OAIG;IACH,KAAK,CAAC,4BAA4B,CAAC,GAAuC;QACxE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEtB,OAAO,MAAM,IAAI,CAAC,+BAA+B,CAAC,GAAG,C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sfC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAI } from 'openai';
|
|
2
2
|
import { DyFM_OAI_Settings, DyFM_OAI_Model, DyFM_OAI_CallSettings } from '@futdevpro/fsm-dynamo/ai/open-ai';
|
|
3
3
|
import { DyFM_AnyError, DyFM_Error_Settings } from '@futdevpro/fsm-dynamo';
|
|
4
|
-
import {
|
|
4
|
+
import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
|
|
5
5
|
import { ChatCompletion } from 'openai/resources';
|
|
6
6
|
import { ChatCompletionCreateParamsBase } from 'openai/resources/chat/completions';
|
|
7
7
|
import { DyNTS_OAI_LLM_Predefined_Requests } from '../_models/interfaces/oai-llm-predefined-requests.interface';
|
|
@@ -232,7 +232,7 @@ export declare class DyNTS_OAI_LLM_ServiceBase {
|
|
|
232
232
|
* Uses the {@link getMessageCreateInput}
|
|
233
233
|
*/
|
|
234
234
|
resolveMessage(set: {
|
|
235
|
-
conversation:
|
|
235
|
+
conversation: DyFM_AI_Message[];
|
|
236
236
|
issuer: string;
|
|
237
237
|
settings?: DyFM_OAI_CallSettings;
|
|
238
238
|
getFullResponse?: boolean;
|
|
@@ -256,12 +256,12 @@ export declare class DyNTS_OAI_LLM_ServiceBase {
|
|
|
256
256
|
* Uses the {@link getDefaultSystemMessage}
|
|
257
257
|
*/
|
|
258
258
|
protected getMessageCreateInput(set: {
|
|
259
|
-
conversation:
|
|
259
|
+
conversation: DyFM_AI_Message[];
|
|
260
260
|
issuer: string;
|
|
261
261
|
settings?: DyFM_OAI_CallSettings;
|
|
262
262
|
}): ChatCompletionCreateParamsBase;
|
|
263
|
-
protected getDefaultSystemMessage(settings: DyFM_OAI_CallSettings):
|
|
264
|
-
protected validateConversation(conversation:
|
|
263
|
+
protected getDefaultSystemMessage(settings: DyFM_OAI_CallSettings): DyFM_AI_Message;
|
|
264
|
+
protected validateConversation(conversation: DyFM_AI_Message[]): void;
|
|
265
265
|
protected getDefaultErrorSettings(fnName: string, error: DyFM_AnyError, issuer: string): DyFM_Error_Settings;
|
|
266
266
|
}
|
|
267
267
|
//# sourceMappingURL=oai-llm.service-base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-llm.service-base.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAc,mBAAmB,EAAuC,MAAM,uBAAuB,CAAC;AAG5H,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"oai-llm.service-base.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAc,mBAAmB,EAAuC,MAAM,uBAAuB,CAAC;AAG5H,OAAO,EAAE,eAAe,EAAuB,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAA8B,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,iCAAiC,EAAE,MAAM,6DAA6D,CAAC;AAKhH;;;;;;GAMG;AAIH,qBAAa,yBAAyB;IAEpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAEmB;IAEvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAIxB,QAAQ,CAAC,eAAe,EAAE,qBAAqB,CAAC;IAEhD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,mBAAmB,IA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