@futdevpro/nts-dynamo 1.14.29 → 1.14.31
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/_services/oai-llm.service-base.d.ts +0 -3
- 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 +20 -15
- package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
- package/build/_modules/ai/_services/ai-llm.service-base.d.ts +0 -2
- package/build/_modules/ai/_services/ai-llm.service-base.d.ts.map +1 -1
- package/build/_modules/ai/_services/ai-provider.service-base.d.ts +2 -1
- package/build/_modules/ai/_services/ai-provider.service-base.d.ts.map +1 -1
- package/build/_modules/ai/_services/ai-provider.service-base.js +2 -1
- package/build/_modules/ai/_services/ai-provider.service-base.js.map +1 -1
- package/build/_modules/assistant/_collections/ass.util.d.ts +2 -2
- package/build/_modules/assistant/_collections/ass.util.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts +5 -9
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass-io.control-service.js +9 -10
- package/build/_modules/assistant/_services/ass-io.control-service.js.map +1 -1
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts +26 -10
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -1
- package/build/_modules/assistant/_services/ass-main.control-service.js +49 -4
- package/build/_modules/assistant/_services/ass-main.control-service.js.map +1 -1
- package/build/_modules/assistant/index.d.ts +1 -1
- package/build/_modules/assistant/index.d.ts.map +1 -1
- package/build/_modules/assistant/index.js +1 -1
- package/build/_modules/assistant/index.js.map +1 -1
- package/build/_modules/bot/_models/bot-channel-wrapper.interface.d.ts +17 -0
- package/build/_modules/bot/_models/bot-channel-wrapper.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/{bot-message.interface.js → bot-channel-wrapper.interface.js} +1 -1
- package/build/_modules/bot/_models/bot-channel-wrapper.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-command.interface.d.ts +2 -2
- package/build/_modules/bot/_models/bot-command.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +1 -1
- 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 +16 -13
- package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts.map +1 -1
- package/build/_modules/bot/_models/bot-user-wrapper.interface.d.ts +17 -0
- package/build/_modules/bot/_models/bot-user-wrapper.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/{bot-channel.interface.js → bot-user-wrapper.interface.js} +1 -1
- package/build/_modules/bot/_models/bot-user-wrapper.interface.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts +0 -7
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +10 -2
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.d.ts +67 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.js +391 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/index.d.ts +1 -4
- package/build/_modules/bot/_modules/discord-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/discord-bot/index.js +2 -5
- 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 +2 -2
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.js.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.d.ts +6 -6
- package/build/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.d.ts.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.d.ts +59 -0
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/dynamo-bot/_services/{dyb-messaging-provider.service.js → dyb-messaging-provider.control-service.js} +130 -108
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.js.map +1 -0
- package/build/_modules/bot/_modules/dynamo-bot/index.d.ts +1 -2
- package/build/_modules/bot/_modules/dynamo-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/dynamo-bot/index.js +1 -2
- package/build/_modules/bot/_modules/dynamo-bot/index.js.map +1 -1
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +6 -6
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts.map +1 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.d.ts +55 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.js +132 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/index.d.ts +1 -2
- package/build/_modules/bot/_modules/slack-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/slack-bot/index.js +1 -3
- package/build/_modules/bot/_modules/slack-bot/index.js.map +1 -1
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +6 -6
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts.map +1 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.d.ts +55 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.js +132 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/index.d.ts +1 -2
- package/build/_modules/bot/_modules/teams-bot/index.d.ts.map +1 -1
- package/build/_modules/bot/_modules/teams-bot/index.js +1 -3
- package/build/_modules/bot/_modules/teams-bot/index.js.map +1 -1
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts +8 -11
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-commands.control-service.js +60 -15
- package/build/_modules/bot/_services/bot-commands.control-service.js.map +1 -1
- package/build/_modules/bot/_services/bot-io.control-service.d.ts +16 -17
- package/build/_modules/bot/_services/bot-io.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-io.control-service.js +60 -51
- package/build/_modules/bot/_services/bot-io.control-service.js.map +1 -1
- package/build/_modules/bot/_services/bot-main.control-service.d.ts +17 -37
- package/build/_modules/bot/_services/bot-main.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-main.control-service.js +107 -263
- package/build/_modules/bot/_services/bot-main.control-service.js.map +1 -1
- package/build/_modules/bot/_services/bot-messaging-provider.service-base.d.ts +70 -0
- package/build/_modules/bot/_services/bot-messaging-provider.service-base.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-messaging-provider.service-base.js +16 -0
- package/build/_modules/bot/_services/bot-messaging-provider.service-base.js.map +1 -0
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts +6 -9
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts.map +1 -1
- package/build/_modules/bot/_services/bot-routines.control-service.js +29 -9
- package/build/_modules/bot/_services/bot-routines.control-service.js.map +1 -1
- package/build/_modules/bot/index.d.ts +3 -7
- package/build/_modules/bot/index.d.ts.map +1 -1
- package/build/_modules/bot/index.js +9 -7
- package/build/_modules/bot/index.js.map +1 -1
- package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts.map +1 -1
- package/build/_modules/messaging/_collections/msg-global-settings.const.js +0 -5
- package/build/_modules/messaging/_collections/msg-global-settings.const.js.map +1 -1
- package/build/_modules/messaging/_collections/msg.util.d.ts +2 -2
- package/build/_modules/messaging/_collections/msg.util.d.ts.map +1 -1
- package/build/_modules/messaging/_collections/msg.util.js.map +1 -1
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +0 -9
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts.map +1 -1
- package/build/_modules/messaging/_services/msg-integration.control-service.d.ts +0 -25
- package/build/_modules/messaging/_services/msg-integration.control-service.d.ts.map +1 -1
- package/build/_modules/messaging/_services/msg-integration.control-service.js +180 -125
- package/build/_modules/messaging/_services/msg-integration.control-service.js.map +1 -1
- package/build/_modules/messaging/index.d.ts +0 -1
- package/build/_modules/messaging/index.d.ts.map +1 -1
- package/build/_modules/messaging/index.js +1 -1
- package/build/_modules/messaging/index.js.map +1 -1
- package/package.json +1 -1
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +4 -4
- package/src/_modules/ai/_services/ai-llm.service-base.ts +2 -2
- package/src/_modules/ai/_services/ai-provider.service-base.ts +2 -1
- package/src/_modules/assistant/_collections/ass.util.ts +2 -2
- package/src/_modules/assistant/_services/ass-io.control-service.ts +17 -48
- package/src/_modules/assistant/_services/ass-main.control-service.ts +83 -32
- package/src/_modules/assistant/index.ts +1 -1
- package/src/_modules/bot/_models/bot-channel-wrapper.interface.ts +24 -0
- package/src/_modules/bot/_models/bot-command.interface.ts +2 -2
- package/src/_modules/bot/_models/bot-global-settings.interface.ts +1 -1
- package/src/_modules/bot/_models/bot-message-wrapper.interface.ts +18 -18
- package/src/_modules/bot/_models/bot-user-wrapper.interface.ts +35 -0
- package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +8 -7
- package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.ts +521 -0
- package/src/_modules/bot/_modules/discord-bot/index.ts +2 -5
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts +8 -5
- package/src/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.ts +6 -6
- package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts +431 -0
- package/src/_modules/bot/_modules/dynamo-bot/index.ts +1 -2
- package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +6 -6
- package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.ts +186 -0
- package/src/_modules/bot/_modules/slack-bot/index.ts +1 -3
- package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +6 -6
- package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.ts +186 -0
- package/src/_modules/bot/_modules/teams-bot/index.ts +1 -4
- package/src/_modules/bot/_services/bot-commands.control-service.ts +64 -34
- package/src/_modules/bot/_services/bot-io.control-service.ts +86 -95
- package/src/_modules/bot/_services/bot-main.control-service.ts +249 -240
- package/src/_modules/bot/_services/bot-messaging-provider.service-base.ts +152 -0
- package/src/_modules/bot/_services/bot-routines.control-service.ts +39 -44
- package/src/_modules/bot/index.ts +9 -7
- package/src/_modules/messaging/README.md +2 -7
- package/src/_modules/messaging/_collections/msg-global-settings.const.ts +0 -6
- package/src/_modules/messaging/_collections/msg.util.ts +2 -2
- package/src/_modules/messaging/_models/msg-global-settings.interface.ts +0 -12
- package/src/_modules/messaging/_services/msg-integration.control-service.ts +180 -179
- package/src/_modules/messaging/index.ts +1 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.d.ts +0 -22
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.d.ts.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.js +0 -187
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.js.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.d.ts +0 -27
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.d.ts.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.js +0 -277
- package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.js.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.d.ts +0 -23
- package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.d.ts.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.js +0 -319
- package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.js.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.d.ts +0 -118
- package/build/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.d.ts.map +0 -1
- package/build/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.js +0 -460
- package/build/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.js.map +0 -1
- package/build/_modules/assistant/_services/ass.service-base.d.ts +0 -33
- package/build/_modules/assistant/_services/ass.service-base.d.ts.map +0 -1
- package/build/_modules/assistant/_services/ass.service-base.js +0 -58
- package/build/_modules/assistant/_services/ass.service-base.js.map +0 -1
- package/build/_modules/bot/_collections/bot-operations.util.d.ts +0 -21
- package/build/_modules/bot/_collections/bot-operations.util.d.ts.map +0 -1
- package/build/_modules/bot/_collections/bot-operations.util.js +0 -74
- package/build/_modules/bot/_collections/bot-operations.util.js.map +0 -1
- package/build/_modules/bot/_models/bot-channel.interface.d.ts +0 -8
- package/build/_modules/bot/_models/bot-channel.interface.d.ts.map +0 -1
- package/build/_modules/bot/_models/bot-channel.interface.js.map +0 -1
- package/build/_modules/bot/_models/bot-message.interface.d.ts +0 -15
- package/build/_modules/bot/_models/bot-message.interface.d.ts.map +0 -1
- package/build/_modules/bot/_models/bot-message.interface.js.map +0 -1
- package/build/_modules/bot/_models/bot-messaging-provider.interface.d.ts +0 -68
- package/build/_modules/bot/_models/bot-messaging-provider.interface.d.ts.map +0 -1
- package/build/_modules/bot/_models/bot-messaging-provider.interface.js +0 -3
- package/build/_modules/bot/_models/bot-messaging-provider.interface.js.map +0 -1
- package/build/_modules/bot/_models/bot-user.interface.d.ts +0 -8
- package/build/_modules/bot/_models/bot-user.interface.d.ts.map +0 -1
- package/build/_modules/bot/_models/bot-user.interface.js +0 -3
- package/build/_modules/bot/_models/bot-user.interface.js.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts +0 -11
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js +0 -13
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts +0 -5
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js +0 -19
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.d.ts +0 -56
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.js +0 -379
- package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.d.ts +0 -5
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.d.ts.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.js +0 -26
- package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.js.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.service.d.ts +0 -55
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts +0 -11
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js +0 -13
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.d.ts +0 -41
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.js +0 -119
- package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.js.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts +0 -11
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js +0 -13
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.d.ts +0 -41
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.d.ts.map +0 -1
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.js +0 -119
- package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.js.map +0 -1
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.d.ts +0 -6
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.d.ts.map +0 -1
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.js +0 -47
- package/build/_modules/bot/_services/bot-messaging-provider-factory.service.js.map +0 -1
- package/src/_modules/assistant/_services/ass.service-base.ts +0 -100
- package/src/_modules/bot/_collections/bot-operations.util.ts +0 -149
- package/src/_modules/bot/_models/bot-channel.interface.ts +0 -7
- package/src/_modules/bot/_models/bot-message.interface.ts +0 -14
- package/src/_modules/bot/_models/bot-messaging-provider.interface.ts +0 -88
- package/src/_modules/bot/_models/bot-user.interface.ts +0 -7
- package/src/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.ts +0 -18
- package/src/_modules/bot/_modules/discord-bot/_collections/dib.util.ts +0 -20
- package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.service.ts +0 -475
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb.util.ts +0 -26
- package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.service.ts +0 -403
- package/src/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.ts +0 -18
- package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.service.ts +0 -156
- package/src/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.ts +0 -18
- package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.service.ts +0 -156
- package/src/_modules/bot/_services/bot-messaging-provider-factory.service.ts +0 -56
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oai-document.data-service.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-document.data-service.ts"],"names":[],"mappings":";;;AAAA,sDAA0K;AAC1K,6EAA+E;AAG/E,2GAAkI;AAClI,6EAA6E;AAC7E,2EAA2E;AAI3E,wGAAqG;AAGrG,MAAa,6BAMX,SAAQ,gCAA6B;IAO3B;IALV,QAAQ,GAAY,IAAI,CAAC;IACzB,wBAAwB,GAAY,IAAI,CAAC;IAEzC,YACE,MAAc,EACN,iCAAoD,EAC5D,IAAiB,EACjB,aAAgD,uDAAkE;QAElH,KAAK,CACH,IAAI,EACJ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FM_DBFilter, DyFM_Metadata } from '@futdevpro/fsm-dynamo';
|
|
2
|
-
import { DyFM_OAI_Settings, DyFM_OAI_Model } from '@futdevpro/fsm-dynamo/ai/open-ai';
|
|
3
|
-
import { DyNTS_DataService } from '../../../../../_services/base/data.service';
|
|
4
|
-
import { DyNTS_OAI_Embedding_ControlService } from './oai-embedding.control-service';
|
|
5
|
-
/**
|
|
6
|
-
* Vector Data Service that is connected to the relevant DBServices
|
|
7
|
-
* extends {@link DyNTS_DataService}
|
|
8
|
-
*
|
|
9
|
-
* For the vectorization, you need to setup the index in the DB to something like this:
|
|
10
|
-
* (the path declared here must be the same as the vectorizeUseIndex in the {@link DyFM_DataProperty_Params})
|
|
11
|
-
* ```json
|
|
12
|
-
* {
|
|
13
|
-
* "fields": [
|
|
14
|
-
* {
|
|
15
|
-
* "type": "vector",
|
|
16
|
-
* "path": "contentVectorized",
|
|
17
|
-
* "numDimensions": 3072,
|
|
18
|
-
* "similarity": "cosine"
|
|
19
|
-
* }
|
|
20
|
-
* ]
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* export class UserMatchStatisticsService extends DyNTS_DataService<UserMatchStatistics> {
|
|
26
|
-
* constructor(
|
|
27
|
-
* set: {
|
|
28
|
-
* data?: UserMatchStatistics,
|
|
29
|
-
* openAISettings?: DyFM_OAI_Settings,
|
|
30
|
-
* issuer: string,
|
|
31
|
-
* }
|
|
32
|
-
* ) {
|
|
33
|
-
* super(
|
|
34
|
-
* new UserMatchStatistics(set?.data),
|
|
35
|
-
* userMatchStatisticsModelParams,
|
|
36
|
-
* set?.openAISettings ?? defaultOpenAISettings,
|
|
37
|
-
* set.issuer,
|
|
38
|
-
* );
|
|
39
|
-
* }
|
|
40
|
-
* }
|
|
41
|
-
*/
|
|
42
|
-
export declare class DyNTS_OAI_VectorDataService<T extends DyFM_Metadata> extends DyNTS_DataService<T> {
|
|
43
|
-
/**
|
|
44
|
-
* OpenAI settings
|
|
45
|
-
*/
|
|
46
|
-
readonly openAISettings: DyFM_OAI_Settings;
|
|
47
|
-
/**
|
|
48
|
-
* Properties that are vectorized
|
|
49
|
-
* (properties that are marked with vectorizeFrom in other properties)
|
|
50
|
-
*/
|
|
51
|
-
readonly vectorizeProperties: DyFM_DataProperty_Params<any, T>[];
|
|
52
|
-
readonly vectorizedProperties: DyFM_DataProperty_Params<any, T>[];
|
|
53
|
-
debugLog: boolean;
|
|
54
|
-
swallowVectorizedProperties: boolean;
|
|
55
|
-
embedding_CS: DyNTS_OAI_Embedding_ControlService;
|
|
56
|
-
constructor(
|
|
57
|
-
/**
|
|
58
|
-
* Initial data, this will be used by functions on default
|
|
59
|
-
*/
|
|
60
|
-
data: T,
|
|
61
|
-
/**
|
|
62
|
-
* DB data prams will be used to connect to usable dbService on GlobalService
|
|
63
|
-
*/
|
|
64
|
-
dataParams: DyFM_DataModel_Params<T>,
|
|
65
|
-
/**
|
|
66
|
-
* OpenAI settings
|
|
67
|
-
*/
|
|
68
|
-
openAISettings: DyFM_OAI_Settings,
|
|
69
|
-
/**
|
|
70
|
-
* Initial set for issuer to be able to follow the issuer's activity
|
|
71
|
-
*/
|
|
72
|
-
issuer: string);
|
|
73
|
-
/**
|
|
74
|
-
* Vectorizes the properties of the data
|
|
75
|
-
* IF they are not vectorized yet OR alwaysVectorize is true
|
|
76
|
-
* (That are marked with vectorizeFrom if the specific property is not defined)
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* const data = await vectorizeDataProperties(data);
|
|
80
|
-
*
|
|
81
|
-
* @returns The vectorized data
|
|
82
|
-
*/
|
|
83
|
-
vectorizeDataProperties(newData?: T, forceVectorize?: boolean): Promise<T>;
|
|
84
|
-
private checkAndVectorizeSingleProperty;
|
|
85
|
-
private getVectorizingDataForVectorizedProperty;
|
|
86
|
-
/**
|
|
87
|
-
* Vectorizes the input
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* const vector = await vectorize(input);
|
|
91
|
-
*/
|
|
92
|
-
vectorize(input: string, useModel?: DyFM_OAI_Model | string): Promise<number[]>;
|
|
93
|
-
/**
|
|
94
|
-
* Vectorizes the input and searches for the most similar data
|
|
95
|
-
* (the default limit is 3, and the default numberOfCandidates is 100)
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* const result = await vectorSearch(input, searchInKey);
|
|
99
|
-
*/
|
|
100
|
-
vectorSearch(set: {
|
|
101
|
-
input: string;
|
|
102
|
-
/** this should be the vectorized property key */
|
|
103
|
-
searchInKey: string;
|
|
104
|
-
limit?: number;
|
|
105
|
-
/**
|
|
106
|
-
* Number of candidates that are used to find the best match
|
|
107
|
-
*/
|
|
108
|
-
numberOfCandidates?: number;
|
|
109
|
-
filterBy?: DyFM_DBFilter<T>;
|
|
110
|
-
}): Promise<any>;
|
|
111
|
-
/**
|
|
112
|
-
* VectorDataService overrides the saveData function to vectorize the data properties
|
|
113
|
-
*
|
|
114
|
-
* {@link DyNTS_DataService.saveData}
|
|
115
|
-
*/
|
|
116
|
-
saveData(data?: T, dontSetToService?: boolean, forceVectorize?: boolean): Promise<T>;
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=oai-vector-data.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oai-vector-data.service.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EAEb,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAA2B,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAG9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AAGrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG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BAAgB,CAAC,EAAE,OAAO,EAC1B,cAAc,CAAC,EAAE,OAAO,GACvB,OAAO,CAAC,CAAC,CAAC;CA4Bd"}
|
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DyNTS_OAI_VectorDataService = void 0;
|
|
4
|
-
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
|
-
const fsm_dynamo_2 = require("@futdevpro/fsm-dynamo");
|
|
6
|
-
const open_ai_1 = require("@futdevpro/fsm-dynamo/ai/open-ai");
|
|
7
|
-
const global_settings_const_1 = require("../../../../../_collections/global-settings.const");
|
|
8
|
-
const data_service_1 = require("../../../../../_services/base/data.service");
|
|
9
|
-
const oai_embedding_control_service_1 = require("./oai-embedding.control-service");
|
|
10
|
-
/**
|
|
11
|
-
* Vector Data Service that is connected to the relevant DBServices
|
|
12
|
-
* extends {@link DyNTS_DataService}
|
|
13
|
-
*
|
|
14
|
-
* For the vectorization, you need to setup the index in the DB to something like this:
|
|
15
|
-
* (the path declared here must be the same as the vectorizeUseIndex in the {@link DyFM_DataProperty_Params})
|
|
16
|
-
* ```json
|
|
17
|
-
* {
|
|
18
|
-
* "fields": [
|
|
19
|
-
* {
|
|
20
|
-
* "type": "vector",
|
|
21
|
-
* "path": "contentVectorized",
|
|
22
|
-
* "numDimensions": 3072,
|
|
23
|
-
* "similarity": "cosine"
|
|
24
|
-
* }
|
|
25
|
-
* ]
|
|
26
|
-
* }
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* export class UserMatchStatisticsService extends DyNTS_DataService<UserMatchStatistics> {
|
|
31
|
-
* constructor(
|
|
32
|
-
* set: {
|
|
33
|
-
* data?: UserMatchStatistics,
|
|
34
|
-
* openAISettings?: DyFM_OAI_Settings,
|
|
35
|
-
* issuer: string,
|
|
36
|
-
* }
|
|
37
|
-
* ) {
|
|
38
|
-
* super(
|
|
39
|
-
* new UserMatchStatistics(set?.data),
|
|
40
|
-
* userMatchStatisticsModelParams,
|
|
41
|
-
* set?.openAISettings ?? defaultOpenAISettings,
|
|
42
|
-
* set.issuer,
|
|
43
|
-
* );
|
|
44
|
-
* }
|
|
45
|
-
* }
|
|
46
|
-
*/
|
|
47
|
-
class DyNTS_OAI_VectorDataService extends data_service_1.DyNTS_DataService {
|
|
48
|
-
openAISettings;
|
|
49
|
-
/**
|
|
50
|
-
* Properties that are vectorized
|
|
51
|
-
* (properties that are marked with vectorizeFrom in other properties)
|
|
52
|
-
*/
|
|
53
|
-
vectorizeProperties;
|
|
54
|
-
vectorizedProperties;
|
|
55
|
-
/* readonly vectorizeProperties: { from: string, to: string }[]; */
|
|
56
|
-
debugLog = false;
|
|
57
|
-
swallowVectorizedProperties = true;
|
|
58
|
-
embedding_CS;
|
|
59
|
-
constructor(
|
|
60
|
-
/**
|
|
61
|
-
* Initial data, this will be used by functions on default
|
|
62
|
-
*/
|
|
63
|
-
data,
|
|
64
|
-
/**
|
|
65
|
-
* DB data prams will be used to connect to usable dbService on GlobalService
|
|
66
|
-
*/
|
|
67
|
-
dataParams,
|
|
68
|
-
/**
|
|
69
|
-
* OpenAI settings
|
|
70
|
-
*/
|
|
71
|
-
openAISettings,
|
|
72
|
-
/**
|
|
73
|
-
* Initial set for issuer to be able to follow the issuer's activity
|
|
74
|
-
*/
|
|
75
|
-
issuer) {
|
|
76
|
-
super(data, dataParams, issuer);
|
|
77
|
-
this.openAISettings = openAISettings;
|
|
78
|
-
this.vectorizedProperties = Object.values(dataParams.properties).filter((property) => property.vectorizedFrom);
|
|
79
|
-
this.vectorizeProperties = Object.keys(dataParams.properties).filter((key) => this.vectorizedProperties.some((property) => property.vectorizedFrom.includes(key))).map((key) => dataParams.properties[key]);
|
|
80
|
-
/* const vectorizePropertyKeys: string[] = Object.keys(dataParams.properties).filter(
|
|
81
|
-
(key: string): boolean => (
|
|
82
|
-
dataParams.properties[key] as DyFM_DataProperty_Params<any>
|
|
83
|
-
).vectorizedFrom &&
|
|
84
|
-
(dataParams.properties[key] as DyFM_DataProperty_Params<any>).vectorizedFrom !== key
|
|
85
|
-
); */
|
|
86
|
-
if (!openAISettings.config.apiKey) {
|
|
87
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
88
|
-
...this.getDefaultErrorSettings('constructor', new Error('openAISettings.config.apiKey is required')),
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
const model = openAISettings.defaultSettings.useModel ??
|
|
92
|
-
open_ai_1.DyFM_OAI_Model.textEmbedding_3Large;
|
|
93
|
-
/* if (
|
|
94
|
-
!DyFM_allOpenAIEmbeddingModels.includes(model)
|
|
95
|
-
) {
|
|
96
|
-
throw new DyFM_Error({
|
|
97
|
-
...this.getDefaultErrorSettings(
|
|
98
|
-
'constructor',
|
|
99
|
-
new Error(`useModel "${model}" is not an embedding model!`)
|
|
100
|
-
),
|
|
101
|
-
});
|
|
102
|
-
} */
|
|
103
|
-
if (!this.vectorizedProperties.length) {
|
|
104
|
-
throw new Error('vectorizedProperties is missing! ' +
|
|
105
|
-
`\nkeys with vectorizedFrom: ${Object.keys(dataParams.properties).filter((key) => Boolean(dataParams.properties[key].vectorizedFrom)).map(key => `"${key}"`).join(', ')}`);
|
|
106
|
-
}
|
|
107
|
-
if (!this.vectorizeProperties.length) {
|
|
108
|
-
throw new Error('vectorizeProperties is missing! ' +
|
|
109
|
-
`\nkeys with vectorizeFrom: ${Object.keys(dataParams.properties).filter((key) => Boolean(dataParams.properties[key].vectorizedFrom)).map(key => `"${key}"`).join(', ')}`);
|
|
110
|
-
}
|
|
111
|
-
/* if (!vectorizePropertyKeys.length) {
|
|
112
|
-
throw new Error(
|
|
113
|
-
'vectorizedPropertyKeys is missing! ' +
|
|
114
|
-
`\nkeys with vectorizeFrom: ${Object.keys(dataParams.properties).filter(
|
|
115
|
-
(key: string): boolean => Boolean(
|
|
116
|
-
(dataParams.properties[key] as DyFM_DataProperty_Params<any>).vectorizedFrom
|
|
117
|
-
)
|
|
118
|
-
).map(key => `"${key}"`).join(', ')}`
|
|
119
|
-
);
|
|
120
|
-
} */
|
|
121
|
-
/* vectorizePropertyKeys.forEach((key: string): void => {
|
|
122
|
-
dataParams.properties[key].embeddingModel ??= model;
|
|
123
|
-
}); */
|
|
124
|
-
this.vectorizedProperties.forEach((property) => {
|
|
125
|
-
property.embeddingModel ??= model;
|
|
126
|
-
});
|
|
127
|
-
/* this.vectorizeProperties = vectorizePropertyKeys.map(
|
|
128
|
-
(key: string): DyFM_DataProperty_Params<any> =>
|
|
129
|
-
dataParams.properties[key] as DyFM_DataProperty_Params<any>
|
|
130
|
-
); */
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Vectorizes the properties of the data
|
|
134
|
-
* IF they are not vectorized yet OR alwaysVectorize is true
|
|
135
|
-
* (That are marked with vectorizeFrom if the specific property is not defined)
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* const data = await vectorizeDataProperties(data);
|
|
139
|
-
*
|
|
140
|
-
* @returns The vectorized data
|
|
141
|
-
*/
|
|
142
|
-
async vectorizeDataProperties(newData, forceVectorize) {
|
|
143
|
-
try {
|
|
144
|
-
let existingData;
|
|
145
|
-
if (!forceVectorize && newData?._id) {
|
|
146
|
-
existingData = await this.getDataById(newData._id, true, true);
|
|
147
|
-
}
|
|
148
|
-
await fsm_dynamo_2.DyFM_Array.asyncForEachAllAtOnce(this.vectorizedProperties, async (property) => {
|
|
149
|
-
await this.checkAndVectorizeSingleProperty(property, newData, existingData, forceVectorize);
|
|
150
|
-
});
|
|
151
|
-
return newData;
|
|
152
|
-
}
|
|
153
|
-
catch (error) {
|
|
154
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
155
|
-
...this.getDefaultErrorSettings('vectorizeDataProperties', error),
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
async checkAndVectorizeSingleProperty(vectorizedProperty, newData, existingData, forceVectorize) {
|
|
160
|
-
const newValue = await this.getVectorizingDataForVectorizedProperty(vectorizedProperty, newData);
|
|
161
|
-
const existingValue = await this.getVectorizingDataForVectorizedProperty(vectorizedProperty, existingData);
|
|
162
|
-
const vectorizedFrom = vectorizedProperty.vectorizedFrom[0];
|
|
163
|
-
const vectorizingPropertyHaveValue = Boolean(newData[vectorizedFrom]);
|
|
164
|
-
const newDataIsNewChanged = (!existingValue && vectorizingPropertyHaveValue) ||
|
|
165
|
-
!fsm_dynamo_2.DyFM_Object.sameObjects(existingValue, newValue);
|
|
166
|
-
if (forceVectorize || (vectorizingPropertyHaveValue && newDataIsNewChanged)) {
|
|
167
|
-
if (!vectorizedProperty.embeddingModel) {
|
|
168
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
169
|
-
...this.getDefaultErrorSettings('vectorizeDataProperties', new Error(`Property "${vectorizedProperty.key}" has no embedding model!`)),
|
|
170
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-VDB1`,
|
|
171
|
-
__localStack: this.dataParams.stackLocation,
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
if (this.debugLog) {
|
|
175
|
-
fsm_dynamo_1.DyFM_Log.log(`vectorizing "${vectorizedProperty.key}" in new "${this.dataParams.dataName}"` +
|
|
176
|
-
newData?.name ? `: "${newData?.name}"` : '');
|
|
177
|
-
}
|
|
178
|
-
newData[vectorizedProperty.key] = await this.vectorize(newValue, vectorizedProperty.embeddingModel);
|
|
179
|
-
}
|
|
180
|
-
else if (existingData?.[vectorizedProperty.key] && !newData?.[vectorizedProperty.key]) {
|
|
181
|
-
newData[vectorizedProperty.key] = existingData[vectorizedProperty.key];
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
async getVectorizingDataForVectorizedProperty(vectorizedProperty, data) {
|
|
185
|
-
if (vectorizedProperty.vectorizedFrom.length === 1) {
|
|
186
|
-
const value = data?.[vectorizedProperty.vectorizedFrom[0]];
|
|
187
|
-
if (value === undefined) {
|
|
188
|
-
return undefined;
|
|
189
|
-
}
|
|
190
|
-
else if (typeof value === 'string') {
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
else if (Array.isArray(value) || typeof value === 'object') {
|
|
194
|
-
return JSON.stringify(value);
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
return `${value}`;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
const object = {};
|
|
202
|
-
vectorizedProperty.vectorizedFrom.forEach((key) => {
|
|
203
|
-
if (data?.[key] !== undefined) {
|
|
204
|
-
object[key] = data[key];
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
return JSON.stringify(object);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Vectorizes the input
|
|
212
|
-
*
|
|
213
|
-
* @example
|
|
214
|
-
* const vector = await vectorize(input);
|
|
215
|
-
*/
|
|
216
|
-
async vectorize(input, useModel = this.openAISettings.defaultSettings.useModel) {
|
|
217
|
-
try {
|
|
218
|
-
if (!input) {
|
|
219
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
220
|
-
...this.getDefaultErrorSettings('vectorize', new Error('input is required')),
|
|
221
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-V1`,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
this.embedding_CS ??= new oai_embedding_control_service_1.DyNTS_OAI_Embedding_ControlService(this.openAISettings);
|
|
225
|
-
return await this.embedding_CS.createEmbedding(input, useModel, this.issuer);
|
|
226
|
-
}
|
|
227
|
-
catch (error) {
|
|
228
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
229
|
-
...this.getDefaultErrorSettings('vectorize', error),
|
|
230
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-V0`,
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Vectorizes the input and searches for the most similar data
|
|
236
|
-
* (the default limit is 3, and the default numberOfCandidates is 100)
|
|
237
|
-
*
|
|
238
|
-
* @example
|
|
239
|
-
* const result = await vectorSearch(input, searchInKey);
|
|
240
|
-
*/
|
|
241
|
-
async vectorSearch(set) {
|
|
242
|
-
try {
|
|
243
|
-
if (!set.input) {
|
|
244
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
245
|
-
...this.getDefaultErrorSettings('vectorSearch', new Error('input is required')),
|
|
246
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-VS1`,
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
set.limit ??= 3;
|
|
250
|
-
set.numberOfCandidates ??= 100;
|
|
251
|
-
const { input, searchInKey, limit, numberOfCandidates, filterBy } = set;
|
|
252
|
-
this.embedding_CS ??= new oai_embedding_control_service_1.DyNTS_OAI_Embedding_ControlService(this.openAISettings);
|
|
253
|
-
const property = this.dataParams.properties[searchInKey];
|
|
254
|
-
if (!property) {
|
|
255
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
256
|
-
...this.getDefaultErrorSettings('vectorSearch', new Error(`Property "${searchInKey}" not found! ` +
|
|
257
|
-
`while searching "${this.dataParams.dataName}" ` +
|
|
258
|
-
`(The searchable properties are: ${this.vectorizedProperties.map(p => `"${p.key}"`).join(', ')})`)),
|
|
259
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-VS2`,
|
|
260
|
-
__localStack: this.dataParams.stackLocation,
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
if (!property.vectorizeUseIndex) {
|
|
264
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
265
|
-
...this.getDefaultErrorSettings('vectorSearch', new Error(`Property "${searchInKey}" has no vectorizeUseIndex!`)),
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
const embeddedInput = await this.embedding_CS.createEmbedding(input, property.embeddingModel, this.issuer);
|
|
269
|
-
/* const vectorSearchFilter = */
|
|
270
|
-
const vectorSearchFilter = {
|
|
271
|
-
$vectorSearch: {
|
|
272
|
-
/** this is the index name that is created in the DB (in the Atlas)
|
|
273
|
-
* also the same that is used in the {@link DyFM_DataProperty_Params} */
|
|
274
|
-
index: property.vectorizeUseIndex,
|
|
275
|
-
queryVector: embeddedInput,
|
|
276
|
-
/** this is the property key that is vectorized and used to search */
|
|
277
|
-
path: searchInKey,
|
|
278
|
-
numCandidates: numberOfCandidates,
|
|
279
|
-
limit: limit,
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
if (filterBy) {
|
|
283
|
-
vectorSearchFilter.filter = filterBy;
|
|
284
|
-
}
|
|
285
|
-
if (this.debugLog) {
|
|
286
|
-
fsm_dynamo_1.DyFM_Log.log(`vectorSearch...`);
|
|
287
|
-
}
|
|
288
|
-
const result = await this.dataDBService.aggregate([vectorSearchFilter]);
|
|
289
|
-
if (this.debugLog) {
|
|
290
|
-
fsm_dynamo_1.DyFM_Log.log(`vectorSearch: ${result.length} results`);
|
|
291
|
-
}
|
|
292
|
-
return result;
|
|
293
|
-
}
|
|
294
|
-
catch (error) {
|
|
295
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
296
|
-
...this.getDefaultErrorSettings('vectorSearch', error),
|
|
297
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-VS0`,
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* VectorDataService overrides the saveData function to vectorize the data properties
|
|
303
|
-
*
|
|
304
|
-
* {@link DyNTS_DataService.saveData}
|
|
305
|
-
*/
|
|
306
|
-
async saveData(data, dontSetToService, forceVectorize) {
|
|
307
|
-
try {
|
|
308
|
-
data = this.ensureData(data);
|
|
309
|
-
data = await this.vectorizeDataProperties(data, forceVectorize);
|
|
310
|
-
data = await super.saveData(data, dontSetToService);
|
|
311
|
-
if (this.swallowVectorizedProperties) {
|
|
312
|
-
this.vectorizedProperties.forEach((property) => {
|
|
313
|
-
delete data[property.key];
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
fsm_dynamo_2.DyFM_Object.cleanObject(data);
|
|
317
|
-
return data;
|
|
318
|
-
}
|
|
319
|
-
catch (error) {
|
|
320
|
-
throw new fsm_dynamo_2.DyFM_Error({
|
|
321
|
-
...this.getDefaultErrorSettings('saveData', error),
|
|
322
|
-
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-VDB-SD0`,
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
exports.DyNTS_OAI_VectorDataService = DyNTS_OAI_VectorDataService;
|
|
328
|
-
//import {
|
|
329
|
-
// DyFM_DataModel_Params,
|
|
330
|
-
// DyFM_DataProperty_Params,
|
|
331
|
-
// DyFM_Metadata,
|
|
332
|
-
//} from '@futdevpro/fsm-dynamo';
|
|
333
|
-
//import { DyFM_OAI_Settings, DyFM_OAI_EmbeddingModel, DyFM_OAI_Model } from '@futdevpro/fsm-dynamo/ai/open-ai';
|
|
334
|
-
//
|
|
335
|
-
//import { DyNTS_DAI_VectorDataService } from '../../_modules/document-ai/_services/dai-vector-data.service-base';
|
|
336
|
-
//import { DyNTS_OAI_Embedding_Service } from './oai-embedding.service';
|
|
337
|
-
//import { DyNTS_global_settings } from '../../../../_collections/global-settings.const';
|
|
338
|
-
//import { DyNTS_OAI_global_settings } from '../_collections/oai-global-settings.const';
|
|
339
|
-
//
|
|
340
|
-
///**
|
|
341
|
-
// * OpenAI implementation of the generic Vector Data Service
|
|
342
|
-
// * Extends the generic DAI VectorDataService with OpenAI-specific functionality
|
|
343
|
-
// */
|
|
344
|
-
//export class DyNTS_OAI_VectorDataService<T extends DyFM_Metadata> extends DyNTS_DAI_VectorDataService<T> {
|
|
345
|
-
//
|
|
346
|
-
// debugLog: boolean = true;
|
|
347
|
-
// swallowVectorizedProperties: boolean = true;
|
|
348
|
-
//
|
|
349
|
-
// constructor(
|
|
350
|
-
// /** Initial data */
|
|
351
|
-
// data: T,
|
|
352
|
-
// /** DB data params */
|
|
353
|
-
// dataParams: DyFM_DataModel_Params<T>,
|
|
354
|
-
// /** OpenAI settings */
|
|
355
|
-
// public readonly openAISettings: DyFM_OAI_Settings,
|
|
356
|
-
// /** Issuer */
|
|
357
|
-
// issuer: string
|
|
358
|
-
// ) {
|
|
359
|
-
// // Create OpenAI embedding service
|
|
360
|
-
// const embeddingService = new DyNTS_OAI_Embedding_Service(openAISettings);
|
|
361
|
-
//
|
|
362
|
-
// super(data, dataParams, embeddingService, issuer);
|
|
363
|
-
//
|
|
364
|
-
// if (!openAISettings.openAIConfig.apiKey) {
|
|
365
|
-
// throw new Error('openAIConfig.apiKey is required');
|
|
366
|
-
// }
|
|
367
|
-
//
|
|
368
|
-
// const model: DyFM_OAI_EmbeddingModel = openAISettings.defaultSettings.useModel as DyFM_OAI_EmbeddingModel ??
|
|
369
|
-
// DyFM_OAI_Model.textEmbedding_3Large;
|
|
370
|
-
//
|
|
371
|
-
// // Configure vectorized properties with OpenAI-specific settings
|
|
372
|
-
// this.configureVectorizedProperties(model);
|
|
373
|
-
// }
|
|
374
|
-
//
|
|
375
|
-
// /**
|
|
376
|
-
// * Configure vectorized properties with OpenAI-specific settings
|
|
377
|
-
// */
|
|
378
|
-
// private configureVectorizedProperties(model: DyFM_OAI_EmbeddingModel): void {
|
|
379
|
-
// // Update vectorized properties with OpenAI model info
|
|
380
|
-
// this.vectorizedProperties.forEach(property => {
|
|
381
|
-
// if (property.vectorizedFrom) {
|
|
382
|
-
// // Set the embedding model for this property
|
|
383
|
-
// (property as any).embeddingModel = model;
|
|
384
|
-
// }
|
|
385
|
-
// });
|
|
386
|
-
// }
|
|
387
|
-
//
|
|
388
|
-
// /**
|
|
389
|
-
// * Perform vector search with OpenAI-specific implementation
|
|
390
|
-
// */
|
|
391
|
-
// protected override async performVectorSearch(
|
|
392
|
-
// query: string,
|
|
393
|
-
// model: string,
|
|
394
|
-
// issuer: string,
|
|
395
|
-
// options: any
|
|
396
|
-
// ): Promise<T[]> {
|
|
397
|
-
// try {
|
|
398
|
-
// // Create embedding for the query
|
|
399
|
-
// const queryEmbedding = await this.embeddingService.createEmbedding(query, model, issuer);
|
|
400
|
-
//
|
|
401
|
-
// // Get all data
|
|
402
|
-
// const allData = await this.getAllData();
|
|
403
|
-
//
|
|
404
|
-
// // Calculate similarities (simplified implementation)
|
|
405
|
-
// const results = allData.map(item => {
|
|
406
|
-
// const itemEmbedding = (item as any).chunkParentedContentVectorized;
|
|
407
|
-
// if (!itemEmbedding) return { item, similarity: 0 };
|
|
408
|
-
//
|
|
409
|
-
// const similarity = this.calculateCosineSimilarity(queryEmbedding, itemEmbedding);
|
|
410
|
-
// return { item, similarity };
|
|
411
|
-
// })
|
|
412
|
-
// .filter(result => result.similarity >= (options.minSimilarity || 0))
|
|
413
|
-
// .sort((a, b) => b.similarity - a.similarity)
|
|
414
|
-
// .slice(0, options.limit || 10)
|
|
415
|
-
// .map(result => result.item);
|
|
416
|
-
//
|
|
417
|
-
// return results;
|
|
418
|
-
// } catch (error) {
|
|
419
|
-
// throw new Error(`Vector search failed: ${error.message}`);
|
|
420
|
-
// }
|
|
421
|
-
// }
|
|
422
|
-
//
|
|
423
|
-
// /**
|
|
424
|
-
// * Calculate cosine similarity between two vectors
|
|
425
|
-
// */
|
|
426
|
-
// private calculateCosineSimilarity(vecA: number[], vecB: number[]): number {
|
|
427
|
-
// if (vecA.length !== vecB.length) return 0;
|
|
428
|
-
//
|
|
429
|
-
// let dotProduct = 0;
|
|
430
|
-
// let normA = 0;
|
|
431
|
-
// let normB = 0;
|
|
432
|
-
//
|
|
433
|
-
// for (let i = 0; i < vecA.length; i++) {
|
|
434
|
-
// dotProduct += vecA[i] * vecB[i];
|
|
435
|
-
// normA += vecA[i] * vecA[i];
|
|
436
|
-
// normB += vecB[i] * vecB[i];
|
|
437
|
-
// }
|
|
438
|
-
//
|
|
439
|
-
// if (normA === 0 || normB === 0) return 0;
|
|
440
|
-
//
|
|
441
|
-
// return dotProduct / (Math.sqrt(normA) * Math.sqrt(normB));
|
|
442
|
-
// }
|
|
443
|
-
//
|
|
444
|
-
// /**
|
|
445
|
-
// * Get default error settings
|
|
446
|
-
// */
|
|
447
|
-
// protected getDefaultErrorSettings(
|
|
448
|
-
// method: string,
|
|
449
|
-
// error: any,
|
|
450
|
-
// issuer?: string
|
|
451
|
-
// ): any {
|
|
452
|
-
// return {
|
|
453
|
-
// method,
|
|
454
|
-
// error,
|
|
455
|
-
// issuer: issuer || this.issuer,
|
|
456
|
-
// userMsg: this.defaultErrorUserMsg,
|
|
457
|
-
// };
|
|
458
|
-
// }
|
|
459
|
-
//}
|
|
460
|
-
//# sourceMappingURL=oai-vector-data.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oai-vector-data.service.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,sDAQ+B;AAC/B,8DAA8G;AAE9G,6FAA0F;AAC1F,6EAA+E;AAC/E,mFAAqF;AAGrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,2BAAqD,SAAQ,gCAAoB;IA2B1E;IAzBlB;;;OAGG;IACM,mBAAmB,CAAqC;IACxD,oBAAoB,CAAqC;IAClE,mEAAmE;IAEnE,QAAQ,GAAY,KAAK,CAAC;IAC1B,2BAA2B,GAAY,IAAI,CAAC;IAE5C,YAAY,CAAqC;IAEjD;IACE;;OAEG;IACH,IAAO;IACP;;OAEG;IACH,UAAoC;IACpC;;OAEG;IACa,cAAiC;IACjD;;OAEG;IACH,MAAc;QAEd,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;QANhB,mB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import { DyNTS_Bot_Main_ControlService } from '../../bot/_services/bot-main.control-service';
|
|
2
|
-
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
3
|
-
import { DyNTS_Bot_MessageWrapper } from '../../bot/_models/bot-message-wrapper.interface';
|
|
4
|
-
import { DyNTS_Bot_Channel } from '../../bot/_models/bot-channel.interface';
|
|
5
|
-
import { DyNTS_Bot_User } from '../../bot/_models/bot-user.interface';
|
|
6
|
-
import { DyNTS_Bot_MessagingProvider } from '../../bot/_models/bot-messaging-provider.interface';
|
|
7
|
-
import { DyNTS_AI_LLMChat_ServiceBase } from '../../ai/_services/ai-llm-chat.service-base';
|
|
8
|
-
import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
|
|
9
|
-
import { DyNTS_Ass_IO_ControlService } from './ass-io.control-service';
|
|
10
|
-
/**
|
|
11
|
-
* Assistant Service Base
|
|
12
|
-
* Integrates commsProvider (bot) and aiProvider (LLMChat) to create AI-powered assistant
|
|
13
|
-
* USES EXISTING AI ABSTRACTIONS - no duplication
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class DyNTS_Ass_ServiceBase<T_MessagePlatformChannel extends DyNTS_Bot_Channel<any> = DyNTS_Bot_Channel<any>, T_MessagePlatformMessage extends DyNTS_Bot_Message<any> = DyNTS_Bot_Message<any>, T_MessagePlatformUser extends DyNTS_Bot_User<any> = DyNTS_Bot_User<any>, T_MessageProvider extends DyNTS_Bot_MessagingProvider<T_MessagePlatformChannel, T_MessagePlatformMessage, T_MessagePlatformUser> = DyNTS_Bot_MessagingProvider<T_MessagePlatformChannel, T_MessagePlatformMessage, T_MessagePlatformUser>> extends DyNTS_Bot_Main_ControlService<T_MessagePlatformChannel, T_MessagePlatformMessage, T_MessagePlatformUser, T_MessageProvider> {
|
|
16
|
-
protected _aiProvider: DyNTS_AI_LLMChat_ServiceBase;
|
|
17
|
-
get aiProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
18
|
-
protected abstract getAIProvider(): DyNTS_AI_LLMChat_ServiceBase;
|
|
19
|
-
protected abstract getBotIOControlService(): DyNTS_Ass_IO_ControlService<T_MessagePlatformChannel, T_MessagePlatformMessage, T_MessagePlatformUser, T_MessageProvider>;
|
|
20
|
-
defaultSystemPrompt: string;
|
|
21
|
-
protected constructor(setupAutomatically?: boolean);
|
|
22
|
-
/**
|
|
23
|
-
* Gather messages from comms platform (any platform)
|
|
24
|
-
* Same as dias.service-base but platform-agnostic
|
|
25
|
-
* Now uses wrapper's provider to ensure messages from correct platform
|
|
26
|
-
*/
|
|
27
|
-
gatherMessagesForMessage(message: T_MessagePlatformMessage, wrapper: DyNTS_Bot_MessageWrapper<T_MessagePlatformMessage>, limit?: number): Promise<T_MessagePlatformMessage[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Convert gathered messages to AI conversation using EXISTING DyFM_AI_Message
|
|
30
|
-
*/
|
|
31
|
-
gatherMessagesAsAIConversation(message: T_MessagePlatformMessage, wrapper: DyNTS_Bot_MessageWrapper<T_MessagePlatformMessage>, issuer: string): Promise<DyFM_AI_Message[]>;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=ass.service-base.d.ts.map
|