@common_ch/common 1.0.308 → 1.0.309
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.
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
2
|
import { AiAttrs, AiDoc } from './ai';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
ai: string | AiAttrs | AiDoc;
|
|
7
|
-
role: 'user' | 'assistant' | 'system';
|
|
8
|
-
aiOption: string | AiOptionAttrs | AiOptionDoc;
|
|
9
|
-
runId?: string;
|
|
10
|
-
content: Content[];
|
|
11
|
-
createdAt: string;
|
|
12
|
-
};
|
|
3
|
+
import { ContentGemini } from '../../enums/message';
|
|
4
|
+
import { Messages } from './message';
|
|
5
|
+
import { FileReferenceGeminiDoc } from './fileReferenceGemini';
|
|
13
6
|
export interface SharedMessageAttrs {
|
|
14
7
|
messageId: string;
|
|
15
8
|
userId: string;
|
|
16
9
|
shareMessageCode: string;
|
|
17
10
|
messageName: string;
|
|
11
|
+
chatGptFiles?: {
|
|
12
|
+
vectorStoreId?: string;
|
|
13
|
+
fileIds?: string[];
|
|
14
|
+
};
|
|
18
15
|
threadChatgptId?: string;
|
|
19
16
|
messages: Messages[];
|
|
17
|
+
ai: string | AiAttrs | AiDoc;
|
|
18
|
+
messagesGemini: ContentGemini[];
|
|
19
|
+
fileRefs: mongoose.Types.ObjectId[] | FileReferenceGeminiDoc[];
|
|
20
20
|
createdAt?: string;
|
|
21
21
|
updatedAt?: string;
|
|
22
22
|
}
|
|
@@ -30,7 +30,14 @@ export interface SharedMessageDoc extends mongoose.Document {
|
|
|
30
30
|
userId: string;
|
|
31
31
|
messageName: string;
|
|
32
32
|
threadChatgptId?: string;
|
|
33
|
+
chatGptFiles?: {
|
|
34
|
+
vectorStoreId?: string;
|
|
35
|
+
fileIds?: string[];
|
|
36
|
+
};
|
|
33
37
|
messages: Messages[];
|
|
38
|
+
ai: string | AiAttrs | AiDoc;
|
|
39
|
+
messagesGemini: ContentGemini[];
|
|
40
|
+
fileRefs: mongoose.Types.ObjectId[] | FileReferenceGeminiDoc[];
|
|
34
41
|
version: number;
|
|
35
42
|
createdAt?: string;
|
|
36
43
|
updatedAt?: string;
|
|
@@ -27,6 +27,16 @@ const sharedMessageSchema = new mongoose_1.default.Schema({
|
|
|
27
27
|
type: String,
|
|
28
28
|
required: true,
|
|
29
29
|
},
|
|
30
|
+
chatGptFiles: {
|
|
31
|
+
vectorStoreId: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false,
|
|
34
|
+
},
|
|
35
|
+
fileIds: [{
|
|
36
|
+
type: String,
|
|
37
|
+
required: false
|
|
38
|
+
}]
|
|
39
|
+
},
|
|
30
40
|
threadChatgptId: {
|
|
31
41
|
type: String,
|
|
32
42
|
required: false,
|
|
@@ -51,16 +61,35 @@ const sharedMessageSchema = new mongoose_1.default.Schema({
|
|
|
51
61
|
type: [message_2.ContentSchema],
|
|
52
62
|
required: true,
|
|
53
63
|
},
|
|
64
|
+
contentType: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
},
|
|
54
68
|
runId: {
|
|
55
69
|
type: String,
|
|
56
70
|
required: false,
|
|
57
71
|
},
|
|
72
|
+
attachments: [{
|
|
73
|
+
contentType: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: true,
|
|
76
|
+
},
|
|
77
|
+
path: {
|
|
78
|
+
type: String,
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
name: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: true,
|
|
84
|
+
}
|
|
85
|
+
}],
|
|
58
86
|
createdAt: {
|
|
59
87
|
type: mongoose_1.default.Schema.Types.Date,
|
|
60
88
|
required: true,
|
|
61
89
|
},
|
|
62
90
|
},
|
|
63
91
|
],
|
|
92
|
+
fileRefs: [{ type: mongoose_1.default.Schema.Types.ObjectId, ref: 'FileReferenceGemini' }],
|
|
64
93
|
createdAt: mongoose_1.default.Schema.Types.Date,
|
|
65
94
|
updatedAt: mongoose_1.default.Schema.Types.Date,
|
|
66
95
|
}, {
|