@dataclouder/conversation-card-nestjs 0.0.13 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/libs/conversation-cards/src/clases/conversation.interface.d.ts +160 -0
  2. package/dist/libs/conversation-cards/src/clases/conversation.interface.js +40 -0
  3. package/dist/libs/conversation-cards/src/clases/conversation.interface.js.map +1 -0
  4. package/dist/libs/conversation-cards/src/conversation-ai.controller.d.ts +20 -0
  5. package/dist/libs/conversation-cards/src/conversation-ai.controller.js +151 -0
  6. package/dist/libs/conversation-cards/src/conversation-ai.controller.js.map +1 -0
  7. package/dist/libs/conversation-cards/src/conversation-ai.module.d.ts +2 -0
  8. package/dist/libs/conversation-cards/src/conversation-ai.module.js +27 -0
  9. package/dist/libs/conversation-cards/src/conversation-ai.module.js.map +1 -0
  10. package/dist/libs/conversation-cards/src/conversation-ai.service.d.ts +17 -0
  11. package/dist/libs/conversation-cards/src/conversation-ai.service.js +105 -0
  12. package/dist/libs/conversation-cards/src/conversation-ai.service.js.map +1 -0
  13. package/dist/libs/conversation-cards/src/conversation-cards.module.d.ts +2 -0
  14. package/dist/libs/conversation-cards/src/conversation-cards.module.js +27 -0
  15. package/dist/libs/conversation-cards/src/conversation-cards.module.js.map +1 -0
  16. package/dist/libs/conversation-cards/src/conversation-cards.service.d.ts +2 -0
  17. package/dist/libs/conversation-cards/src/conversation-cards.service.js +17 -0
  18. package/dist/libs/conversation-cards/src/conversation-cards.service.js.map +1 -0
  19. package/dist/libs/conversation-cards/src/conversation.controller.d.ts +3 -0
  20. package/dist/libs/conversation-cards/src/conversation.controller.js +33 -0
  21. package/dist/libs/conversation-cards/src/conversation.controller.js.map +1 -0
  22. package/dist/libs/conversation-cards/src/dto/create-conversation.dto.d.ts +17 -0
  23. package/dist/libs/conversation-cards/src/dto/create-conversation.dto.js +42 -0
  24. package/dist/libs/conversation-cards/src/dto/create-conversation.dto.js.map +1 -0
  25. package/dist/libs/conversation-cards/src/entities/conversation.entity.d.ts +67 -0
  26. package/dist/libs/conversation-cards/src/entities/conversation.entity.js +97 -0
  27. package/dist/libs/conversation-cards/src/entities/conversation.entity.js.map +1 -0
  28. package/dist/libs/conversation-cards/src/index.d.ts +2 -0
  29. package/dist/libs/conversation-cards/src/index.js +19 -0
  30. package/dist/libs/conversation-cards/src/index.js.map +1 -0
  31. package/dist/libs/conversation-cards/src/tts/tts-service.d.ts +20 -0
  32. package/dist/libs/conversation-cards/src/tts/tts-service.js +124 -0
  33. package/dist/libs/conversation-cards/src/tts/tts-service.js.map +1 -0
  34. package/dist/libs/conversation-cards/src/tts/tts.classes.d.ts +32 -0
  35. package/dist/libs/conversation-cards/src/tts/tts.classes.js +200 -0
  36. package/dist/libs/conversation-cards/src/tts/tts.classes.js.map +1 -0
  37. package/dist/libs/conversation-cards/src/tts/voices.d.ts +3 -0
  38. package/dist/libs/conversation-cards/src/tts/voices.js +208 -0
  39. package/dist/libs/conversation-cards/src/tts/voices.js.map +1 -0
  40. package/dist/src/common/app-exception.d.ts +28 -0
  41. package/dist/src/common/app-exception.js +28 -0
  42. package/dist/src/common/app-exception.js.map +1 -0
  43. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  44. package/package.json +2 -2
