@futdevpro/nts-dynamo 1.10.25 → 1.10.27
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/_models/control-models/app-params.control-model.d.ts +30 -0
- package/build/_models/control-models/app-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/app-params.control-model.js +6 -0
- package/build/_models/control-models/app-params.control-model.js.map +1 -1
- package/build/_modules/open-ai/_services/embedding.control-service.d.ts +3 -22
- package/build/_modules/open-ai/_services/embedding.control-service.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/embedding.control-service.js +13 -26
- package/build/_modules/open-ai/_services/embedding.control-service.js.map +1 -1
- package/build/_modules/open-ai/_services/gpt.service-base.d.ts +5 -5
- package/build/_modules/open-ai/_services/gpt.service-base.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/gpt.service-base.js.map +1 -1
- package/build/_modules/open-ai/_services/open-ai.service-base.d.ts +4 -6
- package/build/_modules/open-ai/_services/open-ai.service-base.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/open-ai.service-base.js +3 -3
- package/build/_modules/open-ai/_services/open-ai.service-base.js.map +1 -1
- package/build/_modules/open-ai/_services/vector-data.service.d.ts +32 -0
- package/build/_modules/open-ai/_services/vector-data.service.d.ts.map +1 -0
- package/build/_modules/open-ai/_services/vector-data.service.js +126 -0
- package/build/_modules/open-ai/_services/vector-data.service.js.map +1 -0
- package/build/_modules/open-ai/index.d.ts +2 -4
- package/build/_modules/open-ai/index.d.ts.map +1 -1
- package/build/_modules/open-ai/index.js +2 -4
- package/build/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/server/errors/errors.data-service.d.ts.map +1 -1
- package/build/_modules/server/errors/errors.data-service.js +6 -1
- package/build/_modules/server/errors/errors.data-service.js.map +1 -1
- package/build/_modules/socket/_models/socket-presence.control-model.js +1 -1
- package/build/_modules/socket/_services/socket-client.service.d.ts +2 -1
- package/build/_modules/socket/_services/socket-client.service.d.ts.map +1 -1
- package/build/_modules/socket/_services/socket-client.service.js +22 -19
- package/build/_modules/socket/_services/socket-client.service.js.map +1 -1
- package/build/_modules/socket/_services/socket-server.service.d.ts +1 -1
- package/build/_modules/socket/_services/socket-server.service.d.ts.map +1 -1
- package/build/_modules/socket/_services/socket-server.service.js +40 -29
- package/build/_modules/socket/_services/socket-server.service.js.map +1 -1
- package/build/_services/base/data.service.d.ts +13 -4
- package/build/_services/base/data.service.d.ts.map +1 -1
- package/build/_services/base/data.service.js +16 -10
- package/build/_services/base/data.service.js.map +1 -1
- package/build/_services/server/app.server.d.ts.map +1 -1
- package/build/_services/server/app.server.js +13 -4
- package/build/_services/server/app.server.js.map +1 -1
- package/package.json +3 -3
- package/src/_models/control-models/app-params.control-model.ts +9 -0
- package/src/_modules/open-ai/_services/embedding.control-service.ts +18 -28
- package/src/_modules/open-ai/_services/gpt.service-base.ts +7 -8
- package/src/_modules/open-ai/_services/open-ai.service-base.ts +6 -9
- package/src/_modules/open-ai/_services/vector-data.service.ts +188 -0
- package/src/_modules/open-ai/index.ts +2 -6
- package/src/_modules/server/errors/errors.data-service.ts +5 -1
- package/src/_modules/socket/_models/socket-presence.control-model.ts +1 -1
- package/src/_modules/socket/_services/socket-client.service.ts +23 -20
- package/src/_modules/socket/_services/socket-server.service.ts +40 -28
- package/src/_services/base/data.service.ts +14 -14
- package/src/_services/server/app.server.ts +13 -9
- package/build/_modules/open-ai/_enums/open-ai-model.enum.d.ts +0 -11
- package/build/_modules/open-ai/_enums/open-ai-model.enum.d.ts.map +0 -1
- package/build/_modules/open-ai/_enums/open-ai-model.enum.js +0 -110
- package/build/_modules/open-ai/_enums/open-ai-model.enum.js.map +0 -1
- package/build/_modules/open-ai/_models/gpt-call-settings.interface.d.ts +0 -54
- package/build/_modules/open-ai/_models/gpt-call-settings.interface.d.ts.map +0 -1
- package/build/_modules/open-ai/_models/gpt-call-settings.interface.js +0 -65
- package/build/_modules/open-ai/_models/gpt-call-settings.interface.js.map +0 -1
- package/build/_modules/open-ai/_models/open-ai-api-env-settings.interface.d.ts +0 -7
- package/build/_modules/open-ai/_models/open-ai-api-env-settings.interface.d.ts.map +0 -1
- package/build/_modules/open-ai/_models/open-ai-api-env-settings.interface.js +0 -3
- package/build/_modules/open-ai/_models/open-ai-api-env-settings.interface.js.map +0 -1
- package/build/_modules/open-ai/_models/open-ai-settings.interface.d.ts +0 -17
- package/build/_modules/open-ai/_models/open-ai-settings.interface.d.ts.map +0 -1
- package/build/_modules/open-ai/_models/open-ai-settings.interface.js +0 -25
- package/build/_modules/open-ai/_models/open-ai-settings.interface.js.map +0 -1
- package/src/_modules/open-ai/_enums/open-ai-model.enum.ts +0 -137
- package/src/_modules/open-ai/_models/gpt-call-settings.interface.ts +0 -69
- package/src/_modules/open-ai/_models/open-ai-api-env-settings.interface.ts +0 -12
- package/src/_modules/open-ai/_models/open-ai-settings.interface.ts +0 -31
|
@@ -209,9 +209,9 @@ export abstract class DyNTS_SocketServerService<
|
|
|
209
209
|
tasks: [
|
|
210
210
|
async (content: any) => {
|
|
211
211
|
if (content instanceof DyFM_Error) {
|
|
212
|
-
content.logSimple(`=--> socket-client(${this.params.name}) ERROR`);
|
|
212
|
+
content.logSimple(`=--> socket-client (${this.params.name}) ERROR`);
|
|
213
213
|
} else {
|
|
214
|
-
DyFM_Log.error(`=--> socket-client(${this.params.name}) ERROR:`, content);
|
|
214
|
+
DyFM_Log.error(`=--> socket-client (${this.params.name}) ERROR:`, content);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
],
|
|
@@ -306,13 +306,13 @@ export abstract class DyNTS_SocketServerService<
|
|
|
306
306
|
*/
|
|
307
307
|
if (DyNTS_global_settings.log_settings.socket_eventContent) {
|
|
308
308
|
DyFM_Log.log(
|
|
309
|
-
`--=> incoming socket(${this.params.name}) ` +
|
|
309
|
+
`--=> incoming socket (${this.params.name}) ` +
|
|
310
310
|
`event: "${DyFM_SocketEvent_Key.subscribe}";` +
|
|
311
311
|
`\ncontent:`, content
|
|
312
312
|
);
|
|
313
313
|
} else {
|
|
314
314
|
DyFM_Log.log(
|
|
315
|
-
`--=> incoming socket(${this.params.name}) ` +
|
|
315
|
+
`--=> incoming socket (${this.params.name}) ` +
|
|
316
316
|
`event: "${DyFM_SocketEvent_Key.subscribe}"`
|
|
317
317
|
);
|
|
318
318
|
}
|
|
@@ -352,7 +352,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
352
352
|
);
|
|
353
353
|
} catch (error) {
|
|
354
354
|
if (error instanceof DyFM_Error) {
|
|
355
|
-
error.
|
|
355
|
+
error.logShort(
|
|
356
356
|
`Socket Subscription failed: "${this.params.name}" ` +
|
|
357
357
|
`(${this.params.port}) will disconnect now...`
|
|
358
358
|
)
|
|
@@ -386,13 +386,13 @@ export abstract class DyNTS_SocketServerService<
|
|
|
386
386
|
*/
|
|
387
387
|
if (DyNTS_global_settings.log_settings.socket_eventContent) {
|
|
388
388
|
DyFM_Log.log(
|
|
389
|
-
`--=> incoming socket(${this.params.name}) ` +
|
|
389
|
+
`--=> incoming socket (${this.params.name}) ` +
|
|
390
390
|
`event: ${DyFM_SocketEvent_Key.unsubscribe};` +
|
|
391
391
|
`\ncontent:`, issuer
|
|
392
392
|
);
|
|
393
393
|
} else {
|
|
394
394
|
DyFM_Log.log(
|
|
395
|
-
`--=> incoming socket(${this.params.name}) ` +
|
|
395
|
+
`--=> incoming socket (${this.params.name}) ` +
|
|
396
396
|
`event: ${DyFM_SocketEvent_Key.unsubscribe}`
|
|
397
397
|
);
|
|
398
398
|
}
|
|
@@ -547,7 +547,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
547
547
|
}
|
|
548
548
|
} catch (error) {
|
|
549
549
|
if (error instanceof DyFM_Error) {
|
|
550
|
-
error.
|
|
550
|
+
error.logShort(
|
|
551
551
|
`Socket Subscription failed: "${this.params?.name}" (${this.params?.port})`
|
|
552
552
|
)
|
|
553
553
|
} else if (DyNTS_global_settings.log_settings.socket_eventContent) {
|
|
@@ -636,15 +636,27 @@ export abstract class DyNTS_SocketServerService<
|
|
|
636
636
|
private async disconnectBaseTask(socket: SocketIO.Socket, issuer: string): Promise<void> {
|
|
637
637
|
try {
|
|
638
638
|
if (!(socket instanceof SocketIO.Socket)) {
|
|
639
|
-
throw new DyFM_Error({
|
|
639
|
+
/* throw new DyFM_Error({
|
|
640
640
|
...this._getDefaultErrorSettings(
|
|
641
641
|
'disconnectBaseTask',
|
|
642
|
-
new Error('Socket is not a SocketIO.Socket'),
|
|
642
|
+
new Error('Socket is not a SocketIO.Socket, type: ' + typeof socket),
|
|
643
643
|
),
|
|
644
|
-
});
|
|
644
|
+
}); */
|
|
645
|
+
DyFM_Log.error(
|
|
646
|
+
`Socket is not a SocketIO.Socket, type: ${typeof socket}`,
|
|
647
|
+
socket
|
|
648
|
+
);
|
|
645
649
|
}
|
|
646
650
|
|
|
647
|
-
await this.removeSubscription(socket, issuer)
|
|
651
|
+
await this.removeSubscription(socket, issuer).catch(error => {
|
|
652
|
+
if (error instanceof DyFM_Error) {
|
|
653
|
+
error.logShort(
|
|
654
|
+
`Remove Subscription failed: "${this.params.name}" (${this.params.port})`
|
|
655
|
+
);
|
|
656
|
+
} else {
|
|
657
|
+
DyFM_Log.error(`Remove Subscription failed: "${this.params.name}" (${this.params.port})`, error);
|
|
658
|
+
}
|
|
659
|
+
});
|
|
648
660
|
|
|
649
661
|
DyFM_Log.info(`< x > socket(${this.params.name}) disconnected (${issuer})`);
|
|
650
662
|
} catch (error) {
|
|
@@ -671,7 +683,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
671
683
|
...this._getDefaultErrorSettings(
|
|
672
684
|
'sendEventForId',
|
|
673
685
|
new Error(
|
|
674
|
-
`closing socket(${this.params.name}) does not match any in the activePresences`
|
|
686
|
+
`closing socket (${this.params.name}) does not match any in the activePresences`
|
|
675
687
|
),
|
|
676
688
|
issuer ?? 'unknown issuer'
|
|
677
689
|
),
|
|
@@ -704,7 +716,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
704
716
|
...this._getDefaultErrorSettings(
|
|
705
717
|
'sendEventForId',
|
|
706
718
|
new Error(
|
|
707
|
-
`closing socket(${this.params.name}) does not match any in the activePresences`
|
|
719
|
+
`closing socket (${this.params.name}) does not match any in the activePresences`
|
|
708
720
|
),
|
|
709
721
|
activePresence.issuerLocalId
|
|
710
722
|
),
|
|
@@ -740,7 +752,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
740
752
|
|
|
741
753
|
socket.emit(DyFM_SocketEvent_Key.unsubscribeSuccessful, 'unsubscribe was successful');
|
|
742
754
|
socket.disconnect();
|
|
743
|
-
DyFM_Log.info(`<x==> socket(${this.params.name}) unsubscription successful (${issuer})`);
|
|
755
|
+
DyFM_Log.info(`<x==> socket (${this.params.name}) unsubscription successful (${issuer})`);
|
|
744
756
|
} catch (error) {
|
|
745
757
|
throw new DyFM_Error({
|
|
746
758
|
...this._getDefaultErrorSettings(
|
|
@@ -750,7 +762,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
750
762
|
),
|
|
751
763
|
|
|
752
764
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-RS0`,
|
|
753
|
-
message: `socket(${this.params.name}) Subscription Removal failed: "${this.params?.name}"`,
|
|
765
|
+
message: `socket (${this.params.name}) Subscription Removal failed: "${this.params?.name}"`,
|
|
754
766
|
});
|
|
755
767
|
}
|
|
756
768
|
}
|
|
@@ -788,7 +800,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
788
800
|
),
|
|
789
801
|
|
|
790
802
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-IIS0`,
|
|
791
|
-
message: `socket(${this.params.name}) ID Subscription Check (${id}) failed`,
|
|
803
|
+
message: `socket (${this.params.name}) ID Subscription Check (${id}) failed`,
|
|
792
804
|
});
|
|
793
805
|
}
|
|
794
806
|
}
|
|
@@ -804,7 +816,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
804
816
|
presenceIssuerId
|
|
805
817
|
),
|
|
806
818
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-EE0`,
|
|
807
|
-
message: `socket(${this.params.name}) Error Emit (id: ${presenceIssuerId}) failed`,
|
|
819
|
+
message: `socket (${this.params.name}) Error Emit (id: ${presenceIssuerId}) failed`,
|
|
808
820
|
});
|
|
809
821
|
}
|
|
810
822
|
}
|
|
@@ -852,13 +864,13 @@ export abstract class DyNTS_SocketServerService<
|
|
|
852
864
|
|
|
853
865
|
if (DyNTS_global_settings.log_settings.socket_eventContent) {
|
|
854
866
|
DyFM_Log.success(
|
|
855
|
-
` <--= emitted socket(${this.params.name}) event: "${event}", ` +
|
|
867
|
+
` <--= emitted socket (${this.params.name}) event: "${event}", ` +
|
|
856
868
|
`\n presenceId: "${id}", sockets: ${presence.sockets.length}` +
|
|
857
869
|
`\n content:`, content
|
|
858
870
|
);
|
|
859
871
|
} else {
|
|
860
872
|
DyFM_Log.success(
|
|
861
|
-
` <--= emitted socket(${this.params.name}) event: "${event}", ` +
|
|
873
|
+
` <--= emitted socket (${this.params.name}) event: "${event}", ` +
|
|
862
874
|
`\n presenceId: ${id}, sockets: ${presence.sockets.length}`
|
|
863
875
|
);
|
|
864
876
|
}
|
|
@@ -879,7 +891,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
879
891
|
throw new DyFM_Error({
|
|
880
892
|
...this._getDefaultErrorSettings(
|
|
881
893
|
'sendEventForId',
|
|
882
|
-
new Error(`No active socket(${this.params.name}) with this specific ID: "${id}"`),
|
|
894
|
+
new Error(`No active socket (${this.params.name}) with this specific ID: "${id}"`),
|
|
883
895
|
content?.source
|
|
884
896
|
),
|
|
885
897
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-SEFI4`,
|
|
@@ -891,7 +903,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
891
903
|
...this._getDefaultErrorSettings('sendEventForId', error, content?.source),
|
|
892
904
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-SEFI5`,
|
|
893
905
|
message:
|
|
894
|
-
`Error handling of inactive sockets(${this.params.name}) failed!` +
|
|
906
|
+
`Error handling of inactive sockets (${this.params.name}) failed!` +
|
|
895
907
|
`\n(Socket Event Emit for id (${id}, ${event}) failed)`,
|
|
896
908
|
});
|
|
897
909
|
}
|
|
@@ -899,14 +911,14 @@ export abstract class DyNTS_SocketServerService<
|
|
|
899
911
|
throw new DyFM_Error({
|
|
900
912
|
...this._getDefaultErrorSettings('sendEventForId', error, content?.source),
|
|
901
913
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-SEFI0`,
|
|
902
|
-
message: `socket(${this.params.name}) Event Emit for id (${id}, ${event}) failed`,
|
|
914
|
+
message: `socket (${this.params.name}) Event Emit for id (${id}, ${event}) failed`,
|
|
903
915
|
});
|
|
904
916
|
}
|
|
905
917
|
}
|
|
906
918
|
|
|
907
|
-
broadcastEvent(event: string, content: any, issuer: string): void {
|
|
919
|
+
async broadcastEvent(event: string, content: any, issuer: string): Promise<void> {
|
|
908
920
|
try {
|
|
909
|
-
DyFM_Log.log(
|
|
921
|
+
DyFM_Log.log(`<=-== broadcasting socket (${this.params.name}) event: "${event}"`);
|
|
910
922
|
|
|
911
923
|
this.presences.forEach((presence: DyNTS_SocketPresence) => {
|
|
912
924
|
presence.emitEvent(event, content, issuer);
|
|
@@ -914,9 +926,9 @@ export abstract class DyNTS_SocketServerService<
|
|
|
914
926
|
} catch (error) {
|
|
915
927
|
if (DyNTS_global_settings.log_settings.detailedErrors) {
|
|
916
928
|
if (error instanceof DyFM_Error) {
|
|
917
|
-
error.logSimple(`socket(${this.params.name}) Event Broadcast (${event}) failed`);
|
|
929
|
+
error.logSimple(`socket (${this.params.name}) Event Broadcast (${event}) failed`);
|
|
918
930
|
} else {
|
|
919
|
-
DyFM_Log.error(`socket(${this.params.name}) Event Broadcast (${event}) failed`, error);
|
|
931
|
+
DyFM_Log.error(`socket (${this.params.name}) Event Broadcast (${event}) failed`, error);
|
|
920
932
|
}
|
|
921
933
|
}
|
|
922
934
|
|
|
@@ -924,7 +936,7 @@ export abstract class DyNTS_SocketServerService<
|
|
|
924
936
|
...this._getDefaultErrorSettings('broadcastEvent', error),
|
|
925
937
|
|
|
926
938
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-SSS-BE0`,
|
|
927
|
-
message: `socket(${this.params.name}) Event Broadcast (${event}) failed`,
|
|
939
|
+
message: `socket (${this.params.name}) Event Broadcast (${event}) failed`,
|
|
928
940
|
});
|
|
929
941
|
}
|
|
930
942
|
}
|
|
@@ -57,9 +57,9 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
|
|
|
57
57
|
dataDBService: DyNTS_DBService<T>;
|
|
58
58
|
haveArchiveDataService: boolean;
|
|
59
59
|
|
|
60
|
-
data: T;
|
|
60
|
+
/* data: T; */
|
|
61
61
|
dataList: T[] = [];
|
|
62
|
-
issuer: string;
|
|
62
|
+
/* issuer: string; */
|
|
63
63
|
|
|
64
64
|
readonly depSettings: {
|
|
65
65
|
key: string;
|
|
@@ -73,7 +73,7 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
|
|
|
73
73
|
depKeyIsRequired: boolean[] = []; */
|
|
74
74
|
private depDataDBService: DyNTS_DBService<any>;
|
|
75
75
|
|
|
76
|
-
dataParams: DyFM_DataModel_Params<T>;
|
|
76
|
+
/* dataParams: DyFM_DataModel_Params<T>; */
|
|
77
77
|
|
|
78
78
|
readonly defaultErrorUserMsg: string =
|
|
79
79
|
`We encountered an unhandled Data Service Error, ` +
|
|
@@ -86,25 +86,25 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
|
|
|
86
86
|
/**
|
|
87
87
|
* Initial data, this will be used by functions on default
|
|
88
88
|
*/
|
|
89
|
-
data: T,
|
|
89
|
+
public data: T,
|
|
90
90
|
/**
|
|
91
91
|
* DB data prams will be used to connect to usable dbService on GlobalService
|
|
92
92
|
*/
|
|
93
93
|
/* dataParams: DyFM_DataModel_Params, */
|
|
94
|
-
dataParams: DyFM_Data_Params<T>,
|
|
94
|
+
public dataParams: DyFM_Data_Params<T>,
|
|
95
95
|
/**
|
|
96
96
|
* Initial set for issuer to be able to follow the issuer's activity
|
|
97
97
|
*/
|
|
98
|
-
issuer: string
|
|
98
|
+
public issuer: string
|
|
99
99
|
) {
|
|
100
100
|
try {
|
|
101
101
|
this.serviceName = this.constructor?.name;
|
|
102
|
-
this.dataDBService = DyNTS_GlobalService.getDBService<T>(dataParams);
|
|
103
|
-
this.data = data;
|
|
104
|
-
this.dataParams = dataParams;
|
|
105
|
-
this.haveArchiveDataService = dataParams.addArchive;
|
|
102
|
+
this.dataDBService = DyNTS_GlobalService.getDBService<T>(this.dataParams);
|
|
103
|
+
/* this.data = data; */
|
|
104
|
+
/* this.dataParams = dataParams; */
|
|
105
|
+
this.haveArchiveDataService = this.dataParams.addArchive;
|
|
106
106
|
this.lookForDependencyDataSettings();
|
|
107
|
-
this.issuer = issuer;
|
|
107
|
+
/* this.issuer = issuer; */
|
|
108
108
|
/* DyNTS_GlobalService.addDataService(this); */
|
|
109
109
|
} catch (error) {
|
|
110
110
|
throw new DyFM_Error({
|
|
@@ -112,15 +112,15 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
|
|
|
112
112
|
|
|
113
113
|
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-DS0-C00`,
|
|
114
114
|
message:
|
|
115
|
-
`The dataService construction failed for "${dataParams?.dataName}". ` +
|
|
115
|
+
`The dataService construction failed for "${this.dataParams?.dataName}". ` +
|
|
116
116
|
`at "${this.serviceName}" (${this.constructor.name})` +
|
|
117
117
|
`\nMaybe you forgot to add the dbService to the GlobalService?`,
|
|
118
118
|
level: DyFM_ErrorLevel.critical,
|
|
119
|
-
});
|
|
119
|
+
});
|
|
120
120
|
/* DyFM_Log.error(
|
|
121
121
|
`\nDyNTS_DataService ERROR: ` +
|
|
122
122
|
`\nThe dataService construction failed for ` +
|
|
123
|
-
`${dataParams?.dataName}. ${this.serviceName} (${this.constructor.name})` +
|
|
123
|
+
`${this.dataParams?.dataName}. ${this.serviceName} (${this.constructor.name})` +
|
|
124
124
|
`\nMaybe you forgot to add the dbService to the GlobalService?` +
|
|
125
125
|
`\n\n`,
|
|
126
126
|
new Error()
|
|
@@ -294,13 +294,17 @@ export abstract class DyNTS_App extends DyNTS_SingletonService {
|
|
|
294
294
|
process.on(
|
|
295
295
|
'unhandledRejection',
|
|
296
296
|
(reason_theError: object, p_passWhatIsThis_maybeThePromise: any): void => {
|
|
297
|
-
|
|
298
|
-
'Unhandled Rejection
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
297
|
+
if (reason_theError instanceof DyFM_Error) {
|
|
298
|
+
reason_theError.logSimple('Unhandled Rejection');
|
|
299
|
+
} else {
|
|
300
|
+
DyFM_Log.H_error(
|
|
301
|
+
'Unhandled Rejection:', (p_passWhatIsThis_maybeThePromise as Promise<any>)?.toString(),
|
|
302
|
+
'\n Rejection reason:', (reason_theError as Error)?.stack?.split('at')?.[0],
|
|
303
|
+
/* '\n ErrorCode:', (reason as any)?.code, */
|
|
304
|
+
'\n\n Stack:',
|
|
305
|
+
(reason_theError as Error)?.stack?.replaceAll?.('\n at', '\n at'),
|
|
306
|
+
);
|
|
307
|
+
}
|
|
304
308
|
|
|
305
309
|
try {
|
|
306
310
|
DyNTS_GlobalService.globalErrorHandler?.(
|
|
@@ -813,9 +817,9 @@ export abstract class DyNTS_App extends DyNTS_SingletonService {
|
|
|
813
817
|
try {
|
|
814
818
|
this.mongoose.connect(
|
|
815
819
|
this._params.dbUri,
|
|
820
|
+
this._params.dbOptions
|
|
816
821
|
/* {
|
|
817
|
-
|
|
818
|
-
useUnifiedTopology: true,
|
|
822
|
+
directConnection: true,
|
|
819
823
|
} */
|
|
820
824
|
);
|
|
821
825
|
} catch (error) {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum DyNTS_OpenAIModel {
|
|
2
|
-
gpt4o = "gpt-4o",
|
|
3
|
-
gpt4o_20240806 = "gpt-4o-2024-08-06",
|
|
4
|
-
gpt4o_20240513 = "gpt-4o-2024-05-13",
|
|
5
|
-
gpt4o_mini = "gpt-4o-mini",
|
|
6
|
-
gpt4o_mini20240718 = "gpt-4o-mini-2024-07-18",
|
|
7
|
-
textEmbedding_3Small = "text-embedding-3-small",
|
|
8
|
-
textEmbedding_3Large = "text-embedding-3-large",
|
|
9
|
-
textEmbedding_ada002 = "text-embedding-ada-002"
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=open-ai-model.enum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-ai-model.enum.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_enums/open-ai-model.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,iBAAiB;IAW3B,KAAK,WAAW;IAEhB,cAAc,sBAAsB;IAEpC,cAAc,sBAAsB;IAYpC,UAAU,gBAAgB;IAE1B,kBAAkB,2BAA2B;IAwB7C,oBAAoB,2BAA2B;IAE/C,oBAAoB,2BAA2B;IAE/C,oBAAoB,2BAA2B;CAsEhD"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DyNTS_OpenAIModel = void 0;
|
|
4
|
-
var DyNTS_OpenAIModel;
|
|
5
|
-
(function (DyNTS_OpenAIModel) {
|
|
6
|
-
// GPT-3.5
|
|
7
|
-
/* gpt35_turbo = 'gpt-3.5-turbo',
|
|
8
|
-
gpt35_turbo0125 = 'gpt-3.5-turbo-0125',
|
|
9
|
-
gpt35_turbo1106 = 'gpt-3.5-turbo-1106',
|
|
10
|
-
gpt35_turbo16k = 'gpt-3.5-turbo-16k',
|
|
11
|
-
gpt35_turboInstruct = 'gpt-3.5-turbo-instruct',
|
|
12
|
-
gpt35_turboInstruct0914 = 'gpt-3.5-turbo-instruct-0914', */
|
|
13
|
-
// GPT-4
|
|
14
|
-
// gpt-4
|
|
15
|
-
DyNTS_OpenAIModel["gpt4o"] = "gpt-4o";
|
|
16
|
-
// gpt-4o-2024-08-06
|
|
17
|
-
DyNTS_OpenAIModel["gpt4o_20240806"] = "gpt-4o-2024-08-06";
|
|
18
|
-
// gpt-4o-2024-05-13
|
|
19
|
-
DyNTS_OpenAIModel["gpt4o_20240513"] = "gpt-4o-2024-05-13";
|
|
20
|
-
/* gpt4 = 'gpt-4',
|
|
21
|
-
gpt4_0613 = 'gpt-4-0613',
|
|
22
|
-
gpt4_0125Preview = 'gpt-4-0125-preview',
|
|
23
|
-
gpt4_1106Preview = 'gpt-4-1106-preview',
|
|
24
|
-
gpt4_turbo = 'gpt-4-turbo',
|
|
25
|
-
gpt4_turbo20240409 = 'gpt-4-turbo-2024-04-09',
|
|
26
|
-
gpt4_turboPreview = 'gpt-4-turbo-preview', */
|
|
27
|
-
// GPT-Mini
|
|
28
|
-
// gpt-4o-mini
|
|
29
|
-
DyNTS_OpenAIModel["gpt4o_mini"] = "gpt-4o-mini";
|
|
30
|
-
// gpt-4o-mini-2024-07-18
|
|
31
|
-
DyNTS_OpenAIModel["gpt4o_mini20240718"] = "gpt-4o-mini-2024-07-18";
|
|
32
|
-
// GPT-4o
|
|
33
|
-
/* gpt4o = 'gpt-4o',
|
|
34
|
-
gpt4o_20240513 = 'gpt-4o-2024-05-13',
|
|
35
|
-
gpt4o_mini = 'gpt-4o-mini',
|
|
36
|
-
gpt4o_mini20240718 = 'gpt-4o-mini-2024-07-18', */
|
|
37
|
-
// DALL·E
|
|
38
|
-
/* dallE_2 = 'dall-e-2',
|
|
39
|
-
dallE_2_HD = 'dall-e-2',
|
|
40
|
-
dallE_3 = 'dall-e-3',
|
|
41
|
-
dallE_3_HD = 'dall-e-3', */
|
|
42
|
-
// Text-to-Speech (TTS)
|
|
43
|
-
/* tts1 = 'tts-1',
|
|
44
|
-
tts1_1106 = 'tts-1-1106',
|
|
45
|
-
tts1_HD = 'tts-1-hd',
|
|
46
|
-
tts1_HD_1106 = 'tts-1-hd-1106',
|
|
47
|
-
whisper_1 = 'whisper-1', */
|
|
48
|
-
// Text Embeddings
|
|
49
|
-
// text-embedding-3-small
|
|
50
|
-
DyNTS_OpenAIModel["textEmbedding_3Small"] = "text-embedding-3-small";
|
|
51
|
-
// text-embedding-3-large
|
|
52
|
-
DyNTS_OpenAIModel["textEmbedding_3Large"] = "text-embedding-3-large";
|
|
53
|
-
// text-embedding-ada-002
|
|
54
|
-
DyNTS_OpenAIModel["textEmbedding_ada002"] = "text-embedding-ada-002";
|
|
55
|
-
/* textEmbedding_ada002 = 'text-embedding-ada-002',
|
|
56
|
-
textEmbedding_3Small = 'text-embedding-3-small',
|
|
57
|
-
textEmbedding_3Large = 'text-embedding-3-large', */
|
|
58
|
-
// Moderation Models
|
|
59
|
-
/* textModeration_007 = 'text-moderation-007',
|
|
60
|
-
textModeration_latest = 'text-moderation-latest',
|
|
61
|
-
textModeration_stable = 'text-moderation-stable', */
|
|
62
|
-
/* davinci002 = 'davinci-002', */
|
|
63
|
-
/* // GPT-3.5
|
|
64
|
-
gpt35_turbo = 'gpt-3.5-turbo',
|
|
65
|
-
gpt35_turbo0125 = 'gpt-3.5-turbo-0125',
|
|
66
|
-
gpt35_turbo1106 = 'gpt-3.5-turbo-1106',
|
|
67
|
-
gpt35_turbo16k = 'gpt-3.5-turbo-16k',
|
|
68
|
-
gpt35_turboInstruct = 'gpt-3.5-turbo-instruct',
|
|
69
|
-
gpt35_turboInstruct0914 = 'gpt-3.5-turbo-instruct-0914',
|
|
70
|
-
|
|
71
|
-
// GPT-4
|
|
72
|
-
gpt4 = 'gpt-4',
|
|
73
|
-
gpt4_0613 = 'gpt-4-0613',
|
|
74
|
-
gpt4_0125Preview = 'gpt-4-0125-preview',
|
|
75
|
-
gpt4_1106Preview = 'gpt-4-1106-preview',
|
|
76
|
-
gpt4_turbo = 'gpt-4-turbo',
|
|
77
|
-
gpt4_turbo20240409 = 'gpt-4-turbo-2024-04-09',
|
|
78
|
-
gpt4_turboPreview = 'gpt-4-turbo-preview',
|
|
79
|
-
|
|
80
|
-
// GPT-4o
|
|
81
|
-
gpt4o = 'gpt-4o',
|
|
82
|
-
gpt4o_20240513 = 'gpt-4o-2024-05-13',
|
|
83
|
-
gpt4o_mini = 'gpt-4o-mini',
|
|
84
|
-
gpt4o_mini20240718 = 'gpt-4o-mini-2024-07-18',
|
|
85
|
-
|
|
86
|
-
// DALL·E
|
|
87
|
-
dallE_2 = 'dall-e-2',
|
|
88
|
-
dallE_3 = 'dall-e-3',
|
|
89
|
-
|
|
90
|
-
// Text-to-Speech (TTS)
|
|
91
|
-
tts1 = 'tts-1',
|
|
92
|
-
tts1_1106 = 'tts-1-1106',
|
|
93
|
-
tts1_HD = 'tts-1-hd',
|
|
94
|
-
tts1_HD_1106 = 'tts-1-hd-1106',
|
|
95
|
-
whisper_1 = 'whisper-1',
|
|
96
|
-
|
|
97
|
-
// Text Embeddings
|
|
98
|
-
textEmbedding_ada002 = 'text-embedding-ada-002',
|
|
99
|
-
textEmbedding_3Small = 'text-embedding-3-small',
|
|
100
|
-
textEmbedding_3Large = 'text-embedding-3-large',
|
|
101
|
-
|
|
102
|
-
// Moderation Models
|
|
103
|
-
textModeration_007 = 'text-moderation-007',
|
|
104
|
-
textModeration_latest = 'text-moderation-latest',
|
|
105
|
-
textModeration_stable = 'text-moderation-stable',
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
davinci002 = 'davinci-002', */
|
|
109
|
-
})(DyNTS_OpenAIModel || (exports.DyNTS_OpenAIModel = DyNTS_OpenAIModel = {}));
|
|
110
|
-
//# sourceMappingURL=open-ai-model.enum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-ai-model.enum.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_enums/open-ai-model.enum.ts"],"names":[],"mappings":";;;AAKA,IAAY,iBA+HX;AA/HD,WAAY,iBAAiB;IAC3B,UAAU;IACV;;;;;+DAK2D;IAE3D,QAAQ;IACR,QAAQ;IACR,qCAAgB,CAAA;IAChB,oBAAoB;IACpB,yDAAoC,CAAA;IACpC,oBAAoB;IACpB,yDAAoC,CAAA;IAEpC;;;;;;iDAM6C;IAE7C,WAAW;IACX,cAAc;IACd,+CAA0B,CAAA;IAC1B,yBAAyB;IACzB,kEAA6C,CAAA;IAG7C,SAAS;IACT;;;qDAGiD;IAEjD,SAAS;IACT;;;+BAG2B;IAE3B,uBAAuB;IACvB;;;;+BAI2B;IAE3B,kBAAkB;IAClB,yBAAyB;IACzB,oEAA+C,CAAA;IAC/C,yBAAyB;IACzB,oEAA+C,CAAA;IAC/C,yBAAyB;IACzB,oEAA+C,CAAA;IAE/C;;uDAEmD;IAEnD,sBAAsB;IACtB;;wDAEoD;IAGpD,iCAAiC;IAYjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCA6C8B;AAChC,CAAC,EA/HW,iBAAiB,iCAAjB,iBAAiB,QA+H5B"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { DyNTS_OpenAIModel } from '../_enums/open-ai-model.enum';
|
|
2
|
-
export declare class DyNTS_GPTCall_Settings {
|
|
3
|
-
systemPrompt?: string;
|
|
4
|
-
useModel?: DyNTS_OpenAIModel | string;
|
|
5
|
-
gptProject?: string;
|
|
6
|
-
debugLog?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* This parameter controls the randomness and creativity of the generated output.
|
|
9
|
-
*
|
|
10
|
-
* Lower values (e.g., 0.2) produce more focused, predictable results,
|
|
11
|
-
* while higher values (e.g., 0.8) introduce more variation and unexpected outputs,
|
|
12
|
-
* making the model more creative and exploratory.
|
|
13
|
-
*
|
|
14
|
-
* Adjust this setting to balance between creativity and consistency.
|
|
15
|
-
*/
|
|
16
|
-
temperature?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Defines the upper limit of tokens (words or parts of words)
|
|
19
|
-
* the model can generate in a single response.
|
|
20
|
-
*
|
|
21
|
-
* The total token count includes both the input (prompt) and the output (response).
|
|
22
|
-
*
|
|
23
|
-
* You can allocate up to 4096 tokens per request, but be mindful of prompt length,
|
|
24
|
-
* as it affects how many tokens remain for the response.
|
|
25
|
-
*/
|
|
26
|
-
maxTokens?: number;
|
|
27
|
-
/**
|
|
28
|
-
* This parameter adjusts the diversity of the output using nucleus sampling,
|
|
29
|
-
* where the model considers tokens based on cumulative probability.
|
|
30
|
-
*
|
|
31
|
-
* A value of 0.5 ensures that only the most likely half of all possible tokens
|
|
32
|
-
* are considered, while increasing the value (up to 1)
|
|
33
|
-
* allows for a broader range of token options, leading to more varied responses.
|
|
34
|
-
*/
|
|
35
|
-
topP?: number;
|
|
36
|
-
/**
|
|
37
|
-
* This setting penalizes tokens that have already appeared frequently in the generated text,
|
|
38
|
-
* discouraging repetition and encouraging the model to introduce new content.
|
|
39
|
-
*
|
|
40
|
-
* Higher values result in less repetition, making the output more diverse.
|
|
41
|
-
*/
|
|
42
|
-
frequencyPenalty?: number;
|
|
43
|
-
/**
|
|
44
|
-
* This parameter influences the model by penalizing tokens based on
|
|
45
|
-
* their presence in the text so far.
|
|
46
|
-
*
|
|
47
|
-
* It encourages the introduction of new topics or ideas by reducing the likelihood of
|
|
48
|
-
* generating tokens that have already appeared,
|
|
49
|
-
* helping to keep the conversation or text more varied and engaging.
|
|
50
|
-
*/
|
|
51
|
-
presencePenalty?: number;
|
|
52
|
-
constructor(set?: DyNTS_GPTCall_Settings);
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=gpt-call-settings.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gpt-call-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_models/gpt-call-settings.interface.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,qBAAa,sBAAsB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAM;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAA2B;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAO;IAC3B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAQ;IAC1B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAQ;IACrB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAK;IAC9B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAK;gBAO3B,GAAG,CAAC,EAAE,sBAAsB;CAM/B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DyNTS_GPTCall_Settings = void 0;
|
|
4
|
-
const open_ai_model_enum_1 = require("../_enums/open-ai-model.enum");
|
|
5
|
-
class DyNTS_GPTCall_Settings {
|
|
6
|
-
systemPrompt = '';
|
|
7
|
-
useModel = open_ai_model_enum_1.DyNTS_OpenAIModel.gpt4o;
|
|
8
|
-
gptProject;
|
|
9
|
-
debugLog;
|
|
10
|
-
/**
|
|
11
|
-
* This parameter controls the randomness and creativity of the generated output.
|
|
12
|
-
*
|
|
13
|
-
* Lower values (e.g., 0.2) produce more focused, predictable results,
|
|
14
|
-
* while higher values (e.g., 0.8) introduce more variation and unexpected outputs,
|
|
15
|
-
* making the model more creative and exploratory.
|
|
16
|
-
*
|
|
17
|
-
* Adjust this setting to balance between creativity and consistency.
|
|
18
|
-
*/
|
|
19
|
-
temperature = 0.5;
|
|
20
|
-
/**
|
|
21
|
-
* Defines the upper limit of tokens (words or parts of words)
|
|
22
|
-
* the model can generate in a single response.
|
|
23
|
-
*
|
|
24
|
-
* The total token count includes both the input (prompt) and the output (response).
|
|
25
|
-
*
|
|
26
|
-
* You can allocate up to 4096 tokens per request, but be mindful of prompt length,
|
|
27
|
-
* as it affects how many tokens remain for the response.
|
|
28
|
-
*/
|
|
29
|
-
maxTokens = 2000;
|
|
30
|
-
/**
|
|
31
|
-
* This parameter adjusts the diversity of the output using nucleus sampling,
|
|
32
|
-
* where the model considers tokens based on cumulative probability.
|
|
33
|
-
*
|
|
34
|
-
* A value of 0.5 ensures that only the most likely half of all possible tokens
|
|
35
|
-
* are considered, while increasing the value (up to 1)
|
|
36
|
-
* allows for a broader range of token options, leading to more varied responses.
|
|
37
|
-
*/
|
|
38
|
-
topP = 0.75;
|
|
39
|
-
/**
|
|
40
|
-
* This setting penalizes tokens that have already appeared frequently in the generated text,
|
|
41
|
-
* discouraging repetition and encouraging the model to introduce new content.
|
|
42
|
-
*
|
|
43
|
-
* Higher values result in less repetition, making the output more diverse.
|
|
44
|
-
*/
|
|
45
|
-
frequencyPenalty = 0;
|
|
46
|
-
/**
|
|
47
|
-
* This parameter influences the model by penalizing tokens based on
|
|
48
|
-
* their presence in the text so far.
|
|
49
|
-
*
|
|
50
|
-
* It encourages the introduction of new topics or ideas by reducing the likelihood of
|
|
51
|
-
* generating tokens that have already appeared,
|
|
52
|
-
* helping to keep the conversation or text more varied and engaging.
|
|
53
|
-
*/
|
|
54
|
-
presencePenalty = 0;
|
|
55
|
-
/* organizationId?: string;
|
|
56
|
-
apiKey?: string;
|
|
57
|
-
project?: string; */
|
|
58
|
-
constructor(set) {
|
|
59
|
-
if (set) {
|
|
60
|
-
Object.assign(this, set);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.DyNTS_GPTCall_Settings = DyNTS_GPTCall_Settings;
|
|
65
|
-
//# sourceMappingURL=gpt-call-settings.interface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gpt-call-settings.interface.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_models/gpt-call-settings.interface.ts"],"names":[],"mappings":";;;AAGA,qEAAiE;AAEjE,MAAa,sBAAsB;IACjC,YAAY,GAAY,EAAE,CAAC;IAC3B,QAAQ,GAAgC,sCAAiB,CAAC,KAAK,CAAC;IAChE,UAAU,CAAU;IACpB,QAAQ,CAAW;IAEnB;;;;;;;;OAQG;IACH,WAAW,GAAY,GAAG,CAAC;IAC3B;;;;;;;;OAQG;IACH,SAAS,GAAY,IAAI,CAAC;IAC1B;;;;;;;OAOG;IACH,IAAI,GAAY,IAAI,CAAC;IACrB;;;;;OAKG;IACH,gBAAgB,GAAY,CAAC,CAAC;IAC9B;;;;;;;OAOG;IACH,eAAe,GAAY,CAAC,CAAC;IAE7B;;wBAEoB;IAEpB,YACE,GAA4B;QAE5B,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AA/DD,wDA+DC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-ai-api-env-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_models/open-ai-api-env-settings.interface.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-ai-api-env-settings.interface.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_models/open-ai-api-env-settings.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ClientOptions } from 'openai';
|
|
2
|
-
import { DyNTS_GPTCall_Settings } from './gpt-call-settings.interface';
|
|
3
|
-
export declare class DyNTS_OpenAI_Settings {
|
|
4
|
-
/**
|
|
5
|
-
* OpenAI API configuration.
|
|
6
|
-
*
|
|
7
|
-
* apiKey, organization and project are required.
|
|
8
|
-
* they are defaults to
|
|
9
|
-
* process.env['OPENAI_API_KEY'],
|
|
10
|
-
* process.env['OPENAI_ORG_ID'] and
|
|
11
|
-
* process.env['OPENAI_PROJECT_ID']
|
|
12
|
-
*/
|
|
13
|
-
openAIConfig: ClientOptions;
|
|
14
|
-
defaultSettings: DyNTS_GPTCall_Settings;
|
|
15
|
-
constructor(set: DyNTS_OpenAI_Settings);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=open-ai-settings.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-ai-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_models/open-ai-settings.interface.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,qBAAa,qBAAqB;IAChC;;;;;;;;OAQG;IACH,YAAY,EAAE,aAAa,CAAC;IAI5B,eAAe,EAAE,sBAAsB,CAAC;gBAGtC,GAAG,EAAE,qBAAqB;CAM7B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DyNTS_OpenAI_Settings = void 0;
|
|
4
|
-
class DyNTS_OpenAI_Settings {
|
|
5
|
-
/**
|
|
6
|
-
* OpenAI API configuration.
|
|
7
|
-
*
|
|
8
|
-
* apiKey, organization and project are required.
|
|
9
|
-
* they are defaults to
|
|
10
|
-
* process.env['OPENAI_API_KEY'],
|
|
11
|
-
* process.env['OPENAI_ORG_ID'] and
|
|
12
|
-
* process.env['OPENAI_PROJECT_ID']
|
|
13
|
-
*/
|
|
14
|
-
openAIConfig;
|
|
15
|
-
/* systemPrompt?: string;
|
|
16
|
-
useModel?: string | DyNTS_OpenAIModel = DyNTS_OpenAIModel.gpt4o; */
|
|
17
|
-
defaultSettings;
|
|
18
|
-
constructor(set) {
|
|
19
|
-
if (set) {
|
|
20
|
-
Object.assign(this, set);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.DyNTS_OpenAI_Settings = DyNTS_OpenAI_Settings;
|
|
25
|
-
//# sourceMappingURL=open-ai-settings.interface.js.map
|