@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,146 @@
|
|
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 ICharacterCardDC {
|
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
|
+
Default = "default",
|
110
|
+
General = "general",
|
111
|
+
Reflection = "reflection",
|
112
|
+
Challenge = "challenge",
|
113
|
+
RolePlay = "rolePlay",
|
114
|
+
RolePlayNoNarrator = "rolePlayNoNarrator",
|
115
|
+
RolePlayInnerThoughts = "rolePlayInnerThoughts",
|
116
|
+
LearningExample = "learningExample",
|
117
|
+
Scenario = "scenario"
|
118
|
+
}
|
119
|
+
export interface IConversationCard {
|
120
|
+
version: string;
|
121
|
+
id: string;
|
122
|
+
title: string;
|
123
|
+
assets: {
|
124
|
+
image: any;
|
125
|
+
};
|
126
|
+
characterCard: ICharacterCardDC;
|
127
|
+
textEngine: TextEngines;
|
128
|
+
conversationType: ConversationType;
|
129
|
+
lang: string;
|
130
|
+
tts: {
|
131
|
+
voice: string;
|
132
|
+
secondaryVoice: string;
|
133
|
+
speed: string;
|
134
|
+
speedRate: number;
|
135
|
+
};
|
136
|
+
metaApp: {
|
137
|
+
isPublished: boolean;
|
138
|
+
isPublic: any;
|
139
|
+
authorId: string;
|
140
|
+
authorEmail: string;
|
141
|
+
createdAt: Date;
|
142
|
+
updatedAt: Date;
|
143
|
+
takenCount: number;
|
144
|
+
};
|
145
|
+
}
|
146
|
+
//# sourceMappingURL=conversation.interface.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation.interface.d.ts","sourceRoot":"","sources":["../../src/models/conversation.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,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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;CACH"}
|
@@ -0,0 +1,42 @@
|
|
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["Default"] = "default";
|
33
|
+
ConversationType["General"] = "general";
|
34
|
+
ConversationType["Reflection"] = "reflection";
|
35
|
+
ConversationType["Challenge"] = "challenge";
|
36
|
+
ConversationType["RolePlay"] = "rolePlay";
|
37
|
+
ConversationType["RolePlayNoNarrator"] = "rolePlayNoNarrator";
|
38
|
+
ConversationType["RolePlayInnerThoughts"] = "rolePlayInnerThoughts";
|
39
|
+
ConversationType["LearningExample"] = "learningExample";
|
40
|
+
ConversationType["Scenario"] = "scenario";
|
41
|
+
})(ConversationType || (exports.ConversationType = ConversationType = {}));
|
42
|
+
//# sourceMappingURL=conversation.interface.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation.interface.js","sourceRoot":"","sources":["../../src/models/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,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,6CAAyB,CAAA;IACzB,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,6DAAyC,CAAA;IACzC,mEAA+C,CAAA;IAC/C,uDAAmC,CAAA;IACnC,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,gCAAhB,gBAAgB,QAU3B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=audio-transcription.service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"audio-transcription.service.d.ts","sourceRoot":"","sources":["../../src/services/audio-transcription.service.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=audio-transcription.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"audio-transcription.service.js","sourceRoot":"","sources":["../../src/services/audio-transcription.service.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Model } from 'mongoose';
|
2
|
+
import { IConversationCard } from '../models/conversation.interface';
|
3
|
+
import { Conversation, ConversationDocument } from '../entities/conversation.entity';
|
4
|
+
export declare class FiltersConfig {
|
5
|
+
page: number;
|
6
|
+
rowsPerPage: number;
|
7
|
+
sort: Record<string, any>;
|
8
|
+
filters: Record<string, any>;
|
9
|
+
text: string;
|
10
|
+
}
|
11
|
+
export declare class ConversationAiService {
|
12
|
+
private conversationModel;
|
13
|
+
private readonly groqClient;
|
14
|
+
constructor(conversationModel: Model<ConversationDocument>);
|
15
|
+
saveConversation(conversation: IConversationCard): Promise<ConversationDocument>;
|
16
|
+
updateConversation(id: string, updateData: Partial<Conversation>): Promise<ConversationDocument>;
|
17
|
+
getConversations(): Promise<ConversationDocument[]>;
|
18
|
+
queryConversations(pQuery: FiltersConfig): Promise<{
|
19
|
+
count: number;
|
20
|
+
page: number;
|
21
|
+
rows: ConversationDocument[];
|
22
|
+
rowsPerPage: number;
|
23
|
+
skip: number;
|
24
|
+
}>;
|
25
|
+
getConversationById(id: string): Promise<ConversationDocument>;
|
26
|
+
deleteConversationById(id: string): Promise<ConversationDocument>;
|
27
|
+
}
|
28
|
+
//# sourceMappingURL=conversation-ai.service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-ai.service.d.ts","sourceRoot":"","sources":["../../src/services/conversation-ai.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAErF,qBAAa,aAAa;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBACa,qBAAqB;IAGY,OAAO,CAAC,iBAAiB;IAFrE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAO;gBAEkB,iBAAiB,EAAE,KAAK,CAAC,oBAAoB,CAAC;IAM5F,gBAAgB,CAAC,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAShF,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAKhG,gBAAgB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAKnD,kBAAkB,CACtB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,oBAAoB,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IA0BtG,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAK9D,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAIxE"}
|
@@ -0,0 +1,85 @@
|
|
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 = exports.FiltersConfig = 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 mongodb_1 = require("mongodb");
|
21
|
+
const conversation_entity_1 = require("../entities/conversation.entity");
|
22
|
+
class FiltersConfig {
|
23
|
+
}
|
24
|
+
exports.FiltersConfig = FiltersConfig;
|
25
|
+
let ConversationAiService = class ConversationAiService {
|
26
|
+
constructor(conversationModel) {
|
27
|
+
this.conversationModel = conversationModel;
|
28
|
+
this.groqClient = new groq_sdk_1.default({
|
29
|
+
apiKey: process.env['GROQ_API_KEY'],
|
30
|
+
});
|
31
|
+
}
|
32
|
+
async saveConversation(conversation) {
|
33
|
+
if (!conversation['_id']) {
|
34
|
+
delete conversation['_id'];
|
35
|
+
}
|
36
|
+
const newConversation = new this.conversationModel(conversation);
|
37
|
+
return newConversation.save();
|
38
|
+
}
|
39
|
+
async updateConversation(id, updateData) {
|
40
|
+
const _id = new mongodb_1.ObjectId(id);
|
41
|
+
return this.conversationModel.findByIdAndUpdate(_id, updateData, { new: true }).exec();
|
42
|
+
}
|
43
|
+
async getConversations() {
|
44
|
+
return this.conversationModel.find().limit(5).exec();
|
45
|
+
}
|
46
|
+
async queryConversations(pQuery) {
|
47
|
+
const scenarioModel = this.conversationModel;
|
48
|
+
let skip = 0;
|
49
|
+
if (pQuery.rowsPerPage) {
|
50
|
+
skip = pQuery.rowsPerPage * pQuery.page;
|
51
|
+
}
|
52
|
+
let query;
|
53
|
+
let count = 0;
|
54
|
+
if (pQuery.text) {
|
55
|
+
pQuery.filters = { ...(pQuery.filters || {}), $text: { $search: pQuery.text } };
|
56
|
+
query = scenarioModel.find(pQuery.filters).skip(skip).limit(pQuery.rowsPerPage);
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
pQuery.filters = pQuery.filters || {};
|
60
|
+
count = await scenarioModel.countDocuments(pQuery.filters);
|
61
|
+
query = scenarioModel.find(pQuery.filters).skip(skip).limit(pQuery.rowsPerPage);
|
62
|
+
if (pQuery.sort) {
|
63
|
+
query = query.sort(pQuery.sort);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
const scenarios = await query.lean().exec();
|
67
|
+
const results = { count, page: pQuery.page, rows: scenarios, rowsPerPage: pQuery.rowsPerPage, skip };
|
68
|
+
return results;
|
69
|
+
}
|
70
|
+
async getConversationById(id) {
|
71
|
+
const _id = new mongodb_1.ObjectId(id);
|
72
|
+
return this.conversationModel.findById(_id).exec();
|
73
|
+
}
|
74
|
+
async deleteConversationById(id) {
|
75
|
+
const _id = new mongodb_1.ObjectId(id);
|
76
|
+
return this.conversationModel.findByIdAndDelete(_id).exec();
|
77
|
+
}
|
78
|
+
};
|
79
|
+
exports.ConversationAiService = ConversationAiService;
|
80
|
+
exports.ConversationAiService = ConversationAiService = __decorate([
|
81
|
+
(0, common_1.Injectable)(),
|
82
|
+
__param(0, (0, mongoose_1.InjectModel)(conversation_entity_1.Conversation.name)),
|
83
|
+
__metadata("design:paramtypes", [mongoose_2.Model])
|
84
|
+
], ConversationAiService);
|
85
|
+
//# sourceMappingURL=conversation-ai.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-ai.service.js","sourceRoot":"","sources":["../../src/services/conversation-ai.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AACjC,uCAA4B;AAE5B,qCAAmC;AAGnC,yEAAqF;AAErF,MAAa,aAAa;CAMzB;AAND,sCAMC;AAGM,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,gBAAgB,CAAC,YAA+B;QACpD,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;YACxB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;QAED,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACjE,OAAO,eAAe,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,EAAU,EAAE,UAAiC;QACpE,MAAM,GAAG,GAAG,IAAI,kBAAQ,CAAC,EAAE,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACzF,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,CAAC;IAGD,KAAK,CAA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AC,WAAW,EAAE,IAAI,EAAE,CAAC;QACrG,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,EAAU;QAClC,MAAM,GAAG,GAAG,IAAI,kBAAQ,CAAC,EAAE,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,EAAU;QACrC,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;AAjEY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;IAIE,WAAA,IAAA,sBAAW,EAAC,kCAAY,CAAC,IAAI,CAAC,CAAA;qCAA4B,gBAAK;GAHjE,qBAAqB,CAiEjC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Model } from 'mongoose';
|
2
|
+
import { ChatCompletionMessageParam } from 'groq-sdk/resources/chat/completions';
|
3
|
+
import { ChatMessageDict } from '../models/conversation.interface';
|
4
|
+
import { ConversationDocument } from '../entities/conversation.entity';
|
5
|
+
export declare class ConversationCardModelService {
|
6
|
+
private conversationModel;
|
7
|
+
private readonly groqClient;
|
8
|
+
constructor(conversationModel: Model<ConversationDocument>);
|
9
|
+
chat(messages: ChatCompletionMessageParam[]): Promise<ChatMessageDict>;
|
10
|
+
generateCompletion(prompt: string): Promise<string>;
|
11
|
+
getCompletion(prompt: string): Promise<string>;
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=conversation-card-models.service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-card-models.service.d.ts","sourceRoot":"","sources":["../../src/services/conversation-card-models.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAY,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAgB,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAErF,qBACa,4BAA4B;IAGK,OAAO,CAAC,iBAAiB;IAFrE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAO;gBAEkB,iBAAiB,EAAE,KAAK,CAAC,oBAAoB,CAAC;IAM5F,IAAI,CAAC,QAAQ,EAAE,0BAA0B,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAkBtE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAenD,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAcrD"}
|
@@ -0,0 +1,82 @@
|
|
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.ConversationCardModelService = 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("../models/conversation.interface");
|
21
|
+
const conversation_entity_1 = require("../entities/conversation.entity");
|
22
|
+
let ConversationCardModelService = class ConversationCardModelService {
|
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.ConversationCardModelService = ConversationCardModelService;
|
77
|
+
exports.ConversationCardModelService = ConversationCardModelService = __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
|
+
], ConversationCardModelService);
|
82
|
+
//# sourceMappingURL=conversation-card-models.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-card-models.service.js","sourceRoot":"","sources":["../../src/services/conversation-card-models.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAA+C;AAC/C,uCAAiC;AACjC,uCAA4B;AAG5B,6EAA6E;AAC7E,yEAAqF;AAG9E,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGvC,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,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,IAAI,KAAK,CAAC,kCAAkC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;SACpE;IACH,CAAC;CACF,CAAA;AAxDY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;IAIE,WAAA,IAAA,sBAAW,EAAC,kCAAY,CAAC,IAAI,CAAC,CAAA;qCAA4B,gBAAK;GAHjE,4BAA4B,CAwDxC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conversation-cards.service.d.ts","sourceRoot":"","sources":["../../src/services/conversation-cards.service.ts"],"names":[],"mappings":"AAEA,qBACa,wBAAwB;CAAG"}
|
@@ -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/services/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 @@
|
|
1
|
+
//# sourceMappingURL=tts-service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tts-service.d.ts","sourceRoot":"","sources":["../../src/tts/tts-service.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=tts-service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tts-service.js","sourceRoot":"","sources":["../../src/tts/tts-service.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
export declare enum AudioSpeed {
|
2
|
+
VerySlow = "VerySlow",
|
3
|
+
Slow = "Slow",
|
4
|
+
Regular = "Regular",
|
5
|
+
Fast = "Fast",
|
6
|
+
VeryFast = "VeryFast"
|
7
|
+
}
|
8
|
+
export declare enum VoiceCode {
|
9
|
+
MX = "MX"
|
10
|
+
}
|
11
|
+
export declare const GoogleVoiceHQOptions: VoiceOption[];
|
12
|
+
export declare const GoogleVoiceOptions: VoiceOption[];
|
13
|
+
export interface SynthAudioOptions {
|
14
|
+
speed?: AudioSpeed;
|
15
|
+
speed_rate?: number;
|
16
|
+
}
|
17
|
+
export interface VoiceOption {
|
18
|
+
id: string;
|
19
|
+
lang: string;
|
20
|
+
name?: string;
|
21
|
+
provider?: string;
|
22
|
+
gender?: string;
|
23
|
+
exampleUrl?: string;
|
24
|
+
}
|
25
|
+
export declare class TTSDto {
|
26
|
+
text: string;
|
27
|
+
ssml: boolean;
|
28
|
+
voice: string;
|
29
|
+
speed: AudioSpeed;
|
30
|
+
speedRate: number;
|
31
|
+
generateTranscription: boolean;
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=tts.classes.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tts.classes.d.ts","sourceRoot":"","sources":["../../src/tts/tts.classes.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,oBAAY,SAAS;IACnB,EAAE,OAAO;CACV;AAMD,eAAO,MAAM,oBAAoB,EAAE,WAAW,EAI7C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAW,EAyL3C,CAAC;AAIF,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,MAAM;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,OAAO,CAAC;CAChC"}
|