@dataclouder/conversation-card-nestjs 0.0.26 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/controllers/conversation-ai.controller.d.ts +19 -0
- package/dist/controllers/conversation-ai.controller.d.ts.map +1 -0
- package/dist/controllers/conversation-ai.controller.js +136 -0
- package/dist/controllers/conversation-ai.controller.js.map +1 -0
- package/dist/controllers/conversation.controller.d.ts +4 -0
- package/dist/controllers/conversation.controller.d.ts.map +1 -0
- package/dist/controllers/conversation.controller.js +33 -0
- package/dist/controllers/conversation.controller.js.map +1 -0
- package/dist/conversation-cards.module.d.ts +3 -0
- package/dist/conversation-cards.module.d.ts.map +1 -0
- package/dist/conversation-cards.module.js +27 -0
- package/dist/conversation-cards.module.js.map +1 -0
- package/dist/dto/create-conversation.dto.d.ts +18 -0
- package/dist/dto/create-conversation.dto.d.ts.map +1 -0
- package/dist/dto/create-conversation.dto.js +42 -0
- package/dist/dto/create-conversation.dto.js.map +1 -0
- package/dist/entities/conversation.entity.d.ts +68 -0
- package/dist/entities/conversation.entity.d.ts.map +1 -0
- package/dist/entities/conversation.entity.js +97 -0
- package/dist/entities/conversation.entity.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/models/conversation.interface.d.ts +146 -0
- package/dist/models/conversation.interface.d.ts.map +1 -0
- package/dist/models/conversation.interface.js +42 -0
- package/dist/models/conversation.interface.js.map +1 -0
- package/dist/services/audio-transcription.service.d.ts +1 -0
- package/dist/services/audio-transcription.service.d.ts.map +1 -0
- package/dist/services/audio-transcription.service.js +1 -0
- package/dist/services/audio-transcription.service.js.map +1 -0
- package/dist/services/conversation-ai.service.d.ts +28 -0
- package/dist/services/conversation-ai.service.d.ts.map +1 -0
- package/dist/services/conversation-ai.service.js +85 -0
- package/dist/services/conversation-ai.service.js.map +1 -0
- package/dist/services/conversation-card-models.service.d.ts +13 -0
- package/dist/services/conversation-card-models.service.d.ts.map +1 -0
- package/dist/services/conversation-card-models.service.js +82 -0
- package/dist/services/conversation-card-models.service.js.map +1 -0
- package/dist/services/conversation-cards.service.d.ts +3 -0
- package/dist/services/conversation-cards.service.d.ts.map +1 -0
- package/dist/services/conversation-cards.service.js +17 -0
- package/dist/services/conversation-cards.service.js.map +1 -0
- package/dist/tts/tts-service.d.ts +1 -0
- package/dist/tts/tts-service.d.ts.map +1 -0
- package/dist/tts/tts-service.js +1 -0
- package/dist/tts/tts-service.js.map +1 -0
- package/dist/tts/tts.classes.d.ts +33 -0
- package/dist/tts/tts.classes.d.ts.map +1 -0
- package/dist/tts/tts.classes.js +200 -0
- package/dist/tts/tts.classes.js.map +1 -0
- package/dist/tts/voices.d.ts +4 -0
- package/dist/tts/voices.d.ts.map +1 -0
- package/dist/tts/voices.js +208 -0
- package/dist/tts/voices.js.map +1 -0
- package/package.json +1 -1
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ConversationAiService, FiltersConfig } from '../services/conversation-ai.service';
|
2
|
+
import { ConversationDTO } from '../dto/create-conversation.dto';
|
3
|
+
import { ChatMessageDict, IConversationCard } from '../models/conversation.interface';
|
4
|
+
import { Conversation, ConversationDocument } from '../entities/conversation.entity';
|
5
|
+
import { ConversationCardModelService } from '../services/conversation-card-models.service';
|
6
|
+
export declare class ConversationAiController {
|
7
|
+
private readonly conversationAiService;
|
8
|
+
private readonly aiModel;
|
9
|
+
constructor(conversationAiService: ConversationAiService, aiModel: ConversationCardModelService);
|
10
|
+
getConversations(): Promise<ConversationDocument[]>;
|
11
|
+
saveConversation(conversation: IConversationCard): Promise<ConversationDocument>;
|
12
|
+
findScenario(filters: FiltersConfig): Promise<any>;
|
13
|
+
getConversationById(id: string): Promise<ConversationDocument>;
|
14
|
+
updateConversation(id: string, updateData: Partial<Conversation>): Promise<ConversationDocument>;
|
15
|
+
deleteConversationById(id: string): Promise<ConversationDocument>;
|
16
|
+
continueConversation(conversation: ConversationDTO): Promise<ChatMessageDict>;
|
17
|
+
test(): Promise<string>;
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=conversation-ai.controller.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-ai.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/conversation-ai.controller.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAe,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAE5F,qBAEa,wBAAwB;IAEjC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,qBAAqB,EAAE,qBAAqB,EAC5C,OAAO,EAAE,4BAA4B;IAMlD,gBAAgB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAQnD,gBAAgB,CAAS,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAMxF,YAAY,CAAS,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;IAiB1D,mBAAmB,CAAc,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAO3E,kBAAkB,CAAc,EAAE,EAAE,MAAM,EAAU,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAOrH,sBAAsB,CAAc,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAO9E,oBAAoB,CAAS,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAWrF,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;CAI9B"}
|
@@ -0,0 +1,136 @@
|
|
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("../models/conversation.interface");
|
21
|
+
const conversation_entity_1 = require("../entities/conversation.entity");
|
22
|
+
const conversation_card_models_service_1 = require("../services/conversation-card-models.service");
|
23
|
+
let ConversationAiController = class ConversationAiController {
|
24
|
+
constructor(conversationAiService, aiModel) {
|
25
|
+
this.conversationAiService = conversationAiService;
|
26
|
+
this.aiModel = aiModel;
|
27
|
+
}
|
28
|
+
async getConversations() {
|
29
|
+
console.log('getConversations');
|
30
|
+
return this.conversationAiService.getConversations();
|
31
|
+
}
|
32
|
+
async saveConversation(conversation) {
|
33
|
+
return this.conversationAiService.saveConversation(conversation);
|
34
|
+
}
|
35
|
+
async findScenario(filters) {
|
36
|
+
const conversations = await this.conversationAiService.queryConversations(filters);
|
37
|
+
return conversations;
|
38
|
+
}
|
39
|
+
async getConversationById(id) {
|
40
|
+
return this.conversationAiService.getConversationById(id);
|
41
|
+
}
|
42
|
+
async updateConversation(id, updateData) {
|
43
|
+
return this.conversationAiService.updateConversation(id, updateData);
|
44
|
+
}
|
45
|
+
async deleteConversationById(id) {
|
46
|
+
return this.conversationAiService.deleteConversationById(id);
|
47
|
+
}
|
48
|
+
async continueConversation(conversation) {
|
49
|
+
const messages = conversation.messages;
|
50
|
+
console.log('messages', messages);
|
51
|
+
const response = await this.aiModel.chat(messages);
|
52
|
+
console.log('response', response);
|
53
|
+
return response;
|
54
|
+
}
|
55
|
+
async test() {
|
56
|
+
return 'Hello World' + conversation_interface_1.TextEngines.MarkdownMultiMessages;
|
57
|
+
}
|
58
|
+
};
|
59
|
+
exports.ConversationAiController = ConversationAiController;
|
60
|
+
__decorate([
|
61
|
+
(0, common_1.Get)('/conversation'),
|
62
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get all conversations' }),
|
63
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Return all conversations.' }),
|
64
|
+
__metadata("design:type", Function),
|
65
|
+
__metadata("design:paramtypes", []),
|
66
|
+
__metadata("design:returntype", Promise)
|
67
|
+
], ConversationAiController.prototype, "getConversations", null);
|
68
|
+
__decorate([
|
69
|
+
(0, common_1.Post)('/conversation'),
|
70
|
+
(0, swagger_1.ApiOperation)({ summary: 'Save new conversations' }),
|
71
|
+
(0, swagger_1.ApiResponse)({ status: 201, description: 'The conversation has been successfully created.', type: conversation_entity_1.Conversation }),
|
72
|
+
__param(0, (0, common_1.Body)()),
|
73
|
+
__metadata("design:type", Function),
|
74
|
+
__metadata("design:paramtypes", [Object]),
|
75
|
+
__metadata("design:returntype", Promise)
|
76
|
+
], ConversationAiController.prototype, "saveConversation", null);
|
77
|
+
__decorate([
|
78
|
+
(0, common_1.Post)('/conversation/query'),
|
79
|
+
(0, swagger_1.ApiOperation)({ summary: 'get scenarios', description: 'Get scenarios paginated' }),
|
80
|
+
__param(0, (0, common_1.Body)()),
|
81
|
+
__metadata("design:type", Function),
|
82
|
+
__metadata("design:paramtypes", [conversation_ai_service_1.FiltersConfig]),
|
83
|
+
__metadata("design:returntype", Promise)
|
84
|
+
], ConversationAiController.prototype, "findScenario", null);
|
85
|
+
__decorate([
|
86
|
+
(0, common_1.Get)('/conversation/:id'),
|
87
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get a conversation by ID' }),
|
88
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Return the conversation.' }),
|
89
|
+
__param(0, (0, common_1.Param)('id')),
|
90
|
+
__metadata("design:type", Function),
|
91
|
+
__metadata("design:paramtypes", [String]),
|
92
|
+
__metadata("design:returntype", Promise)
|
93
|
+
], ConversationAiController.prototype, "getConversationById", null);
|
94
|
+
__decorate([
|
95
|
+
(0, common_1.Put)('/conversation/:id'),
|
96
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update a conversation by ID' }),
|
97
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'The conversation has been successfully updated.', type: conversation_entity_1.Conversation }),
|
98
|
+
__param(0, (0, common_1.Param)('id')),
|
99
|
+
__param(1, (0, common_1.Body)()),
|
100
|
+
__metadata("design:type", Function),
|
101
|
+
__metadata("design:paramtypes", [String, Object]),
|
102
|
+
__metadata("design:returntype", Promise)
|
103
|
+
], ConversationAiController.prototype, "updateConversation", null);
|
104
|
+
__decorate([
|
105
|
+
(0, common_1.Delete)('/conversation/:id'),
|
106
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete a conversation by ID' }),
|
107
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Return the deleted conversation.' }),
|
108
|
+
__param(0, (0, common_1.Param)('id')),
|
109
|
+
__metadata("design:type", Function),
|
110
|
+
__metadata("design:paramtypes", [String]),
|
111
|
+
__metadata("design:returntype", Promise)
|
112
|
+
], ConversationAiController.prototype, "deleteConversationById", null);
|
113
|
+
__decorate([
|
114
|
+
(0, common_1.Post)('/chat'),
|
115
|
+
(0, swagger_1.ApiOperation)({ summary: 'Continue the conversation' }),
|
116
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Return the conversation.' }),
|
117
|
+
__param(0, (0, common_1.Body)()),
|
118
|
+
__metadata("design:type", Function),
|
119
|
+
__metadata("design:paramtypes", [create_conversation_dto_1.ConversationDTO]),
|
120
|
+
__metadata("design:returntype", Promise)
|
121
|
+
], ConversationAiController.prototype, "continueConversation", null);
|
122
|
+
__decorate([
|
123
|
+
(0, common_1.Get)('/test'),
|
124
|
+
(0, swagger_1.ApiOperation)({ summary: 'Test the conversation AI' }),
|
125
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Return the test result.' }),
|
126
|
+
__metadata("design:type", Function),
|
127
|
+
__metadata("design:paramtypes", []),
|
128
|
+
__metadata("design:returntype", Promise)
|
129
|
+
], ConversationAiController.prototype, "test", null);
|
130
|
+
exports.ConversationAiController = ConversationAiController = __decorate([
|
131
|
+
(0, swagger_1.ApiTags)('conversation-ai-cards'),
|
132
|
+
(0, common_1.Controller)('api/conversation-ai-cards'),
|
133
|
+
__metadata("design:paramtypes", [conversation_ai_service_1.ConversationAiService,
|
134
|
+
conversation_card_models_service_1.ConversationCardModelService])
|
135
|
+
], ConversationAiController);
|
136
|
+
//# sourceMappingURL=conversation-ai.controller.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-ai.controller.js","sourceRoot":"","sources":["../../src/controllers/conversation-ai.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsF;AACtF,6CAAqE;AAErE,iFAA2F;AAC3F,4EAAiE;AACjE,6EAAmG;AACnG,yEAAqF;AAGrF,mGAA4F;AAIrF,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YACmB,qBAA4C,EAC5C,OAAqC;QADrC,0BAAqB,GAArB,qBAAqB,CAAuB;Q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|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation.controller.js","sourceRoot":"","sources":["../../src/controllers/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"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-cards.module.d.ts","sourceRoot":"","sources":["../src/conversation-cards.module.ts"],"names":[],"mappings":"AAQA,qBAMa,uBAAuB;CAAG"}
|
@@ -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("./controllers/conversation-ai.controller");
|
13
|
+
const conversation_entity_1 = require("./entities/conversation.entity");
|
14
|
+
const conversation_card_models_service_1 = require("./services/conversation-card-models.service");
|
15
|
+
const conversation_ai_service_1 = require("./services/conversation-ai.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, conversation_card_models_service_1.ConversationCardModelService],
|
24
|
+
exports: [conversation_ai_service_1.ConversationAiService, conversation_card_models_service_1.ConversationCardModelService],
|
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,yFAAoF;AACpF,wEAAkF;AAElF,kGAA2F;AAC3F,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,+DAA4B,CAAC;QAChE,OAAO,EAAE,CAAC,+CAAqB,EAAE,+DAA4B,CAAC;KAC/D,CAAC;GACW,uBAAuB,CAAG"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { ChatMessage, ConversationType } from '../models/conversation.interface';
|
2
|
+
export declare class CreateConversationDto {
|
3
|
+
message: string;
|
4
|
+
userId: string;
|
5
|
+
context?: Record<string, any>;
|
6
|
+
}
|
7
|
+
export declare class ConversationDTO {
|
8
|
+
id?: string;
|
9
|
+
entityId?: string;
|
10
|
+
type?: ConversationType;
|
11
|
+
createdAt?: Date;
|
12
|
+
messages: Array<ChatMessage>;
|
13
|
+
transcription?: boolean;
|
14
|
+
modelName?: string;
|
15
|
+
provider?: string;
|
16
|
+
returnJson?: boolean;
|
17
|
+
}
|
18
|
+
//# sourceMappingURL=create-conversation.dto.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"create-conversation.dto.d.ts","sourceRoot":"","sources":["../../src/dto/create-conversation.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,qBAAa,qBAAqB;IAKhC,OAAO,EAAE,MAAM,CAAC;IAMhB,MAAM,EAAE,MAAM,CAAC;IAOf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED,qBAAa,eAAe;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
@@ -0,0 +1,42 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"create-conversation.dto.js","sourceRoot":"","sources":["../../src/dto/create-conversation.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6CAA8C;AAG9C,MAAa,qBAAqB;CAmBjC;AAnBD,sDAmBC;AAdC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,kCAAkC;KAC5C,CAAC;;sDACc;AAMhB;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,8CAA8C;QAC3D,OAAO,EAAE,SAAS;KACnB,CAAC;;qDACa;AAOf;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yCAAyC;QACtD,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,EAAE,eAAe,EAAE,0BAA0B,EAAE;KACzD,CAAC;;sDAC4B;AAGhC,MAAa,eAAe;CAU3B;AAVD,0CAUC"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
6
|
+
/// <reference types="mongoose/types/document" />
|
7
|
+
/// <reference types="mongoose/types/error" />
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
12
|
+
/// <reference types="mongoose/types/models" />
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
16
|
+
/// <reference types="mongoose/types/query" />
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
19
|
+
/// <reference types="mongoose/types/session" />
|
20
|
+
/// <reference types="mongoose/types/types" />
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
26
|
+
import { Document, Schema as MongooseSchema } from 'mongoose';
|
27
|
+
import { ConversationType, TextEngines, IConversationCard, ICharacterCardDC } from '../models/conversation.interface';
|
28
|
+
export type ConversationDocument = Conversation & Document;
|
29
|
+
export declare class Conversation implements IConversationCard {
|
30
|
+
_id: MongooseSchema.Types.ObjectId;
|
31
|
+
id: string;
|
32
|
+
version: string;
|
33
|
+
title: string;
|
34
|
+
characterCard: ICharacterCardDC;
|
35
|
+
textEngine: TextEngines;
|
36
|
+
conversationType: ConversationType;
|
37
|
+
lang: string;
|
38
|
+
assets: {
|
39
|
+
image: any;
|
40
|
+
};
|
41
|
+
tts: {
|
42
|
+
voice: string;
|
43
|
+
secondaryVoice: string;
|
44
|
+
speed: string;
|
45
|
+
speedRate: number;
|
46
|
+
};
|
47
|
+
voice: string;
|
48
|
+
secondaryVoice: string;
|
49
|
+
speed: string;
|
50
|
+
speedRate: number;
|
51
|
+
metaApp: {
|
52
|
+
isPublished: boolean;
|
53
|
+
isPublic: boolean;
|
54
|
+
authorId: string;
|
55
|
+
authorEmail: string;
|
56
|
+
createdAt: Date;
|
57
|
+
updatedAt: Date;
|
58
|
+
takenCount: number;
|
59
|
+
};
|
60
|
+
createdAt: Date;
|
61
|
+
updatedAt: Date;
|
62
|
+
}
|
63
|
+
export declare const ConversationSchema: MongooseSchema<Conversation, import("mongoose").Model<Conversation, any, any, any, Document<unknown, any, Conversation> & Conversation & Required<{
|
64
|
+
_id: MongooseSchema.Types.ObjectId;
|
65
|
+
}>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Conversation, Document<unknown, {}, import("mongoose").FlatRecord<Conversation>> & import("mongoose").FlatRecord<Conversation> & Required<{
|
66
|
+
_id: MongooseSchema.Types.ObjectId;
|
67
|
+
}>>;
|
68
|
+
//# sourceMappingURL=conversation.entity.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation.entity.d.ts","sourceRoot":"","sources":["../../src/entities/conversation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEtH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE3D,qBACa,YAAa,YAAW,iBAAiB;IAEpD,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,QAAQ,CAAC;IAGnC,EAAE,EAAE,MAAM,CAAC;IAGX,OAAO,EAAE,MAAM,CAAC;IAGhB,KAAK,EAAE,MAAM,CAAC;IAGd,aAAa,EAAE,gBAAgB,CAAC;IAGhC,UAAU,EAAE,WAAW,CAAC;IAGxB,gBAAgB,EAAE,gBAAgB,CAAC;IAGnC,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE;QACN,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;IAGF,GAAG,EAAE;QACH,KAAK,EAAE,MAAM,CAAC;QACd,cAAc,EAAE,MAAM,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAGF,KAAK,EAAE,MAAM,CAAC;IAGd,cAAc,EAAE,MAAM,CAAC;IAGvB,KAAK,EAAE,MAAM,CAAC;IAGd,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE;QACP,WAAW,EAAE,OAAO,CAAC;QACrB,QAAQ,EAAE,OAAO,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,IAAI,CAAC;QAChB,SAAS,EAAE,IAAI,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAGF,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB;;;;GAA6C,CAAC"}
|
@@ -0,0 +1,97 @@
|
|
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.ConversationSchema = exports.Conversation = void 0;
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
14
|
+
const mongoose_2 = require("mongoose");
|
15
|
+
const conversation_interface_1 = require("../models/conversation.interface");
|
16
|
+
let Conversation = class Conversation {
|
17
|
+
};
|
18
|
+
exports.Conversation = Conversation;
|
19
|
+
__decorate([
|
20
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
|
21
|
+
__metadata("design:type", mongoose_2.Schema.Types.ObjectId)
|
22
|
+
], Conversation.prototype, "_id", void 0);
|
23
|
+
__decorate([
|
24
|
+
(0, mongoose_1.Prop)(),
|
25
|
+
__metadata("design:type", String)
|
26
|
+
], Conversation.prototype, "id", void 0);
|
27
|
+
__decorate([
|
28
|
+
(0, mongoose_1.Prop)({ required: false }),
|
29
|
+
__metadata("design:type", String)
|
30
|
+
], Conversation.prototype, "version", void 0);
|
31
|
+
__decorate([
|
32
|
+
(0, mongoose_1.Prop)({ required: false }),
|
33
|
+
__metadata("design:type", String)
|
34
|
+
], Conversation.prototype, "title", void 0);
|
35
|
+
__decorate([
|
36
|
+
(0, mongoose_1.Prop)({ type: Object, required: false }),
|
37
|
+
__metadata("design:type", Object)
|
38
|
+
], Conversation.prototype, "characterCard", void 0);
|
39
|
+
__decorate([
|
40
|
+
(0, mongoose_1.Prop)({ required: true, enum: conversation_interface_1.TextEngines }),
|
41
|
+
__metadata("design:type", String)
|
42
|
+
], Conversation.prototype, "textEngine", void 0);
|
43
|
+
__decorate([
|
44
|
+
(0, mongoose_1.Prop)({ required: true, enum: conversation_interface_1.ConversationType }),
|
45
|
+
__metadata("design:type", String)
|
46
|
+
], Conversation.prototype, "conversationType", void 0);
|
47
|
+
__decorate([
|
48
|
+
(0, mongoose_1.Prop)({ required: false }),
|
49
|
+
__metadata("design:type", String)
|
50
|
+
], Conversation.prototype, "lang", void 0);
|
51
|
+
__decorate([
|
52
|
+
(0, mongoose_1.Prop)({ type: Object, required: false }),
|
53
|
+
__metadata("design:type", Object)
|
54
|
+
], Conversation.prototype, "assets", void 0);
|
55
|
+
__decorate([
|
56
|
+
(0, mongoose_1.Prop)({ type: Object, required: false }),
|
57
|
+
__metadata("design:type", Object)
|
58
|
+
], Conversation.prototype, "tts", void 0);
|
59
|
+
__decorate([
|
60
|
+
(0, mongoose_1.Prop)({ required: false }),
|
61
|
+
__metadata("design:type", String)
|
62
|
+
], Conversation.prototype, "voice", void 0);
|
63
|
+
__decorate([
|
64
|
+
(0, mongoose_1.Prop)({ required: false }),
|
65
|
+
__metadata("design:type", String)
|
66
|
+
], Conversation.prototype, "secondaryVoice", void 0);
|
67
|
+
__decorate([
|
68
|
+
(0, mongoose_1.Prop)({ required: false }),
|
69
|
+
__metadata("design:type", String)
|
70
|
+
], Conversation.prototype, "speed", void 0);
|
71
|
+
__decorate([
|
72
|
+
(0, mongoose_1.Prop)({ required: false }),
|
73
|
+
__metadata("design:type", Number)
|
74
|
+
], Conversation.prototype, "speedRate", void 0);
|
75
|
+
__decorate([
|
76
|
+
(0, mongoose_1.Prop)({ type: Object, required: false }),
|
77
|
+
__metadata("design:type", Object)
|
78
|
+
], Conversation.prototype, "metaApp", void 0);
|
79
|
+
__decorate([
|
80
|
+
(0, mongoose_1.Prop)(),
|
81
|
+
__metadata("design:type", Date)
|
82
|
+
], Conversation.prototype, "createdAt", void 0);
|
83
|
+
__decorate([
|
84
|
+
(0, mongoose_1.Prop)(),
|
85
|
+
__metadata("design:type", Date)
|
86
|
+
], Conversation.prototype, "updatedAt", void 0);
|
87
|
+
exports.Conversation = Conversation = __decorate([
|
88
|
+
(0, mongoose_1.Schema)({ timestamps: true, collection: 'conversation_cards' })
|
89
|
+
], Conversation);
|
90
|
+
exports.ConversationSchema = mongoose_1.SchemaFactory.createForClass(Conversation);
|
91
|
+
exports.ConversationSchema.pre('save', function (next) {
|
92
|
+
if (this.isNew) {
|
93
|
+
this.id = this._id.toString();
|
94
|
+
}
|
95
|
+
next();
|
96
|
+
});
|
97
|
+
//# sourceMappingURL=conversation.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation.entity.js","sourceRoot":"","sources":["../../src/entities/conversation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA8D;AAC9D,6EAAsH;AAK/G,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkExB,CAAA;AAlEY,oCAAY;AAEvB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,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,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CAStC;AAGF;IADC,IAAA,eAAI,GAAE;8BACI,IAAI;+CAAC;AAGhB;IADC,IAAA,eAAI,GAAE;8BACI,IAAI;+CAAC;uBAjEL,YAAY;IADxB,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;GAClD,YAAY,CAkExB;AAEY,QAAA,kBAAkB,GAAG,wBAAa,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;AAE7E,0BAAkB,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,IAAI;IAC3C,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;KAC/B;IACD,IAAI,EAAE,CAAC;AACT,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
export * from './conversation-cards.module';
|
2
|
+
export * from './services/conversation-cards.service';
|
3
|
+
export * from './controllers/conversation-ai.controller';
|
4
|
+
export * from './services/conversation-ai.service';
|
5
|
+
export * from './services/conversation-card-models.service';
|
6
|
+
export * from './models/conversation.interface';
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC"}
|
package/dist/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./conversation-cards.module"), exports);
|
18
|
+
__exportStar(require("./services/conversation-cards.service"), exports);
|
19
|
+
__exportStar(require("./controllers/conversation-ai.controller"), exports);
|
20
|
+
__exportStar(require("./services/conversation-ai.service"), exports);
|
21
|
+
__exportStar(require("./services/conversation-card-models.service"), exports);
|
22
|
+
__exportStar(require("./models/conversation.interface"), exports);
|
23
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,wEAAsD;AACtD,2EAAyD;AACzD,qEAAmD;AACnD,8EAA4D;AAC5D,kEAAgD"}
|