@common_ch/common 1.0.260 → 1.0.261
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.
|
@@ -8,6 +8,9 @@ export type Content = {
|
|
|
8
8
|
} | {
|
|
9
9
|
type: 'input_text';
|
|
10
10
|
text: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'output_text';
|
|
13
|
+
text: string;
|
|
11
14
|
};
|
|
12
15
|
export type Attachment = {
|
|
13
16
|
contentType: string;
|
|
@@ -73,17 +76,17 @@ export interface MessageDoc extends mongoose.Document {
|
|
|
73
76
|
export declare const ContentSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
74
77
|
_id: false;
|
|
75
78
|
}, {
|
|
76
|
-
type: "input_image" | "input_text";
|
|
79
|
+
type: "input_image" | "input_text" | "output_text";
|
|
77
80
|
text?: string | null | undefined;
|
|
78
81
|
file_id?: string | null | undefined;
|
|
79
82
|
detail?: "auto" | null | undefined;
|
|
80
83
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
81
|
-
type: "input_image" | "input_text";
|
|
84
|
+
type: "input_image" | "input_text" | "output_text";
|
|
82
85
|
text?: string | null | undefined;
|
|
83
86
|
file_id?: string | null | undefined;
|
|
84
87
|
detail?: "auto" | null | undefined;
|
|
85
88
|
}>> & mongoose.FlatRecord<{
|
|
86
|
-
type: "input_image" | "input_text";
|
|
89
|
+
type: "input_image" | "input_text" | "output_text";
|
|
87
90
|
text?: string | null | undefined;
|
|
88
91
|
file_id?: string | null | undefined;
|
|
89
92
|
detail?: "auto" | null | undefined;
|
|
@@ -10,7 +10,7 @@ exports.ContentSchema = new mongoose_1.default.Schema({
|
|
|
10
10
|
type: {
|
|
11
11
|
type: String,
|
|
12
12
|
required: true,
|
|
13
|
-
enum: ["input_image", "input_text"],
|
|
13
|
+
enum: ["input_image", "input_text", "output_text"],
|
|
14
14
|
},
|
|
15
15
|
file_id: {
|
|
16
16
|
type: String,
|
|
@@ -28,7 +28,7 @@ exports.ContentSchema = new mongoose_1.default.Schema({
|
|
|
28
28
|
text: {
|
|
29
29
|
type: String,
|
|
30
30
|
required: function () {
|
|
31
|
-
return this.type === "input_text";
|
|
31
|
+
return this.type === "input_text" || this.type === "output_text";
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
}, { _id: false });
|