@@ -0,0 +1,160 @@
1
+ export interface Message {
2
+ role: 'user' | 'assistant';
3
+ content: string;
4
+ }
5
+ export interface Conversation {
6
+ id: string;
7
+ messages?: Message[];
8
+ userId: string;
9
+ context?: Record<string, any>;
10
+ createdAt: Date;
11
+ updatedAt: Date;
12
+ }
13
+ export declare enum ChatRole {
14
+ System = "system",
15
+ User = "user",
16
+ Assistant = "assistant",
17
+ AssistantHelper = "assistantHelper"
18
+ }
19
+ export declare class ChatMultiMessage {
20
+ voice: string;
21
+ content: string;
22
+ text: string;
23
+ audioUrl: string;
24
+ audioPromise: any;
25
+ isLoading?: boolean;
26
+ transcription?: any;
27
+ transcriptionTimestamps?: WordTimestamps[];
28
+ tag: string | string[] | Set<string> | {
29
+ [klass: string]: any;
30
+ };
31
+ }
32
+ export type TranscriptionsWhisper = {
33
+ text: string;
34
+ task: string;
35
+ language: string;
36
+ words: any;
37
+ duration: number;
38
+ };
39
+ export declare class WordTimestamps {
40
+ word: string;
41
+ start: number;
42
+ end: number;
43
+ highlighted: any;
44
+ }
45
+ export declare class ChatMessageDict {
46
+ content: string;
47
+ role: ChatRole;
48
+ metadata?: any;
49
+ }
50
+ export declare class ChatMessage {
51
+ content: string;
52
+ role: ChatRole;
53
+ ssml?: string;
54
+ text?: string;
55
+ translation?: string;
56
+ audioUrl?: string;
57
+ audioHtml?: HTMLAudioElement;
58
+ promisePlay?: any;
59
+ stats?: any;
60
+ multiMessages?: ChatMultiMessage[];
61
+ transcription?: TranscriptionsWhisper;
62
+ transcriptionTimestamps?: WordTimestamps[];
63
+ voice?: string;
64
+ }
65
+ export interface CharaCard {
66
+ name: string;
67
+ description: string;
68
+ scenario: string;
69
+ first_mes: string;
70
+ creator_notes: string;
71
+ mes_example: string;
72
+ alternate_greetings: string[];
73
+ tags: string[];
74
+ system_prompt: string;
75
+ post_history_instructions: string;
76
+ }
77
+ export interface Appearance {
78
+ physicalDescription: string;
79
+ outfit: string;
80
+ objects: string;
81
+ quirks: string;
82
+ }
83
+ export interface CharacterCardDC {
84
+ spec: 'chara_card_v2';
85
+ spec_version: '2_v_dc';
86
+ data: {
87
+ name: string;
88
+ description: string;
89
+ scenario: string;
90
+ first_mes: string;
91
+ creator_notes: string;
92
+ mes_example: string;
93
+ alternate_greetings: string[];
94
+ tags: string[];
95
+ system_prompt: string;
96
+ post_history_instructions: string;
97
+ character_version: string;
98
+ extensions: Record<string, any>;
99
+ appearance: Appearance;
100
+ };
101
+ }
102
+ export declare enum TextEngines {
103
+ Plantext = "plantext",
104
+ SimpleText = "simpleText",
105
+ MarkdownMultiMessages = "markdownMultiMessages",
106
+ MarkdownSSML = "markdownSSML"
107
+ }
108
+ export declare enum ConversationType {
109
+ General = "general",
110
+ Reflection = "reflection",
111
+ LearningExample = "learningExample",
112
+ Challenge = "challenge",
113
+ RolePlay = "rolePlay",
114
+ RolePlayNoNarrator = "rolePlayNoNarrator",
115
+ RolePlayInnerThoughts = "rolePlayInnerThoughts"
116
+ }
117
+ export interface IConversation {
118
+ isPublic: any;
119
+ _id: any;
120
+ id: string;
121
+ card: CharacterCardDC;
122
+ title: string;
123
+ image: any;
124
+ voice: string;
125
+ secondaryVoice: string;
126
+ isPublished: boolean;
127
+ authorId: string;
128
+ authorEmail: string;
129
+ takenCount: number;
130
+ lang: string;
131
+ textEngine: TextEngines;
132
+ ConversationType: ConversationType;
133
+ }
134
+ export interface IConversationCard {
135
+ version: string;
136
+ id: string;
137
+ title: string;
138
+ assets: {
139
+ image: any;
140
+ };
141
+ characterCard: CharacterCardDC;
142
+ textEngine: TextEngines;
143
+ conversationType: ConversationType;
144
+ lang: string;
145
+ tts: {
146
+ voice: string;
147
+ secondaryVoice: string;
148
+ speed: string;
149
+ speedRate: number;
150
+ };
151
+ metaApp: {
152
+ isPublished: boolean;
153
+ isPublic: any;
154
+ authorId: string;
155
+ authorEmail: string;
156
+ createdAt: Date;
157
+ updatedAt: Date;
158
+ takenCount: number;
159
+ };
160
+ }
@@ -0,0 +1,40 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,20 @@
1
+ import { ConversationAiService } from './conversation-ai.service';
2
+ import { ConversationDTO } from './dto/create-conversation.dto';
3
+ import { ChatMessageDict, IConversationCard } from './clases/conversation.interface';
4
+ import { Conversation, ConversationDocument } from './entities/conversation.entity';
5
+ import { TTSDto } from './tts/tts.classes';
6
+ import { TTSService } from './tts/tts-service';
7
+ import { FastifyReply } from 'fastify';
8
+ export declare class ConversationAiController {
9
+ private readonly conversationAiService;
10
+ private readonly ttsService;
11
+ constructor(conversationAiService: ConversationAiService, ttsService: TTSService);
12
+ test(): Promise<string>;
13
+ saveConversation(conversation: IConversationCard): Promise<ConversationDocument>;
14
+ continueConversation(conversation: ConversationDTO): Promise<ChatMessageDict>;
15
+ getTTS(tts: TTSDto, res: FastifyReply): Promise<any>;
16
+ getConversations(): Promise<ConversationDocument[]>;
17
+ getConversationById(id: string): Promise<ConversationDocument>;
18
+ updateConversation(id: string, updateData: Partial<Conversation>): Promise<ConversationDocument>;
19
+ deleteConversationById(id: string): Promise<ConversationDocument>;
20
+ }
@@ -0,0 +1,151 @@
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 conversation_ai_service_1 = require("./conversation-ai.service");
18
+ const create_conversation_dto_1 = require("./dto/create-conversation.dto");
19
+ const swagger_1 = require("@nestjs/swagger");
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
+ let ConversationAiController = class ConversationAiController {
25
+ constructor(conversationAiService, ttsService) {
26
+ this.conversationAiService = conversationAiService;
27
+ this.ttsService = ttsService;
28
+ }
29
+ async test() {
30
+ return 'Hello World' + conversation_interface_1.TextEngines.MarkdownMultiMessages;
31
+ }
32
+ async saveConversation(conversation) {
33
+ console.log('conversation', conversation);
34
+ return this.conversationAiService.saveConversation(conversation);
35
+ }
36
+ async continueConversation(conversation) {
37
+ const messages = conversation.messages;
38
+ console.log('messages', messages);
39
+ const response = await this.conversationAiService.chat(messages);
40
+ console.log('response', response);
41
+ return response;
42
+ }
43
+ async getTTS(tts, res) {
44
+ console.log('tts', tts);
45
+ const { audioContent, voiceName } = await this.ttsService.getSpeech({
46
+ voiceName: tts.voice,
47
+ text: tts.text,
48
+ options: {},
49
+ lang: null,
50
+ isSsml: tts.ssml,
51
+ });
52
+ res.header('Content-Type', 'audio/mpeg');
53
+ res.header('Content-Disposition', `attachment; filename="${voiceName}.mp3"`);
54
+ res.header('Content-Length', audioContent.length);
55
+ res.header('transcription', 'This is a transcription');
56
+ return audioContent;
57
+ }
58
+ async getConversations() {
59
+ console.log('getConversations');
60
+ return this.conversationAiService.getConversations();
61
+ }
62
+ async getConversationById(id) {
63
+ return this.conversationAiService.getConversationById(id);
64
+ }
65
+ async updateConversation(id, updateData) {
66
+ return this.conversationAiService.updateConversation(id, updateData);
67
+ }
68
+ async deleteConversationById(id) {
69
+ return this.conversationAiService.deleteConversationById(id);
70
+ }
71
+ };
72
+ exports.ConversationAiController = ConversationAiController;
73
+ __decorate([
74
+ (0, common_1.Get)('/test'),
75
+ (0, swagger_1.ApiOperation)({ summary: 'Test the conversation AI' }),
76
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the test result.' }),
77
+ __metadata("design:type", Function),
78
+ __metadata("design:paramtypes", []),
79
+ __metadata("design:returntype", Promise)
80
+ ], ConversationAiController.prototype, "test", null);
81
+ __decorate([
82
+ (0, common_1.Post)('/conversation'),
83
+ (0, swagger_1.ApiOperation)({ summary: 'Save a new conversation' }),
84
+ (0, swagger_1.ApiResponse)({ status: 201, description: 'The conversation has been successfully created.', type: conversation_entity_1.Conversation }),
85
+ __param(0, (0, common_1.Body)()),
86
+ __metadata("design:type", Function),
87
+ __metadata("design:paramtypes", [Object]),
88
+ __metadata("design:returntype", Promise)
89
+ ], ConversationAiController.prototype, "saveConversation", null);
90
+ __decorate([
91
+ (0, common_1.Post)('/chat'),
92
+ (0, swagger_1.ApiOperation)({ summary: 'Continue the conversation' }),
93
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the conversation.' }),
94
+ __param(0, (0, common_1.Body)()),
95
+ __metadata("design:type", Function),
96
+ __metadata("design:paramtypes", [create_conversation_dto_1.ConversationDTO]),
97
+ __metadata("design:returntype", Promise)
98
+ ], ConversationAiController.prototype, "continueConversation", null);
99
+ __decorate([
100
+ (0, common_1.Post)('/tts'),
101
+ (0, swagger_1.ApiOperation)({ summary: 'Generate TTS audio' }),
102
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the TTS audio.' }),
103
+ __param(0, (0, common_1.Body)()),
104
+ __param(1, (0, common_1.Res)({ passthrough: true })),
105
+ __metadata("design:type", Function),
106
+ __metadata("design:paramtypes", [tts_classes_1.TTSDto, Object]),
107
+ __metadata("design:returntype", Promise)
108
+ ], ConversationAiController.prototype, "getTTS", null);
109
+ __decorate([
110
+ (0, common_1.Get)('/conversation'),
111
+ (0, swagger_1.ApiOperation)({ summary: 'Get all conversations' }),
112
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Return all conversations.' }),
113
+ __metadata("design:type", Function),
114
+ __metadata("design:paramtypes", []),
115
+ __metadata("design:returntype", Promise)
116
+ ], ConversationAiController.prototype, "getConversations", null);
117
+ __decorate([
118
+ (0, common_1.Get)('/conversation/:id'),
119
+ (0, swagger_1.ApiOperation)({ summary: 'Get a conversation by ID' }),
120
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the conversation.' }),
121
+ __param(0, (0, common_1.Param)('id')),
122
+ __metadata("design:type", Function),
123
+ __metadata("design:paramtypes", [String]),
124
+ __metadata("design:returntype", Promise)
125
+ ], ConversationAiController.prototype, "getConversationById", null);
126
+ __decorate([
127
+ (0, common_1.Put)('/conversation/:id'),
128
+ (0, swagger_1.ApiOperation)({ summary: 'Update a conversation by ID' }),
129
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'The conversation has been successfully updated.', type: conversation_entity_1.Conversation }),
130
+ __param(0, (0, common_1.Param)('id')),
131
+ __param(1, (0, common_1.Body)()),
132
+ __metadata("design:type", Function),
133
+ __metadata("design:paramtypes", [String, Object]),
134
+ __metadata("design:returntype", Promise)
135
+ ], ConversationAiController.prototype, "updateConversation", null);
136
+ __decorate([
137
+ (0, common_1.Delete)('/conversation/:id'),
138
+ (0, swagger_1.ApiOperation)({ summary: 'Delete a conversation by ID' }),
139
+ (0, swagger_1.ApiResponse)({ status: 200, description: 'Return the deleted conversation.' }),
140
+ __param(0, (0, common_1.Param)('id')),
141
+ __metadata("design:type", Function),
142
+ __metadata("design:paramtypes", [String]),
143
+ __metadata("design:returntype", Promise)
144
+ ], ConversationAiController.prototype, "deleteConversationById", null);
145
+ exports.ConversationAiController = ConversationAiController = __decorate([
146
+ (0, swagger_1.ApiTags)('conversation-ai-cards'),
147
+ (0, common_1.Controller)('api/conversation-ai'),
148
+ __metadata("design:paramtypes", [conversation_ai_service_1.ConversationAiService,
149
+ tts_service_1.TTSService])
150
+ ], ConversationAiController);
151
+ //# sourceMappingURL=conversation-ai.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-ai.controller.js","sourceRoot":"","sources":["../../../../src/conversation-ai.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsF;AACtF,uEAAkE;AAClE,2EAAgE;AAChE,6CAAqE;AACrE,4EAAkG;AAClG,wEAAoF;AACpF,mDAA2C;AAC3C,mDAA+C;AAQxC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YACmB,qBAA4C,EAC5C,UAAsB;QADtB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAKE,AAAN,KAAK,CAAC,IAAI;QAER,OAAO,aAAa,GAAG,oCAAW,CAAC,qBAAqB,CAAC;IAC3D,CAAC;IAKK,AAAN,KAAK,CAAC,gBAAgB,CAAS,YAA+B;QAC5D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACnE,CAAC;IAKK,AAAN,KAAK,CAAC,oBAAoB,CAAS,YAA6B;QAC9D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAe,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAClC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAKK,AAAN,KAAK,CAAC,MAAM,CAAS,GAAW,EAA8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EAAE,2BAA2B,EAAE,CAAC;;;;gEAItE;AAKK;IAHL,IAAA,YAAG,EAAC,mBAAmB,CAAC;IACxB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACrD,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC3C,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;mEAErC;AAKK;IAHL,IAAA,YAAG,EAAC,mBAAmB,CAAC;IACxB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACxD,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,iDAAiD,EAAE,IAAI,EAAE,kCAAY,EAAE,CAAC;IACvF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kEAExD;AAKK;IAHL,IAAA,eAAM,EAAC,mBAAmB,CAAC;IAC3B,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACxD,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAChD,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;sEAExC;mCAjFU,wBAAwB;IAFpC,IAAA,iBAAO,EAAC,uBAAuB,CAAC;IAChC,IAAA,mBAAU,EAAC,qBAAqB,CAAC;qCAGU,+CAAqB;QAChC,wBAAU;GAH9B,wBAAwB,CAkFpC"}
@@ -0,0 +1,2 @@
1
+ export declare class ConversationAiModule {
2
+ }
@@ -0,0 +1,27 @@
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_ai_service_1 = require("./conversation-ai.service");
14
+ const conversation_entity_1 = require("./entities/conversation.entity");
15
+ const tts_service_1 = require("./tts/tts-service");
16
+ let ConversationAiModule = class ConversationAiModule {
17
+ };
18
+ exports.ConversationAiModule = ConversationAiModule;
19
+ exports.ConversationAiModule = ConversationAiModule = __decorate([
20
+ (0, common_1.Module)({
21
+ imports: [mongoose_1.MongooseModule.forFeature([{ name: conversation_entity_1.Conversation.name, schema: conversation_entity_1.ConversationSchema }])],
22
+ controllers: [conversation_ai_controller_1.ConversationAiController],
23
+ providers: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService],
24
+ exports: [conversation_ai_service_1.ConversationAiService],
25
+ })
26
+ ], ConversationAiModule);
27
+ //# sourceMappingURL=conversation-ai.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-ai.module.js","sourceRoot":"","sources":["../../../../src/conversation-ai.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,6EAAwE;AACxE,uEAAkE;AAClE,wEAAkF;AAClF,mDAA+C;AAQxC,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,CAAC;QAC9C,OAAO,EAAE,CAAC,+CAAqB,CAAC;KACjC,CAAC;GACW,oBAAoB,CAAG"}
@@ -0,0 +1,17 @@
1
+ import { Model } from 'mongoose';
2
+ import { ChatCompletionMessageParam } from 'groq-sdk/resources/chat/completions';
3
+ import { ChatMessageDict, IConversationCard } from './clases/conversation.interface';
4
+ import { Conversation, ConversationDocument } from './entities/conversation.entity';
5
+ export declare class ConversationAiService {
6
+ private conversationModel;
7
+ private readonly groqClient;
8
+ constructor(conversationModel: Model<ConversationDocument>);
9
+ generateCompletion(prompt: string): Promise<string>;
10
+ chat(messages: ChatCompletionMessageParam[]): Promise<ChatMessageDict>;
11
+ getCompletion(prompt: string): Promise<string>;
12
+ saveConversation(conversation: IConversationCard): Promise<ConversationDocument>;
13
+ updateConversation(id: string, updateData: Partial<Conversation>): Promise<ConversationDocument>;
14
+ getConversations(): Promise<ConversationDocument[]>;
15
+ getConversationById(id: string): Promise<ConversationDocument>;
16
+ deleteConversationById(id: string): Promise<ConversationDocument>;
17
+ }
@@ -0,0 +1,105 @@
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.ConversationAiService = 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
+ const mongodb_1 = require("mongodb");
23
+ let ConversationAiService = class ConversationAiService {
24
+ constructor(conversationModel) {
25
+ this.conversationModel = conversationModel;
26
+ this.groqClient = new groq_sdk_1.default({
27
+ apiKey: process.env['GROQ_API_KEY'],
28
+ });
29
+ }
30
+ async generateCompletion(prompt) {
31
+ try {
32
+ const completion = await this.groqClient.chat.completions.create({
33
+ messages: [{ role: 'user', content: prompt }],
34
+ model: 'mixtral-8x7b-32768',
35
+ temperature: 0.7,
36
+ max_tokens: 1024,
37
+ });
38
+ return completion.choices[0]?.message?.content || '';
39
+ }
40
+ catch (error) {
41
+ throw new Error(`Failed to generate completion: ${error.message}`);
42
+ }
43
+ }
44
+ async chat(messages) {
45
+ try {
46
+ const completion = await this.groqClient.chat.completions.create({
47
+ messages,
48
+ model: 'mixtral-8x7b-32768',
49
+ temperature: 0.7,
50
+ max_tokens: 1024,
51
+ });
52
+ return {
53
+ content: completion.choices[0]?.message?.content || '',
54
+ role: conversation_interface_1.ChatRole.Assistant,
55
+ metadata: null,
56
+ };
57
+ }
58
+ catch (error) {
59
+ throw new Error(`Failed to generate completion: ${error.message}`);
60
+ }
61
+ }
62
+ async getCompletion(prompt) {
63
+ try {
64
+ const completion = await this.groqClient.chat.completions.create({
65
+ messages: [{ role: 'user', content: prompt }],
66
+ model: 'mixtral-8x7b-32768',
67
+ temperature: 0.7,
68
+ max_tokens: 1024,
69
+ });
70
+ return completion.choices[0]?.message?.content || '';
71
+ }
72
+ catch (error) {
73
+ throw new Error(`Failed to generate completion: ${error.message}`);
74
+ }
75
+ }
76
+ async saveConversation(conversation) {
77
+ if (!conversation['_id']) {
78
+ delete conversation['_id'];
79
+ }
80
+ const newConversation = new this.conversationModel(conversation);
81
+ return newConversation.save();
82
+ }
83
+ async updateConversation(id, updateData) {
84
+ const _id = new mongodb_1.ObjectId(id);
85
+ return this.conversationModel.findByIdAndUpdate(_id, updateData, { new: true }).exec();
86
+ }
87
+ async getConversations() {
88
+ return this.conversationModel.find().exec();
89
+ }
90
+ async getConversationById(id) {
91
+ const _id = new mongodb_1.ObjectId(id);
92
+ return this.conversationModel.findById(_id).exec();
93
+ }
94
+ async deleteConversationById(id) {
95
+ const _id = new mongodb_1.ObjectId(id);
96
+ return this.conversationModel.findByIdAndDelete(_id).exec();
97
+ }
98
+ };
99
+ exports.ConversationAiService = ConversationAiService;
100
+ exports.ConversationAiService = ConversationAiService = __decorate([
101
+ (0, common_1.Injectable)(),
102
+ __param(0, (0, mongoose_1.InjectModel)(conversation_entity_1.Conversation.name)),
103
+ __metadata("design:paramtypes", [mongoose_2.Model])
104
+ ], ConversationAiService);
105
+ //# sourceMappingURL=conversation-ai.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-ai.service.js","sourceRoot":"","sources":["../../../../src/conversation-ai.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AACjC,uCAA4B;AAE5B,4EAA+F;AAC/F,wEAAoF;AACpF,qCAAmC;AAG5B,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAGhC,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,kBAAkB,CAAC,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ACrC,MAAM,GAAG,GAAG,IAAI,kBAAQ,CAAC,EAAE,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,CAAC;CACF,CAAA;AApFY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAIE,WAAA,IAAA,sBAAW,EAAC,kCAAY,CAAC,IAAI,CAAC,CAAA;qCAA4B,gBAAK;GAHjE,qBAAqB,CAoFjC"}
@@ -0,0 +1,2 @@
1
+ export declare class ConversationCardsModule {
2
+ }
@@ -0,0 +1,27 @@
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_ai_service_1 = require("./conversation-ai.service");
14
+ const conversation_entity_1 = require("./entities/conversation.entity");
15
+ const tts_service_1 = require("./tts/tts-service");
16
+ let ConversationCardsModule = class ConversationCardsModule {
17
+ };
18
+ exports.ConversationCardsModule = ConversationCardsModule;
19
+ exports.ConversationCardsModule = ConversationCardsModule = __decorate([
20
+ (0, common_1.Module)({
21
+ imports: [mongoose_1.MongooseModule.forFeature([{ name: conversation_entity_1.Conversation.name, schema: conversation_entity_1.ConversationSchema }])],
22
+ controllers: [conversation_ai_controller_1.ConversationAiController],
23
+ providers: [conversation_ai_service_1.ConversationAiService, tts_service_1.TTSService],
24
+ exports: [conversation_ai_service_1.ConversationAiService],
25
+ })
26
+ ], ConversationCardsModule);
27
+ //# sourceMappingURL=conversation-cards.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-cards.module.js","sourceRoot":"","sources":["../../../../src/conversation-cards.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,6EAAwE;AACxE,uEAAkE;AAClE,wEAAkF;AAClF,mDAA+C;AAQxC,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,CAAC;QAC9C,OAAO,EAAE,CAAC,+CAAqB,CAAC;KACjC,CAAC;GACW,uBAAuB,CAAG"}
@@ -0,0 +1,2 @@
1
+ export declare class ConversationCardsService {
2
+ }
@@ -0,0 +1,17 @@
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.ConversationCardsService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ let ConversationCardsService = class ConversationCardsService {
12
+ };
13
+ exports.ConversationCardsService = ConversationCardsService;
14
+ exports.ConversationCardsService = ConversationCardsService = __decorate([
15
+ (0, common_1.Injectable)()
16
+ ], ConversationCardsService);
17
+ //# sourceMappingURL=conversation-cards.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-cards.service.js","sourceRoot":"","sources":["../../../../src/conversation-cards.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;CAAG,CAAA;AAA3B,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;GACA,wBAAwB,CAAG"}
@@ -0,0 +1,3 @@
1
+ export declare class ConversationAiController {
2
+ getCards(): Promise<string>;
3
+ }