@dataclouder/conversation-card-nestjs 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/dist/{libs/conversation-cards/src/ai-models.service.d.ts → ai-models.service.d.ts} +1 -0
  2. package/dist/ai-models.service.d.ts.map +1 -0
  3. package/dist/ai-models.service.js +71 -173
  4. package/dist/ai-models.service.js.map +1 -0
  5. package/dist/{libs/conversation-cards/src/clases → clases}/conversation.interface.d.ts +1 -0
  6. package/dist/clases/conversation.interface.d.ts.map +1 -0
  7. package/dist/clases/conversation.interface.js +9 -20
  8. package/dist/clases/conversation.interface.js.map +1 -0
  9. package/dist/{libs/conversation-cards/src/conversation-ai.controller.d.ts → conversation-ai.controller.d.ts} +2 -6
  10. package/dist/conversation-ai.controller.d.ts.map +1 -0
  11. package/dist/conversation-ai.controller.js +117 -209
  12. package/dist/conversation-ai.controller.js.map +1 -0
  13. package/dist/conversation-cards.module.d.ts +3 -0
  14. package/dist/conversation-cards.module.d.ts.map +1 -0
  15. package/dist/conversation-cards.module.js +22 -69
  16. package/dist/conversation-cards.module.js.map +1 -0
  17. package/dist/{libs/conversation-cards/src/conversation.controller.d.ts → conversation.controller.d.ts} +1 -0
  18. package/dist/conversation.controller.d.ts.map +1 -0
  19. package/dist/conversation.controller.js +27 -106
  20. package/dist/conversation.controller.js.map +1 -0
  21. package/dist/{libs/conversation-cards/src/dto → dto}/create-conversation.dto.d.ts +1 -0
  22. package/dist/dto/create-conversation.dto.d.ts.map +1 -0
  23. package/dist/dto/create-conversation.dto.js +35 -78
  24. package/dist/dto/create-conversation.dto.js.map +1 -0
  25. package/dist/{libs/conversation-cards/src/entities → entities}/conversation.entity.d.ts +1 -0
  26. package/dist/entities/conversation.entity.d.ts.map +1 -0
  27. package/dist/entities/conversation.entity.js +84 -145
  28. package/dist/entities/conversation.entity.js.map +1 -0
  29. package/dist/{libs/conversation-cards/src/index.d.ts → index.d.ts} +1 -1
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -0
  33. package/dist/services/audio-transcription.service.d.ts +1 -0
  34. package/dist/services/audio-transcription.service.d.ts.map +1 -0
  35. package/dist/services/audio-transcription.service.js +1 -27
  36. package/dist/services/audio-transcription.service.js.map +1 -0
  37. package/dist/{libs/conversation-cards/src/services → services}/conversation-ai.service.d.ts +1 -0
  38. package/dist/services/conversation-ai.service.d.ts.map +1 -0
  39. package/dist/services/conversation-ai.service.js +50 -143
  40. package/dist/services/conversation-ai.service.js.map +1 -0
  41. package/dist/services/conversation-cards.service.d.ts +3 -0
  42. package/dist/services/conversation-cards.service.d.ts.map +1 -0
  43. package/dist/services/conversation-cards.service.js +12 -58
  44. package/dist/services/conversation-cards.service.js.map +1 -0
  45. package/dist/tts/tts-service.d.ts +1 -0
  46. package/dist/tts/tts-service.d.ts.map +1 -0
  47. package/dist/tts/tts-service.js +1 -250
  48. package/dist/tts/tts-service.js.map +1 -0
  49. package/dist/{libs/conversation-cards/src/tts → tts}/tts.classes.d.ts +1 -0
  50. package/dist/tts/tts.classes.d.ts.map +1 -0
  51. package/dist/tts/tts.classes.js +3 -13
  52. package/dist/tts/tts.classes.js.map +1 -0
  53. package/dist/{libs/conversation-cards/src/tts → tts}/voices.d.ts +1 -0
  54. package/dist/tts/voices.d.ts.map +1 -0
  55. package/dist/tts/voices.js +1 -10
  56. package/dist/tts/voices.js.map +1 -0
  57. package/package.json +1 -1
  58. package/dist/conversation-ai.module.js +0 -74
  59. package/dist/libs/conversation-cards/src/ai-models.service.js +0 -82
  60. package/dist/libs/conversation-cards/src/ai-models.service.js.map +0 -1
  61. package/dist/libs/conversation-cards/src/clases/conversation.interface.js +0 -40
  62. package/dist/libs/conversation-cards/src/clases/conversation.interface.js.map +0 -1
  63. package/dist/libs/conversation-cards/src/conversation-ai.controller.js +0 -153
  64. package/dist/libs/conversation-cards/src/conversation-ai.controller.js.map +0 -1
  65. package/dist/libs/conversation-cards/src/conversation-ai.module.d.ts +0 -2
  66. package/dist/libs/conversation-cards/src/conversation-ai.module.js +0 -28
  67. package/dist/libs/conversation-cards/src/conversation-ai.module.js.map +0 -1
  68. package/dist/libs/conversation-cards/src/conversation-cards.module.d.ts +0 -2
  69. package/dist/libs/conversation-cards/src/conversation-cards.module.js +0 -28
  70. package/dist/libs/conversation-cards/src/conversation-cards.module.js.map +0 -1
  71. package/dist/libs/conversation-cards/src/conversation.controller.js +0 -33
  72. package/dist/libs/conversation-cards/src/conversation.controller.js.map +0 -1
  73. package/dist/libs/conversation-cards/src/dto/create-conversation.dto.js +0 -42
  74. package/dist/libs/conversation-cards/src/dto/create-conversation.dto.js.map +0 -1
  75. package/dist/libs/conversation-cards/src/entities/conversation.entity.js +0 -97
  76. package/dist/libs/conversation-cards/src/entities/conversation.entity.js.map +0 -1
  77. package/dist/libs/conversation-cards/src/index.js +0 -24
  78. package/dist/libs/conversation-cards/src/index.js.map +0 -1
  79. package/dist/libs/conversation-cards/src/services/audio-transcription.service.d.ts +0 -0
  80. package/dist/libs/conversation-cards/src/services/audio-transcription.service.js +0 -1
  81. package/dist/libs/conversation-cards/src/services/audio-transcription.service.js.map +0 -1
  82. package/dist/libs/conversation-cards/src/services/conversation-ai.service.js +0 -58
  83. package/dist/libs/conversation-cards/src/services/conversation-ai.service.js.map +0 -1
  84. package/dist/libs/conversation-cards/src/services/conversation-cards.service.d.ts +0 -2
  85. package/dist/libs/conversation-cards/src/services/conversation-cards.service.js +0 -17
  86. package/dist/libs/conversation-cards/src/services/conversation-cards.service.js.map +0 -1
  87. package/dist/libs/conversation-cards/src/tts/tts-service.d.ts +0 -20
  88. package/dist/libs/conversation-cards/src/tts/tts-service.js +0 -124
  89. package/dist/libs/conversation-cards/src/tts/tts-service.js.map +0 -1
  90. package/dist/libs/conversation-cards/src/tts/tts.classes.js +0 -200
  91. package/dist/libs/conversation-cards/src/tts/tts.classes.js.map +0 -1
  92. package/dist/libs/conversation-cards/src/tts/voices.js +0 -208
  93. package/dist/libs/conversation-cards/src/tts/voices.js.map +0 -1
  94. package/dist/src/common/app-exception.d.ts +0 -28
  95. package/dist/src/common/app-exception.js +0 -28
  96. package/dist/src/common/app-exception.js.map +0 -1
  97. package/dist/tsconfig.lib.tsbuildinfo +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tts.classes.js","sourceRoot":"","sources":["../../src/tts/tts.classes.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,mCAAqB,CAAA;AACvB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAED,IAAY,SAEX;AAFD,WAAY,SAAS;IACnB,sBAAS,CAAA;AACX,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB;AAMY,QAAA,oBAAoB,GAAkB;IAEjD,EAAE,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE;CAEzC,CAAC;AAEW,QAAA,kBAAkB,GAAkB;IAC/C;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,mCAAmC;QACzC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,kCAAkC;QACxC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IAED;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,kCAAkC;QACxC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,oCAAoC;QAC1C,EAAE,EAAE,iBAAiB;QACrB,MAAM,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;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,kCAAkC;QACxC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,mCAAmC;QACzC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,mCAAmC;QACzC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;CACF,CAAC;AAkBF,MAAa,MAAM;CAOlB;AAPD,wBAOC"}
