@cool-digital-solutions/interferir-models 1.0.35 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,8 +17,14 @@ const aiConversationSchema = new mongoose_1.Schema({
17
17
  content: { type: String, required: true },
18
18
  token: { type: Number, required: true },
19
19
  messageDate: { type: Number, required: true },
20
+ isLiked: { type: Boolean, required: true },
21
+ comment: { type: String, required: true },
22
+ reason: { type: String, enum: ai_conversation_type_1.IMessageReason, required: true },
23
+ title: { type: String, required: false },
20
24
  },
21
25
  ],
26
+ cost: { type: Number, required: false },
27
+ autoGenerated: { type: Boolean, default: false },
22
28
  createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
23
29
  updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User', default: null },
24
30
  updatedDate: Number,
@@ -29,17 +29,28 @@ export declare enum ROLE {
29
29
  USER = "user",
30
30
  ASSISTANT = "assistant"
31
31
  }
32
+ export declare enum IMessageReason {
33
+ IRRELEVANT_ANSWER = "Irrelevant answer",
34
+ INACCURATE_INFORMATION = "Inaccurate information",
35
+ INADEQUATE_RESPONSE = "Inadequate response"
36
+ }
32
37
  interface IMessage {
33
38
  role: ROLE;
34
39
  content: string;
35
40
  token: number;
36
41
  messageDate: number;
42
+ isLiked: boolean;
43
+ comment: string;
44
+ reason: IMessageReason;
45
+ title?: string;
37
46
  }
38
47
  export interface IAiConversation extends BaseSchema {
39
48
  userId: Types.ObjectId | IUser;
40
49
  title: string;
41
50
  summary: string;
42
51
  messages: IMessage[];
52
+ cost?: number;
53
+ autoGenerated: boolean;
43
54
  }
44
55
  export interface IAiConversationModel extends BaseModel<IAiConversation> {
45
56
  }
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROLE = void 0;
3
+ exports.IMessageReason = exports.ROLE = void 0;
4
4
  var ROLE;
5
5
  (function (ROLE) {
6
6
  ROLE["USER"] = "user";
7
7
  ROLE["ASSISTANT"] = "assistant";
8
8
  })(ROLE || (exports.ROLE = ROLE = {}));
9
+ var IMessageReason;
10
+ (function (IMessageReason) {
11
+ IMessageReason["IRRELEVANT_ANSWER"] = "Irrelevant answer";
12
+ IMessageReason["INACCURATE_INFORMATION"] = "Inaccurate information";
13
+ IMessageReason["INADEQUATE_RESPONSE"] = "Inadequate response";
14
+ })(IMessageReason || (exports.IMessageReason = IMessageReason = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cool-digital-solutions/interferir-models",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"