@vectorx/ai-types 0.4.1 → 0.5.1
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendMessageInputSchema = exports.messageHistorySchema = exports.messageItemSchema = exports.toolResultMessageSchema = exports.toolCallMessageSchema = exports.baseMessageSchema = exports.messageContentSchema = exports.videoUrlContentSchema = exports.videoContentSchema = exports.audioContentSchema = exports.imageContentSchema = exports.textContentSchema = void 0;
|
|
3
|
+
exports.sendMessageInputSchema = exports.messageHistorySchema = exports.messageItemSchema = exports.toolResultMessageSchema = exports.toolCallMessageSchema = exports.baseMessageSchema = exports.messageContentSchema = exports.docUrlContentSchema = exports.videoUrlContentSchema = exports.videoContentSchema = exports.audioContentSchema = exports.imageContentSchema = exports.textContentSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.textContentSchema = zod_1.z.object({
|
|
6
6
|
type: zod_1.z.literal("text"),
|
|
@@ -29,12 +29,18 @@ exports.videoUrlContentSchema = zod_1.z.object({
|
|
|
29
29
|
url: zod_1.z.string(),
|
|
30
30
|
}),
|
|
31
31
|
});
|
|
32
|
+
exports.docUrlContentSchema = zod_1.z.object({
|
|
33
|
+
type: zod_1.z.literal("doc_url"),
|
|
34
|
+
doc_url: zod_1.z.array(zod_1.z.string()),
|
|
35
|
+
file_parsing_strategy: zod_1.z.string().optional(),
|
|
36
|
+
});
|
|
32
37
|
exports.messageContentSchema = zod_1.z.union([
|
|
33
38
|
exports.textContentSchema,
|
|
34
39
|
exports.imageContentSchema,
|
|
35
40
|
exports.audioContentSchema,
|
|
36
41
|
exports.videoContentSchema,
|
|
37
42
|
exports.videoUrlContentSchema,
|
|
43
|
+
exports.docUrlContentSchema,
|
|
38
44
|
]);
|
|
39
45
|
exports.baseMessageSchema = zod_1.z.object({
|
|
40
46
|
role: zod_1.z.union([zod_1.z.literal("system"), zod_1.z.literal("user"), zod_1.z.literal("assistant")]),
|
|
@@ -59,4 +65,13 @@ exports.messageHistorySchema = zod_1.z.array(exports.messageItemSchema);
|
|
|
59
65
|
exports.sendMessageInputSchema = zod_1.z.object({
|
|
60
66
|
msg: zod_1.z.string(),
|
|
61
67
|
history: exports.messageHistorySchema,
|
|
68
|
+
files: zod_1.z
|
|
69
|
+
.array(zod_1.z.object({
|
|
70
|
+
id: zod_1.z.string(),
|
|
71
|
+
filename: zod_1.z.string(),
|
|
72
|
+
purpose: zod_1.z.string(),
|
|
73
|
+
bytes: zod_1.z.number(),
|
|
74
|
+
created_at: zod_1.z.number(),
|
|
75
|
+
}))
|
|
76
|
+
.optional(),
|
|
62
77
|
});
|
package/package.json
CHANGED
|
@@ -101,13 +101,13 @@ export declare const participantInfoSchema: z.ZodObject<{
|
|
|
101
101
|
avatar_url: z.ZodString;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
103
|
name?: string;
|
|
104
|
-
desc?: string;
|
|
105
104
|
id?: string;
|
|
105
|
+
desc?: string;
|
|
106
106
|
avatar_url?: string;
|
|
107
107
|
}, {
|
|
108
108
|
name?: string;
|
|
109
|
-
desc?: string;
|
|
110
109
|
id?: string;
|
|
110
|
+
desc?: string;
|
|
111
111
|
avatar_url?: string;
|
|
112
112
|
}>;
|
|
113
113
|
export declare const conversationSchema: z.ZodObject<{
|
|
@@ -84,6 +84,19 @@ export declare const videoUrlContentSchema: z.ZodObject<{
|
|
|
84
84
|
url?: string;
|
|
85
85
|
};
|
|
86
86
|
}>;
|
|
87
|
+
export declare const docUrlContentSchema: z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<"doc_url">;
|
|
89
|
+
doc_url: z.ZodArray<z.ZodString, "many">;
|
|
90
|
+
file_parsing_strategy: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
type?: "doc_url";
|
|
93
|
+
doc_url?: string[];
|
|
94
|
+
file_parsing_strategy?: string;
|
|
95
|
+
}, {
|
|
96
|
+
type?: "doc_url";
|
|
97
|
+
doc_url?: string[];
|
|
98
|
+
file_parsing_strategy?: string;
|
|
99
|
+
}>;
|
|
87
100
|
export declare const messageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
88
101
|
type: z.ZodLiteral<"text">;
|
|
89
102
|
text: z.ZodString;
|
|
@@ -164,6 +177,18 @@ export declare const messageContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
164
177
|
video_url?: {
|
|
165
178
|
url?: string;
|
|
166
179
|
};
|
|
180
|
+
}>, z.ZodObject<{
|
|
181
|
+
type: z.ZodLiteral<"doc_url">;
|
|
182
|
+
doc_url: z.ZodArray<z.ZodString, "many">;
|
|
183
|
+
file_parsing_strategy: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
type?: "doc_url";
|
|
186
|
+
doc_url?: string[];
|
|
187
|
+
file_parsing_strategy?: string;
|
|
188
|
+
}, {
|
|
189
|
+
type?: "doc_url";
|
|
190
|
+
doc_url?: string[];
|
|
191
|
+
file_parsing_strategy?: string;
|
|
167
192
|
}>]>;
|
|
168
193
|
export declare const baseMessageSchema: z.ZodObject<{
|
|
169
194
|
role: z.ZodUnion<[z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
@@ -247,6 +272,18 @@ export declare const baseMessageSchema: z.ZodObject<{
|
|
|
247
272
|
video_url?: {
|
|
248
273
|
url?: string;
|
|
249
274
|
};
|
|
275
|
+
}>, z.ZodObject<{
|
|
276
|
+
type: z.ZodLiteral<"doc_url">;
|
|
277
|
+
doc_url: z.ZodArray<z.ZodString, "many">;
|
|
278
|
+
file_parsing_strategy: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
type?: "doc_url";
|
|
281
|
+
doc_url?: string[];
|
|
282
|
+
file_parsing_strategy?: string;
|
|
283
|
+
}, {
|
|
284
|
+
type?: "doc_url";
|
|
285
|
+
doc_url?: string[];
|
|
286
|
+
file_parsing_strategy?: string;
|
|
250
287
|
}>]>, "many">]>;
|
|
251
288
|
}, "strip", z.ZodTypeAny, {
|
|
252
289
|
role?: "user" | "assistant" | "system";
|
|
@@ -272,6 +309,10 @@ export declare const baseMessageSchema: z.ZodObject<{
|
|
|
272
309
|
video_url?: {
|
|
273
310
|
url?: string;
|
|
274
311
|
};
|
|
312
|
+
} | {
|
|
313
|
+
type?: "doc_url";
|
|
314
|
+
doc_url?: string[];
|
|
315
|
+
file_parsing_strategy?: string;
|
|
275
316
|
})[];
|
|
276
317
|
}, {
|
|
277
318
|
role?: "user" | "assistant" | "system";
|
|
@@ -297,6 +338,10 @@ export declare const baseMessageSchema: z.ZodObject<{
|
|
|
297
338
|
video_url?: {
|
|
298
339
|
url?: string;
|
|
299
340
|
};
|
|
341
|
+
} | {
|
|
342
|
+
type?: "doc_url";
|
|
343
|
+
doc_url?: string[];
|
|
344
|
+
file_parsing_strategy?: string;
|
|
300
345
|
})[];
|
|
301
346
|
}>;
|
|
302
347
|
export declare const toolCallMessageSchema: z.ZodObject<{
|
|
@@ -410,6 +455,18 @@ export declare const messageItemSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
410
455
|
video_url?: {
|
|
411
456
|
url?: string;
|
|
412
457
|
};
|
|
458
|
+
}>, z.ZodObject<{
|
|
459
|
+
type: z.ZodLiteral<"doc_url">;
|
|
460
|
+
doc_url: z.ZodArray<z.ZodString, "many">;
|
|
461
|
+
file_parsing_strategy: z.ZodOptional<z.ZodString>;
|
|
462
|
+
}, "strip", z.ZodTypeAny, {
|
|
463
|
+
type?: "doc_url";
|
|
464
|
+
doc_url?: string[];
|
|
465
|
+
file_parsing_strategy?: string;
|
|
466
|
+
}, {
|
|
467
|
+
type?: "doc_url";
|
|
468
|
+
doc_url?: string[];
|
|
469
|
+
file_parsing_strategy?: string;
|
|
413
470
|
}>]>, "many">]>;
|
|
414
471
|
}, "strip", z.ZodTypeAny, {
|
|
415
472
|
role?: "user" | "assistant" | "system";
|
|
@@ -435,6 +492,10 @@ export declare const messageItemSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
435
492
|
video_url?: {
|
|
436
493
|
url?: string;
|
|
437
494
|
};
|
|
495
|
+
} | {
|
|
496
|
+
type?: "doc_url";
|
|
497
|
+
doc_url?: string[];
|
|
498
|
+
file_parsing_strategy?: string;
|
|
438
499
|
})[];
|
|
439
500
|
}, {
|
|
440
501
|
role?: "user" | "assistant" | "system";
|
|
@@ -460,6 +521,10 @@ export declare const messageItemSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
460
521
|
video_url?: {
|
|
461
522
|
url?: string;
|
|
462
523
|
};
|
|
524
|
+
} | {
|
|
525
|
+
type?: "doc_url";
|
|
526
|
+
doc_url?: string[];
|
|
527
|
+
file_parsing_strategy?: string;
|
|
463
528
|
})[];
|
|
464
529
|
}>, z.ZodObject<{
|
|
465
530
|
role: z.ZodLiteral<"tool">;
|
|
@@ -571,6 +636,18 @@ export declare const messageHistorySchema: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
|
571
636
|
video_url?: {
|
|
572
637
|
url?: string;
|
|
573
638
|
};
|
|
639
|
+
}>, z.ZodObject<{
|
|
640
|
+
type: z.ZodLiteral<"doc_url">;
|
|
641
|
+
doc_url: z.ZodArray<z.ZodString, "many">;
|
|
642
|
+
file_parsing_strategy: z.ZodOptional<z.ZodString>;
|
|
643
|
+
}, "strip", z.ZodTypeAny, {
|
|
644
|
+
type?: "doc_url";
|
|
645
|
+
doc_url?: string[];
|
|
646
|
+
file_parsing_strategy?: string;
|
|
647
|
+
}, {
|
|
648
|
+
type?: "doc_url";
|
|
649
|
+
doc_url?: string[];
|
|
650
|
+
file_parsing_strategy?: string;
|
|
574
651
|
}>]>, "many">]>;
|
|
575
652
|
}, "strip", z.ZodTypeAny, {
|
|
576
653
|
role?: "user" | "assistant" | "system";
|
|
@@ -596,6 +673,10 @@ export declare const messageHistorySchema: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
|
596
673
|
video_url?: {
|
|
597
674
|
url?: string;
|
|
598
675
|
};
|
|
676
|
+
} | {
|
|
677
|
+
type?: "doc_url";
|
|
678
|
+
doc_url?: string[];
|
|
679
|
+
file_parsing_strategy?: string;
|
|
599
680
|
})[];
|
|
600
681
|
}, {
|
|
601
682
|
role?: "user" | "assistant" | "system";
|
|
@@ -621,6 +702,10 @@ export declare const messageHistorySchema: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
|
621
702
|
video_url?: {
|
|
622
703
|
url?: string;
|
|
623
704
|
};
|
|
705
|
+
} | {
|
|
706
|
+
type?: "doc_url";
|
|
707
|
+
doc_url?: string[];
|
|
708
|
+
file_parsing_strategy?: string;
|
|
624
709
|
})[];
|
|
625
710
|
}>, z.ZodObject<{
|
|
626
711
|
role: z.ZodLiteral<"tool">;
|
|
@@ -734,6 +819,18 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
734
819
|
video_url?: {
|
|
735
820
|
url?: string;
|
|
736
821
|
};
|
|
822
|
+
}>, z.ZodObject<{
|
|
823
|
+
type: z.ZodLiteral<"doc_url">;
|
|
824
|
+
doc_url: z.ZodArray<z.ZodString, "many">;
|
|
825
|
+
file_parsing_strategy: z.ZodOptional<z.ZodString>;
|
|
826
|
+
}, "strip", z.ZodTypeAny, {
|
|
827
|
+
type?: "doc_url";
|
|
828
|
+
doc_url?: string[];
|
|
829
|
+
file_parsing_strategy?: string;
|
|
830
|
+
}, {
|
|
831
|
+
type?: "doc_url";
|
|
832
|
+
doc_url?: string[];
|
|
833
|
+
file_parsing_strategy?: string;
|
|
737
834
|
}>]>, "many">]>;
|
|
738
835
|
}, "strip", z.ZodTypeAny, {
|
|
739
836
|
role?: "user" | "assistant" | "system";
|
|
@@ -759,6 +856,10 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
759
856
|
video_url?: {
|
|
760
857
|
url?: string;
|
|
761
858
|
};
|
|
859
|
+
} | {
|
|
860
|
+
type?: "doc_url";
|
|
861
|
+
doc_url?: string[];
|
|
862
|
+
file_parsing_strategy?: string;
|
|
762
863
|
})[];
|
|
763
864
|
}, {
|
|
764
865
|
role?: "user" | "assistant" | "system";
|
|
@@ -784,6 +885,10 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
784
885
|
video_url?: {
|
|
785
886
|
url?: string;
|
|
786
887
|
};
|
|
888
|
+
} | {
|
|
889
|
+
type?: "doc_url";
|
|
890
|
+
doc_url?: string[];
|
|
891
|
+
file_parsing_strategy?: string;
|
|
787
892
|
})[];
|
|
788
893
|
}>, z.ZodObject<{
|
|
789
894
|
role: z.ZodLiteral<"tool">;
|
|
@@ -813,6 +918,25 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
813
918
|
content?: string | any[] | Record<string, any>;
|
|
814
919
|
name?: string;
|
|
815
920
|
}>]>, "many">;
|
|
921
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
922
|
+
id: z.ZodString;
|
|
923
|
+
filename: z.ZodString;
|
|
924
|
+
purpose: z.ZodString;
|
|
925
|
+
bytes: z.ZodNumber;
|
|
926
|
+
created_at: z.ZodNumber;
|
|
927
|
+
}, "strip", z.ZodTypeAny, {
|
|
928
|
+
id?: string;
|
|
929
|
+
filename?: string;
|
|
930
|
+
purpose?: string;
|
|
931
|
+
bytes?: number;
|
|
932
|
+
created_at?: number;
|
|
933
|
+
}, {
|
|
934
|
+
id?: string;
|
|
935
|
+
filename?: string;
|
|
936
|
+
purpose?: string;
|
|
937
|
+
bytes?: number;
|
|
938
|
+
created_at?: number;
|
|
939
|
+
}>, "many">>;
|
|
816
940
|
}, "strip", z.ZodTypeAny, {
|
|
817
941
|
msg?: string;
|
|
818
942
|
history?: ({
|
|
@@ -839,6 +963,10 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
839
963
|
video_url?: {
|
|
840
964
|
url?: string;
|
|
841
965
|
};
|
|
966
|
+
} | {
|
|
967
|
+
type?: "doc_url";
|
|
968
|
+
doc_url?: string[];
|
|
969
|
+
file_parsing_strategy?: string;
|
|
842
970
|
})[];
|
|
843
971
|
} | {
|
|
844
972
|
function?: string;
|
|
@@ -850,6 +978,13 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
850
978
|
content?: string | any[] | Record<string, any>;
|
|
851
979
|
name?: string;
|
|
852
980
|
})[];
|
|
981
|
+
files?: {
|
|
982
|
+
id?: string;
|
|
983
|
+
filename?: string;
|
|
984
|
+
purpose?: string;
|
|
985
|
+
bytes?: number;
|
|
986
|
+
created_at?: number;
|
|
987
|
+
}[];
|
|
853
988
|
}, {
|
|
854
989
|
msg?: string;
|
|
855
990
|
history?: ({
|
|
@@ -876,6 +1011,10 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
876
1011
|
video_url?: {
|
|
877
1012
|
url?: string;
|
|
878
1013
|
};
|
|
1014
|
+
} | {
|
|
1015
|
+
type?: "doc_url";
|
|
1016
|
+
doc_url?: string[];
|
|
1017
|
+
file_parsing_strategy?: string;
|
|
879
1018
|
})[];
|
|
880
1019
|
} | {
|
|
881
1020
|
function?: string;
|
|
@@ -887,6 +1026,13 @@ export declare const sendMessageInputSchema: z.ZodObject<{
|
|
|
887
1026
|
content?: string | any[] | Record<string, any>;
|
|
888
1027
|
name?: string;
|
|
889
1028
|
})[];
|
|
1029
|
+
files?: {
|
|
1030
|
+
id?: string;
|
|
1031
|
+
filename?: string;
|
|
1032
|
+
purpose?: string;
|
|
1033
|
+
bytes?: number;
|
|
1034
|
+
created_at?: number;
|
|
1035
|
+
}[];
|
|
890
1036
|
}>;
|
|
891
1037
|
export type TextContent = z.infer<typeof textContentSchema>;
|
|
892
1038
|
export type ImageContent = z.infer<typeof imageContentSchema>;
|