@@ -1,3 +1,4 @@
1
1
  import { VoiceOption } from './tts.classes';
2
2
  export declare const GoogleVoiceHQOptions: VoiceOption[];
3
3
  export declare const voices: VoiceOption[];
4
+ //# sourceMappingURL=voices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../../src/tts/voices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAO,MAAM,oBAAoB,EAAE,WAAW,EA8B7C,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,WAAW,EAsL/B,CAAC"}
@@ -2,19 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.voices = exports.GoogleVoiceHQOptions = void 0;
4
4
  exports.GoogleVoiceHQOptions = [
5
- // French
6
5
  { provider: 'google', name: 'Man fr-FR-Studio-D', id: 'fr-FR-Studio-D', gender: 'male', lang: 'fr-FR' },
7
6
  { provider: 'google', name: 'Woman fr-FR-Studio-A', id: 'fr-FR-Studio-A', gender: 'female', lang: 'fr-FR' },
8
- // Italian
9
7
  { provider: 'google', name: 'Woman it-IT-Neural2-A', id: 'it-IT-Neural2-A', gender: 'female', lang: 'it-IT' },
10
8
  { provider: 'google', name: 'Man it-IT-Neural2-C', id: 'it-IT-Neural2-C', gender: 'male', lang: 'it-IT' },
11
- // Portuguese
12
9
  { provider: 'google', name: 'Woman pt-BR-Neural2-C', id: 'pt-BR-Neural2-C', gender: 'female', lang: 'pt-BR' },
13
10
  { provider: 'google', name: 'Man pt-BR-Neural2-B', id: 'pt-BR-Neural2-B', gender: 'male', lang: 'pt-BR' },
14
- // Spanish
15
11
  { provider: 'google', name: 'Man es-US-Studio-B', id: 'es-US-Studio-B', gender: 'male', lang: 'es-US' },
16
12
  { provider: 'google', name: 'Woman es-US-Neural2-A', id: 'es-US-Neural2-A', gender: 'male', lang: 'es-US' },
17
- // English
18
13
  {
19
14
  provider: 'google',
20
15
  name: 'Woman Studio O',
@@ -33,7 +28,6 @@ exports.GoogleVoiceHQOptions = [
33
28
  },
34
29
  ];
35
30
  exports.voices = [
36
- // French
37
31
  {
38
32
  provider: 'google',
39
33
  name: '👨‍🦰 Man ♂️ 🇫🇷 fr-FR-Neural2-B',
@@ -50,7 +44,6 @@ exports.voices = [
50
44
  lang: 'fr-FR',
51
45
  exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_fr-FR-Neural2-E.mp3',
52
46
  },
53
- // Italian
54
47
  {
55
48
  provider: 'google',
56
49
  name: '👩 Woman ♀️ 🇮🇹 it-IT-Neural2-A',
@@ -67,7 +60,6 @@ exports.voices = [
67
60
  lang: 'it-IT',
68
61
  exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_it-IT-Neural2-C.mp3',
69
62
  },
70
- // Portuguese
71
63
  {
72
64
  provider: 'google',
73
65
  name: '👩 Woman ♀️ 🇧🇷 pt-BR-Neural2-C',
@@ -84,7 +76,6 @@ exports.voices = [
84
76
  lang: 'pt-BR',
85
77
  exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_pt-BR-Neural2-B.mp3',
86
78
  },
87
- // Spanish
88
79
  {
89
80
  provider: 'google',
90
81
  name: '👨‍🦰 Man 🇲🇽 es-US-Neural2-B',
@@ -141,7 +132,6 @@ exports.voices = [
141
132
  lang: 'es-ES',
142
133
  exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_es-ES-Neural2-E.mp3',
143
134
  },
144
- // English
145
135
  {
146
136
  provider: 'google',
147
137
  name: '👩 Woman ♀️ 🇺🇸 en-US-Journey-F',
@@ -215,3 +205,4 @@ exports.voices = [
215
205
  exampleUrl: 'https://storage.googleapis.com/appingles-pro.appspot.com/voice_demos/google_en-US-Neural2-I.mp3',
216
206
  },
217
207
  ];
208
+ //# sourceMappingURL=voices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voices.js","sourceRoot":"","sources":["../../src/tts/voices.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAkB;IAEjD,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,oBAAoB,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;IACvG,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,sBAAsB,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IAE3G,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7G,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;I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AA8F;KAC3G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,+BAA+B;QACrC,EAAE,EAAE,cAAc;QAClB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,8FAA8F;KAC3G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,kCAAkC;QACxC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,kCAAkC;QACxC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,mCAAmC;QACzC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,mCAAmC;QACzC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,iGAAiG;KAC9G;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/conversation-card-nestjs",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "NestJS library for cards",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,74 +0,0 @@
1
- "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
28
- };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
35
- };
36
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
37
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
38
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.ConversationAiModule = void 0;
42
- var common_1 = require("@nestjs/common");
43
- var mongoose_1 = require("@nestjs/mongoose");
44
- var conversation_ai_controller_1 = require("./conversation-ai.controller");
45
- var conversation_entity_1 = require("./entities/conversation.entity");
46
- var tts_service_1 = require("./tts/tts-service");
47
- var ai_models_service_1 = require("./ai-models.service");
48
- var conversation_ai_service_1 = require("./services/conversation-ai.service");
49
- var ConversationAiModule = function () {
50
- var _classDecorators = [(0, common_1.Module)({
51
- imports: [mongoose_1.MongooseModule.forFeature([{ name: conversation_entity_1.Conversation.name, schema: conversation_entity_1.ConversationSchema }])],
52
- controllers: [conversation_ai_controller_1.ConversationAiController],
53
- providers: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService, ai_models_service_1.IAModelsService],
54
- exports: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService, ai_models_service_1.IAModelsService],
55
- })];
56
- var _classDescriptor;
57
- var _classExtraInitializers = [];
58
- var _classThis;
59
- var ConversationAiModule = _classThis = /** @class */ (function () {
60
- function ConversationAiModule_1() {
61
- }
62
- return ConversationAiModule_1;
63
- }());
64
- __setFunctionName(_classThis, "ConversationAiModule");
65
- (function () {
66
- var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
67
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
68
- ConversationAiModule = _classThis = _classDescriptor.value;
69
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
70
- __runInitializers(_classThis, _classExtraInitializers);
71
- })();
72
- return ConversationAiModule = _classThis;
73
- }();
74
- exports.ConversationAiModule = ConversationAiModule;
@@ -1,82 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.IAModelsService = void 0;
16
- const common_1 = require("@nestjs/common");
17
- const mongoose_1 = require("@nestjs/mongoose");
18
- const mongoose_2 = require("mongoose");
19
- const groq_sdk_1 = require("groq-sdk");
20
- const conversation_interface_1 = require("./clases/conversation.interface");
21
- const conversation_entity_1 = require("./entities/conversation.entity");
22
- let IAModelsService = class IAModelsService {
23
- constructor(conversationModel) {
24
- this.conversationModel = conversationModel;
25
- this.groqClient = new groq_sdk_1.default({
26
- apiKey: process.env['GROQ_API_KEY'],
27
- });
28
- }
29
- async chat(messages) {
30
- try {
31
- const completion = await this.groqClient.chat.completions.create({
32
- messages,
33
- model: 'mixtral-8x7b-32768',
34
- temperature: 0.7,
35
- max_tokens: 1024,
36
- });
37
- return {
38
- content: completion.choices[0]?.message?.content || '',
39
- role: conversation_interface_1.ChatRole.Assistant,
40
- metadata: null,
41
- };
42
- }
43
- catch (error) {
44
- throw new Error(`Failed to generate completion: ${error.message}`);
45
- }
46
- }
47
- async generateCompletion(prompt) {
48
- try {
49
- const completion = await this.groqClient.chat.completions.create({
50
- messages: [{ role: 'user', content: prompt }],
51
- model: 'mixtral-8x7b-32768',
52
- temperature: 0.7,
53
- max_tokens: 1024,
54
- });
55
- return completion.choices[0]?.message?.content || '';
56
- }
57
- catch (error) {
58
- throw new Error(`Failed to generate completion: ${error.message}`);
59
- }
60
- }
61
- async getCompletion(prompt) {
62
- try {
63
- const completion = await this.groqClient.chat.completions.create({
64
- messages: [{ role: 'user', content: prompt }],
65
- model: 'mixtral-8x7b-32768',
66
- temperature: 0.7,
67
- max_tokens: 1024,
68
- });
69
- return completion.choices[0]?.message?.content || '';
70
- }
71
- catch (error) {
72
- throw new Error(`Failed to generate completion: ${error.message}`);
73
- }
74
- }
75
- };
76
- exports.IAModelsService = IAModelsService;
77
- exports.IAModelsService = IAModelsService = __decorate([
78
- (0, common_1.Injectable)(),
79
- __param(0, (0, mongoose_1.InjectModel)(conversation_entity_1.Conversation.name)),
80
- __metadata("design:paramtypes", [mongoose_2.Model])
81
- ], IAModelsService);
82
- //# sourceMappingURL=ai-models.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-models.service.js","sourceRoot":"","sources":["../../../../src/ai-models.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AACjC,uCAA4B;AAG5B,4EAA4E;AAC5E,wEAAoF;AAG7E,IAAM,eAAe,GAArB,MAAM,eAAe;IAG1B,YAAoD,iBAA8C;QAA9C,sBAAiB,GAAjB,iBAAiB,CAA6B;QAChG,IAAI,CAAC,UAAU,GAAG,IAAI,kBAAI,CAAC;YACzB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;SACpC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAsC;QAC/C,IAAI;YACF,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;gBAC/D,QAAQ;gBACR,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,GAAG;gBAChB,UAAU,EAAE,IAAI;aACjB,CAAC,CAAC;YACH,OAAO;gBACL,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtD,IAAI,EAAE,iCAAQ,CAAC,SAAS;gBACxB,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAA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,CAAC,CAAA;qCAA4B,gBAAK;GAHjE,eAAe,CAwD3B"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConversationType = exports.TextEngines = exports.ChatMessage = exports.ChatMessageDict = exports.WordTimestamps = exports.ChatMultiMessage = exports.ChatRole = void 0;
4
- var ChatRole;
5
- (function (ChatRole) {
6
- ChatRole["System"] = "system";
7
- ChatRole["User"] = "user";
8
- ChatRole["Assistant"] = "assistant";
9
- ChatRole["AssistantHelper"] = "assistantHelper";
10
- })(ChatRole || (exports.ChatRole = ChatRole = {}));
11
- class ChatMultiMessage {
12
- }
13
- exports.ChatMultiMessage = ChatMultiMessage;
14
- class WordTimestamps {
15
- }
16
- exports.WordTimestamps = WordTimestamps;
17
- class ChatMessageDict {
18
- }
19
- exports.ChatMessageDict = ChatMessageDict;
20
- class ChatMessage {
21
- }
22
- exports.ChatMessage = ChatMessage;
23
- var TextEngines;
24
- (function (TextEngines) {
25
- TextEngines["Plantext"] = "plantext";
26
- TextEngines["SimpleText"] = "simpleText";
27
- TextEngines["MarkdownMultiMessages"] = "markdownMultiMessages";
28
- TextEngines["MarkdownSSML"] = "markdownSSML";
29
- })(TextEngines || (exports.TextEngines = TextEngines = {}));
30
- var ConversationType;
31
- (function (ConversationType) {
32
- ConversationType["General"] = "general";
33
- ConversationType["Reflection"] = "reflection";
34
- ConversationType["LearningExample"] = "learningExample";
35
- ConversationType["Challenge"] = "challenge";
36
- ConversationType["RolePlay"] = "rolePlay";
37
- ConversationType["RolePlayNoNarrator"] = "rolePlayNoNarrator";
38
- ConversationType["RolePlayInnerThoughts"] = "rolePlayInnerThoughts";
39
- })(ConversationType || (exports.ConversationType = ConversationType = {}));
40
- //# sourceMappingURL=conversation.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation.interface.js","sourceRoot":"","sources":["../../../../../src/clases/conversation.interface.ts"],"names":[],"mappings":";;;AAcA,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,mCAAuB,CAAA;IACvB,+CAAmC,CAAA;AACrC,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AAED,MAAa,gBAAgB;CAU5B;AAVD,4CAUC;AAID,MAAa,cAAc;CAK1B;AALD,wCAKC;AAED,MAAa,eAAe;CAI3B;AAJD,0CAIC;AAED,MAAa,WAAW;CAcvB;AAdD,kCAcC;AA2CD,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,wCAAyB,CAAA;IACzB,8DAA+C,CAAA;IAC/C,4CAA6B,CAAA;AAC/B,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,6CAAyB,CAAA;IACzB,uDAAmC,CAAA;IACnC,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,6DAAyC,CAAA;IACzC,mEAA+C,CAAA;AACjD,CAAC,EARW,gBAAgB,gCAAhB,gBAAgB,QAQ3B"}
@@ -1,153 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ConversationAiController = void 0;
16
- const common_1 = require("@nestjs/common");
17
- const swagger_1 = require("@nestjs/swagger");
18
- const conversation_ai_service_1 = require("./services/conversation-ai.service");
19
- const create_conversation_dto_1 = require("./dto/create-conversation.dto");
20
- const conversation_interface_1 = require("./clases/conversation.interface");
21
- const conversation_entity_1 = require("./entities/conversation.entity");
22
- const tts_classes_1 = require("./tts/tts.classes");
23
- const tts_service_1 = require("./tts/tts-service");
24
- const ai_models_service_1 = require("./ai-models.service");
25
- let ConversationAiController = class ConversationAiController {
26
- constructor(conversationAiService, aiModel, ttsService) {
27
- this.conversationAiService = conversationAiService;
28
- this.aiModel = aiModel;
29
- this.ttsService = ttsService;
30
- }
31
- async getConversations() {
32
- console.log('getConversations');
33
- return this.conversationAiService.getConversations();
34
- }
35
- async saveConversation(conversation) {
36
- return this.conversationAiService.saveConversation(conversation);
37
- }
38
- async getConversationById(id) {
39
- return this.conversationAiService.getConversationById(id);
40
- }
41
- async updateConversation(id, updateData) {
42
- return this.conversationAiService.updateConversation(id, updateData);
43
- }
44
- async deleteConversationById(id) {
45
- return this.conversationAiService.deleteConversationById(id);
46
- }
47
- async continueConversation(conversation) {
48
- const messages = conversation.messages;
49
- console.log('messages', messages);
50
- const response = await this.aiModel.chat(messages);
51
- console.log('response', response);
52
- return response;
53
- }
54
- async getTTS(tts, res) {
55
- console.log('tts', tts);
56
- const { audioContent, voiceName } = await this.ttsService.getSpeech({
57
- voiceName: tts.voice,
58
- text: tts.text,
59
- options: {},
60
- lang: null,
61
- isSsml: tts.ssml,
62
- });
63
- res.header('Content-Type', 'audio/mpeg');
64
- res.header('Content-Disposition', `attachment; filename="${voiceName}.mp3"`);
65
- res.header('Content-Length', audioContent.length);
66
- res.header('transcription', 'This is a transcription');
67
- return audioContent;
68
- }
69
- async test() {
70
- return 'Hello World' + conversation_interface_1.TextEngines.MarkdownMultiMessages;
71
- }
72
- };
73
- exports.ConversationAiController = ConversationAiController;
74
- __decorate([
75
- (0, common_1.Get)('/conversation'),
76
- (0, swagger_1.ApiOperation)({ summary: 'Get all conversations' }),
77
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return all conversations.' }),
78
- __metadata("design:type", Function),
79
- __metadata("design:paramtypes", []),
80
- __metadata("design:returntype", Promise)
81
- ], ConversationAiController.prototype, "getConversations", null);
82
- __decorate([
83
- (0, common_1.Post)('/conversation'),
84
- (0, swagger_1.ApiOperation)({ summary: 'Save new conversations' }),
85
- (0, swagger_1.ApiResponse)({ status: 201, description: 'The conversation has been successfully created.', type: conversation_entity_1.Conversation }),
86
- __param(0, (0, common_1.Body)()),
87
- __metadata("design:type", Function),
88
- __metadata("design:paramtypes", [Object]),
89
- __metadata("design:returntype", Promise)
90
- ], ConversationAiController.prototype, "saveConversation", null);
91
- __decorate([
92
- (0, common_1.Get)('/conversation/:id'),
93
- (0, swagger_1.ApiOperation)({ summary: 'Get a conversation by ID' }),
94
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the conversation.' }),
95
- __param(0, (0, common_1.Param)('id')),
96
- __metadata("design:type", Function),
97
- __metadata("design:paramtypes", [String]),
98
- __metadata("design:returntype", Promise)
99
- ], ConversationAiController.prototype, "getConversationById", null);
100
- __decorate([
101
- (0, common_1.Put)('/conversation/:id'),
102
- (0, swagger_1.ApiOperation)({ summary: 'Update a conversation by ID' }),
103
- (0, swagger_1.ApiResponse)({ status: 200, description: 'The conversation has been successfully updated.', type: conversation_entity_1.Conversation }),
104
- __param(0, (0, common_1.Param)('id')),
105
- __param(1, (0, common_1.Body)()),
106
- __metadata("design:type", Function),
107
- __metadata("design:paramtypes", [String, Object]),
108
- __metadata("design:returntype", Promise)
109
- ], ConversationAiController.prototype, "updateConversation", null);
110
- __decorate([
111
- (0, common_1.Delete)('/conversation/:id'),
112
- (0, swagger_1.ApiOperation)({ summary: 'Delete a conversation by ID' }),
113
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the deleted conversation.' }),
114
- __param(0, (0, common_1.Param)('id')),
115
- __metadata("design:type", Function),
116
- __metadata("design:paramtypes", [String]),
117
- __metadata("design:returntype", Promise)
118
- ], ConversationAiController.prototype, "deleteConversationById", null);
119
- __decorate([
120
- (0, common_1.Post)('/chat'),
121
- (0, swagger_1.ApiOperation)({ summary: 'Continue the conversation' }),
122
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the conversation.' }),
123
- __param(0, (0, common_1.Body)()),
124
- __metadata("design:type", Function),
125
- __metadata("design:paramtypes", [create_conversation_dto_1.ConversationDTO]),
126
- __metadata("design:returntype", Promise)
127
- ], ConversationAiController.prototype, "continueConversation", null);
128
- __decorate([
129
- (0, common_1.Post)('/tts'),
130
- (0, swagger_1.ApiOperation)({ summary: 'Generate TTS audio' }),
131
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the TTS audio.' }),
132
- __param(0, (0, common_1.Body)()),
133
- __param(1, (0, common_1.Res)({ passthrough: true })),
134
- __metadata("design:type", Function),
135
- __metadata("design:paramtypes", [tts_classes_1.TTSDto, Object]),
136
- __metadata("design:returntype", Promise)
137
- ], ConversationAiController.prototype, "getTTS", null);
138
- __decorate([
139
- (0, common_1.Get)('/test'),
140
- (0, swagger_1.ApiOperation)({ summary: 'Test the conversation AI' }),
141
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the test result.' }),
142
- __metadata("design:type", Function),
143
- __metadata("design:paramtypes", []),
144
- __metadata("design:returntype", Promise)
145
- ], ConversationAiController.prototype, "test", null);
146
- exports.ConversationAiController = ConversationAiController = __decorate([
147
- (0, swagger_1.ApiTags)('conversation-ai-cards'),
148
- (0, common_1.Controller)('api/conversation-ai-cards'),
149
- __metadata("design:paramtypes", [conversation_ai_service_1.ConversationAiService,
150
- ai_models_service_1.IAModelsService,
151
- tts_service_1.TTSService])
152
- ], ConversationAiController);
153
- //# sourceMappingURL=conversation-ai.controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation-ai.controller.js","sourceRoot":"","sources":["../../../../src/conversation-ai.controller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AE,0BAA0B,EAAE,CAAC;IAC1C,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAe,yCAAe;;oEAM/D;AAKK;IAHL,IAAA,aAAI,EAAC,MAAM,CAAC;IACZ,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC/C,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACrD,WAAA,IAAA,aAAI,GAAE,CAAA;IAAe,WAAA,IAAA,YAAG,EAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;;qCAAnC,oBAAM;;sDAgB/B;AAKK;IAHL,IAAA,YAAG,EAAC,OAAO,CAAC;IACZ,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACrD,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;;;oDAIpE;mCAlFU,wBAAwB;IAFpC,IAAA,iBAAO,EAAC,uBAAuB,CAAC;IAChC,IAAA,mBAAU,EAAC,2BAA2B,CAAC;qCAGI,+CAAqB;QACnC,mCAAe;QAEZ,wBAAU;GAL9B,wBAAwB,CAmFpC"}
@@ -1,2 +0,0 @@
1
- export declare class ConversationAiModule {
2
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ConversationAiModule = void 0;
10
- const common_1 = require("@nestjs/common");
11
- const mongoose_1 = require("@nestjs/mongoose");
12
- const conversation_ai_controller_1 = require("./conversation-ai.controller");
13
- const conversation_entity_1 = require("./entities/conversation.entity");
14
- const tts_service_1 = require("./tts/tts-service");
15
- const ai_models_service_1 = require("./ai-models.service");
16
- const conversation_ai_service_1 = require("./services/conversation-ai.service");
17
- let ConversationAiModule = class ConversationAiModule {
18
- };
19
- exports.ConversationAiModule = ConversationAiModule;
20
- exports.ConversationAiModule = ConversationAiModule = __decorate([
21
- (0, common_1.Module)({
22
- imports: [mongoose_1.MongooseModule.forFeature([{ name: conversation_entity_1.Conversation.name, schema: conversation_entity_1.ConversationSchema }])],
23
- controllers: [conversation_ai_controller_1.ConversationAiController],
24
- providers: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService, ai_models_service_1.IAModelsService],
25
- exports: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService, ai_models_service_1.IAModelsService],
26
- })
27
- ], ConversationAiModule);
28
- //# sourceMappingURL=conversation-ai.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation-ai.module.js","sourceRoot":"","sources":["../../../../src/conversation-ai.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,6EAAwE;AACxE,wEAAkF;AAClF,mDAA+C;AAC/C,2DAAsD;AACtD,gFAA2E;AAQpE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oDAAoB;+BAApB,oBAAoB;IANhC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,kCAAY,CAAC,IAAI,EAAE,MAAM,EAAE,wCAAkB,EAAE,CAAC,CAAC,CAAC;QAC/F,WAAW,EAAE,CAAC,qDAAwB,CAAC;QACvC,SAAS,EAAE,CAAC,+CAAqB,EAAE,wBAAU,EAAE,mCAAe,CAAC;QAC/D,OAAO,EAAE,CAAC,+CAAqB,EAAE,wBAAU,EAAE,mCAAe,CAAC;KAC9D,CAAC;GACW,oBAAoB,CAAG"}
@@ -1,2 +0,0 @@
1
- export declare class ConversationCardsModule {
2
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ConversationCardsModule = void 0;
10
- const common_1 = require("@nestjs/common");
11
- const mongoose_1 = require("@nestjs/mongoose");
12
- const conversation_ai_controller_1 = require("./conversation-ai.controller");
13
- const conversation_entity_1 = require("./entities/conversation.entity");
14
- const tts_service_1 = require("./tts/tts-service");
15
- const ai_models_service_1 = require("./ai-models.service");
16
- const conversation_ai_service_1 = require("./services/conversation-ai.service");
17
- let ConversationCardsModule = class ConversationCardsModule {
18
- };
19
- exports.ConversationCardsModule = ConversationCardsModule;
20
- exports.ConversationCardsModule = ConversationCardsModule = __decorate([
21
- (0, common_1.Module)({
22
- imports: [mongoose_1.MongooseModule.forFeature([{ name: conversation_entity_1.Conversation.name, schema: conversation_entity_1.ConversationSchema }])],
23
- controllers: [conversation_ai_controller_1.ConversationAiController],
24
- providers: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService, ai_models_service_1.IAModelsService],
25
- exports: [conversation_ai_service_1.ConversationAiService, ai_models_service_1.IAModelsService, tts_service_1.TTSService],
26
- })
27
- ], ConversationCardsModule);
28
- //# sourceMappingURL=conversation-cards.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation-cards.module.js","sourceRoot":"","sources":["../../../../src/conversation-cards.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,6EAAwE;AACxE,wEAAkF;AAClF,mDAA+C;AAC/C,2DAAsD;AACtD,gFAA2E;AAQpE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,0DAAuB;kCAAvB,uBAAuB;IANnC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,kCAAY,CAAC,IAAI,EAAE,MAAM,EAAE,wCAAkB,EAAE,CAAC,CAAC,CAAC;QAC/F,WAAW,EAAE,CAAC,qDAAwB,CAAC;QACvC,SAAS,EAAE,CAAC,+CAAqB,EAAE,wBAAU,EAAE,mCAAe,CAAC;QAC/D,OAAO,EAAE,CAAC,+CAAqB,EAAE,mCAAe,EAAE,wBAAU,CAAC;KAC9D,CAAC;GACW,uBAAuB,CAAG"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ConversationAiController = void 0;
13
- const common_1 = require("@nestjs/common");
14
- const swagger_1 = require("@nestjs/swagger");
15
- let ConversationAiController = class ConversationAiController {
16
- async getCards() {
17
- return 'Hello World';
18
- }
19
- };
20
- exports.ConversationAiController = ConversationAiController;
21
- __decorate([
22
- (0, common_1.Get)('/cards'),
23
- (0, swagger_1.ApiOperation)({ summary: 'Get the cards' }),
24
- (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the cards.' }),
25
- __metadata("design:type", Function),
26
- __metadata("design:paramtypes", []),
27
- __metadata("design:returntype", Promise)
28
- ], ConversationAiController.prototype, "getCards", null);
29
- exports.ConversationAiController = ConversationAiController = __decorate([
30
- (0, swagger_1.ApiTags)('conversation-cards-library'),
31
- (0, common_1.Controller)('api/conversation-cards-library')
32
- ], ConversationAiController);
33
- //# sourceMappingURL=conversation.controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation.controller.js","sourceRoot":"","sources":["../../../../src/conversation.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6CAAqE;AAI9D,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAI7B,AAAN,KAAK,CAAC,QAAQ;QACZ,OAAO,aAAa,CAAC;IACvB,CAAC;CACF,CAAA;AAPY,4DAAwB;AAI7B;IAHL,IAAA,YAAG,EAAC,QAAQ,CAAC;IACb,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;IAC1C,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;;;;wDAG9D;mCANU,wBAAwB;IAFpC,IAAA,iBAAO,EAAC,4BAA4B,CAAC;IACrC,IAAA,mBAAU,EAAC,gCAAgC,CAAC;GAChC,wBAAwB,CAOpC"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ConversationDTO = exports.CreateConversationDto = void 0;
13
- const swagger_1 = require("@nestjs/swagger");
14
- class CreateConversationDto {
15
- }
16
- exports.CreateConversationDto = CreateConversationDto;
17
- __decorate([
18
- (0, swagger_1.ApiProperty)({
19
- description: 'The message content of the conversation',
20
- example: 'Hello, how can I help you today?',
21
- }),
22
- __metadata("design:type", String)
23
- ], CreateConversationDto.prototype, "message", void 0);
24
- __decorate([
25
- (0, swagger_1.ApiProperty)({
26
- description: 'The user ID associated with the conversation',
27
- example: 'user123',
28
- }),
29
- __metadata("design:type", String)
30
- ], CreateConversationDto.prototype, "userId", void 0);
31
- __decorate([
32
- (0, swagger_1.ApiProperty)({
33
- description: 'Additional context for the conversation',
34
- required: false,
35
- example: { previousContext: 'User asked about weather' },
36
- }),
37
- __metadata("design:type", Object)
38
- ], CreateConversationDto.prototype, "context", void 0);
39
- class ConversationDTO {
40
- }
41
- exports.ConversationDTO = ConversationDTO;
42
- //# sourceMappingURL=create-conversation.dto.js.map