@common_ch/common 1.0.240 → 1.0.244

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.
@@ -20,10 +20,10 @@ export type Messages = {
20
20
  export interface MessageAttrs {
21
21
  userId: string;
22
22
  messageName: string;
23
- assistantChatgptId?: string;
24
23
  planId?: string;
25
24
  threadChatgptId?: string;
26
25
  chatGptTokenNumber?: number;
26
+ files?: any[];
27
27
  geminiTokenNumber?: number;
28
28
  summary?: string;
29
29
  summaryCheck?: boolean;
@@ -41,9 +41,9 @@ export interface MessageDoc extends mongoose.Document {
41
41
  userId: string;
42
42
  messageName: string;
43
43
  planId?: string;
44
- assistantChatgptId?: string;
45
44
  threadChatgptId?: string;
46
45
  chatGptTokenNumber?: number;
46
+ files?: any[];
47
47
  geminiTokenNumber?: number;
48
48
  summary?: string;
49
49
  summaryCheck?: boolean;
@@ -23,6 +23,10 @@ const messageSchema = new mongoose_1.default.Schema({
23
23
  type: Boolean,
24
24
  required: false,
25
25
  },
26
+ files: [{
27
+ type: Object,
28
+ required: false,
29
+ }],
26
30
  remainMessageForSummary: {
27
31
  type: Number,
28
32
  required: false,
@@ -32,11 +36,6 @@ const messageSchema = new mongoose_1.default.Schema({
32
36
  ref: 'Plan',
33
37
  required: false,
34
38
  },
35
- assistantChatgptId: {
36
- type: String,
37
- required: false,
38
- default: null,
39
- },
40
39
  threadChatgptId: {
41
40
  type: String,
42
41
  required: false,
@@ -111,7 +110,6 @@ const messageSchema = new mongoose_1.default.Schema({
111
110
  // messageSchema.plugin(updateIfCurrentPlugin);
112
111
  messageSchema.index({ 'updatedAt': 1 });
113
112
  messageSchema.index({ 'threadChatgptId': 1 });
114
- // messageSchema.index({ 'assistantChatgptId': 1 });
115
113
  messageSchema.index({ 'userId': 1 });
116
114
  messageSchema.index({ 'threadChatgptId': 1, 'userId': 1 });
117
115
  messageSchema.statics.build = (attrs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.240",
3
+ "version": "1.0.244",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [