@common_ch/common 1.0.239 → 1.0.240

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