@meetkai/mka1 0.54.7 → 0.54.9
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.
- package/bin/mcp-server.js +509 -370
- package/bin/mcp-server.js.map +37 -34
- package/dist/commonjs/hooks/multipartFilename.d.ts +12 -0
- package/dist/commonjs/hooks/multipartFilename.d.ts.map +1 -0
- package/dist/commonjs/hooks/multipartFilename.js +50 -0
- package/dist/commonjs/hooks/multipartFilename.js.map +1 -0
- package/dist/commonjs/hooks/registration.d.ts.map +1 -1
- package/dist/commonjs/hooks/registration.js +2 -1
- package/dist/commonjs/hooks/registration.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/agentschedulespec.d.ts +2 -1
- package/dist/commonjs/models/components/agentschedulespec.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentschedulespec.js +6 -5
- package/dist/commonjs/models/components/agentschedulespec.js.map +1 -1
- package/dist/commonjs/models/components/chunkingstrategy.d.ts +2 -1
- package/dist/commonjs/models/components/chunkingstrategy.d.ts.map +1 -1
- package/dist/commonjs/models/components/chunkingstrategy.js +6 -5
- package/dist/commonjs/models/components/chunkingstrategy.js.map +1 -1
- package/dist/commonjs/models/components/codeinterpreteroutput.d.ts +2 -1
- package/dist/commonjs/models/components/codeinterpreteroutput.d.ts.map +1 -1
- package/dist/commonjs/models/components/codeinterpreteroutput.js +5 -4
- package/dist/commonjs/models/components/codeinterpreteroutput.js.map +1 -1
- package/dist/commonjs/models/components/computeraction.d.ts +2 -1
- package/dist/commonjs/models/components/computeraction.d.ts.map +1 -1
- package/dist/commonjs/models/components/computeraction.js +12 -11
- package/dist/commonjs/models/components/computeraction.js.map +1 -1
- package/dist/commonjs/models/components/customtoolformat.d.ts +2 -1
- package/dist/commonjs/models/components/customtoolformat.d.ts.map +1 -1
- package/dist/commonjs/models/components/customtoolformat.js +5 -1
- package/dist/commonjs/models/components/customtoolformat.js.map +1 -1
- package/dist/commonjs/models/components/filesearchcompoundfilter.d.ts +3 -2
- package/dist/commonjs/models/components/filesearchcompoundfilter.d.ts.map +1 -1
- package/dist/commonjs/models/components/filesearchcompoundfilter.js +21 -20
- package/dist/commonjs/models/components/filesearchcompoundfilter.js.map +1 -1
- package/dist/commonjs/models/components/githubpullrequestrequest.d.ts +2 -0
- package/dist/commonjs/models/components/githubpullrequestrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/githubpullrequestrequest.js +11 -0
- package/dist/commonjs/models/components/githubpullrequestrequest.js.map +1 -1
- package/dist/commonjs/models/components/guardrailconfig.d.ts +2 -1
- package/dist/commonjs/models/components/guardrailconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/guardrailconfig.js +6 -5
- package/dist/commonjs/models/components/guardrailconfig.js.map +1 -1
- package/dist/commonjs/models/components/method.d.ts +6 -5
- package/dist/commonjs/models/components/method.d.ts.map +1 -1
- package/dist/commonjs/models/components/method.js +36 -35
- package/dist/commonjs/models/components/method.js.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionchoice.d.ts +4 -3
- package/dist/commonjs/models/components/openaichatcompletionchoice.d.ts.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionchoice.js +19 -18
- package/dist/commonjs/models/components/openaichatcompletionchoice.js.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts +4 -3
- package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionchunk.js +19 -18
- package/dist/commonjs/models/components/openaichatcompletionchunk.js.map +1 -1
- package/dist/commonjs/models/components/outputmessage.d.ts +3 -2
- package/dist/commonjs/models/components/outputmessage.d.ts.map +1 -1
- package/dist/commonjs/models/components/outputmessage.js +9 -8
- package/dist/commonjs/models/components/outputmessage.js.map +1 -1
- package/dist/commonjs/models/components/outputmessagewithid.d.ts +3 -2
- package/dist/commonjs/models/components/outputmessagewithid.d.ts.map +1 -1
- package/dist/commonjs/models/components/outputmessagewithid.js +9 -8
- package/dist/commonjs/models/components/outputmessagewithid.js.map +1 -1
- package/dist/commonjs/models/components/outputtext.d.ts +3 -2
- package/dist/commonjs/models/components/outputtext.d.ts.map +1 -1
- package/dist/commonjs/models/components/outputtext.js +13 -12
- package/dist/commonjs/models/components/outputtext.js.map +1 -1
- package/dist/commonjs/models/components/responsecontentpartaddedevent.d.ts +3 -2
- package/dist/commonjs/models/components/responsecontentpartaddedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/responsecontentpartaddedevent.js +11 -11
- package/dist/commonjs/models/components/responsecontentpartaddedevent.js.map +1 -1
- package/dist/commonjs/models/components/responsecontentpartdoneevent.d.ts +3 -2
- package/dist/commonjs/models/components/responsecontentpartdoneevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/responsecontentpartdoneevent.js +11 -10
- package/dist/commonjs/models/components/responsecontentpartdoneevent.js.map +1 -1
- package/dist/commonjs/models/components/responseformat.d.ts +2 -1
- package/dist/commonjs/models/components/responseformat.d.ts.map +1 -1
- package/dist/commonjs/models/components/responseformat.js +6 -5
- package/dist/commonjs/models/components/responseformat.js.map +1 -1
- package/dist/commonjs/models/components/responseobject.d.ts +5 -4
- package/dist/commonjs/models/components/responseobject.d.ts.map +1 -1
- package/dist/commonjs/models/components/responseobject.js +41 -40
- package/dist/commonjs/models/components/responseobject.js.map +1 -1
- package/dist/commonjs/models/components/responsestreamingevent.d.ts +2 -1
- package/dist/commonjs/models/components/responsestreamingevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/responsestreamingevent.js +68 -67
- package/dist/commonjs/models/components/responsestreamingevent.js.map +1 -1
- package/dist/commonjs/models/components/sessionrecord.d.ts +2 -0
- package/dist/commonjs/models/components/sessionrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/sessionrecord.js +4 -0
- package/dist/commonjs/models/components/sessionrecord.js.map +1 -1
- package/dist/commonjs/models/components/shellenvironment.d.ts +2 -1
- package/dist/commonjs/models/components/shellenvironment.d.ts.map +1 -1
- package/dist/commonjs/models/components/shellenvironment.js +5 -4
- package/dist/commonjs/models/components/shellenvironment.js.map +1 -1
- package/dist/commonjs/models/components/skillentry.d.ts +2 -1
- package/dist/commonjs/models/components/skillentry.d.ts.map +1 -1
- package/dist/commonjs/models/components/skillentry.js +5 -4
- package/dist/commonjs/models/components/skillentry.js.map +1 -1
- package/dist/commonjs/models/components/tooldefinition.d.ts +5 -4
- package/dist/commonjs/models/components/tooldefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/tooldefinition.js +29 -28
- package/dist/commonjs/models/components/tooldefinition.js.map +1 -1
- package/dist/commonjs/models/components/websearchaction.d.ts +2 -1
- package/dist/commonjs/models/components/websearchaction.d.ts.map +1 -1
- package/dist/commonjs/models/components/websearchaction.js +6 -5
- package/dist/commonjs/models/components/websearchaction.js.map +1 -1
- package/dist/commonjs/models/operations/createchatcompletionstream.d.ts +2 -1
- package/dist/commonjs/models/operations/createchatcompletionstream.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createchatcompletionstream.js +6 -5
- package/dist/commonjs/models/operations/createchatcompletionstream.js.map +1 -1
- package/dist/commonjs/models/operations/uploadfile.d.ts +1 -1
- package/dist/commonjs/types/discriminatedUnion.d.ts +25 -0
- package/dist/commonjs/types/discriminatedUnion.d.ts.map +1 -0
- package/dist/commonjs/types/discriminatedUnion.js +94 -0
- package/dist/commonjs/types/discriminatedUnion.js.map +1 -0
- package/dist/esm/hooks/multipartFilename.d.ts +12 -0
- package/dist/esm/hooks/multipartFilename.d.ts.map +1 -0
- package/dist/esm/hooks/multipartFilename.js +46 -0
- package/dist/esm/hooks/multipartFilename.js.map +1 -0
- package/dist/esm/hooks/registration.d.ts.map +1 -1
- package/dist/esm/hooks/registration.js +2 -1
- package/dist/esm/hooks/registration.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/agentschedulespec.d.ts +2 -1
- package/dist/esm/models/components/agentschedulespec.d.ts.map +1 -1
- package/dist/esm/models/components/agentschedulespec.js +6 -5
- package/dist/esm/models/components/agentschedulespec.js.map +1 -1
- package/dist/esm/models/components/chunkingstrategy.d.ts +2 -1
- package/dist/esm/models/components/chunkingstrategy.d.ts.map +1 -1
- package/dist/esm/models/components/chunkingstrategy.js +6 -5
- package/dist/esm/models/components/chunkingstrategy.js.map +1 -1
- package/dist/esm/models/components/codeinterpreteroutput.d.ts +2 -1
- package/dist/esm/models/components/codeinterpreteroutput.d.ts.map +1 -1
- package/dist/esm/models/components/codeinterpreteroutput.js +5 -4
- package/dist/esm/models/components/codeinterpreteroutput.js.map +1 -1
- package/dist/esm/models/components/computeraction.d.ts +2 -1
- package/dist/esm/models/components/computeraction.d.ts.map +1 -1
- package/dist/esm/models/components/computeraction.js +12 -11
- package/dist/esm/models/components/computeraction.js.map +1 -1
- package/dist/esm/models/components/customtoolformat.d.ts +2 -1
- package/dist/esm/models/components/customtoolformat.d.ts.map +1 -1
- package/dist/esm/models/components/customtoolformat.js +5 -1
- package/dist/esm/models/components/customtoolformat.js.map +1 -1
- package/dist/esm/models/components/filesearchcompoundfilter.d.ts +3 -2
- package/dist/esm/models/components/filesearchcompoundfilter.d.ts.map +1 -1
- package/dist/esm/models/components/filesearchcompoundfilter.js +21 -20
- package/dist/esm/models/components/filesearchcompoundfilter.js.map +1 -1
- package/dist/esm/models/components/githubpullrequestrequest.d.ts +2 -0
- package/dist/esm/models/components/githubpullrequestrequest.d.ts.map +1 -1
- package/dist/esm/models/components/githubpullrequestrequest.js +11 -0
- package/dist/esm/models/components/githubpullrequestrequest.js.map +1 -1
- package/dist/esm/models/components/guardrailconfig.d.ts +2 -1
- package/dist/esm/models/components/guardrailconfig.d.ts.map +1 -1
- package/dist/esm/models/components/guardrailconfig.js +6 -5
- package/dist/esm/models/components/guardrailconfig.js.map +1 -1
- package/dist/esm/models/components/method.d.ts +6 -5
- package/dist/esm/models/components/method.d.ts.map +1 -1
- package/dist/esm/models/components/method.js +36 -35
- package/dist/esm/models/components/method.js.map +1 -1
- package/dist/esm/models/components/openaichatcompletionchoice.d.ts +4 -3
- package/dist/esm/models/components/openaichatcompletionchoice.d.ts.map +1 -1
- package/dist/esm/models/components/openaichatcompletionchoice.js +19 -18
- package/dist/esm/models/components/openaichatcompletionchoice.js.map +1 -1
- package/dist/esm/models/components/openaichatcompletionchunk.d.ts +4 -3
- package/dist/esm/models/components/openaichatcompletionchunk.d.ts.map +1 -1
- package/dist/esm/models/components/openaichatcompletionchunk.js +19 -18
- package/dist/esm/models/components/openaichatcompletionchunk.js.map +1 -1
- package/dist/esm/models/components/outputmessage.d.ts +3 -2
- package/dist/esm/models/components/outputmessage.d.ts.map +1 -1
- package/dist/esm/models/components/outputmessage.js +9 -8
- package/dist/esm/models/components/outputmessage.js.map +1 -1
- package/dist/esm/models/components/outputmessagewithid.d.ts +3 -2
- package/dist/esm/models/components/outputmessagewithid.d.ts.map +1 -1
- package/dist/esm/models/components/outputmessagewithid.js +9 -8
- package/dist/esm/models/components/outputmessagewithid.js.map +1 -1
- package/dist/esm/models/components/outputtext.d.ts +3 -2
- package/dist/esm/models/components/outputtext.d.ts.map +1 -1
- package/dist/esm/models/components/outputtext.js +13 -12
- package/dist/esm/models/components/outputtext.js.map +1 -1
- package/dist/esm/models/components/responsecontentpartaddedevent.d.ts +3 -2
- package/dist/esm/models/components/responsecontentpartaddedevent.d.ts.map +1 -1
- package/dist/esm/models/components/responsecontentpartaddedevent.js +11 -11
- package/dist/esm/models/components/responsecontentpartaddedevent.js.map +1 -1
- package/dist/esm/models/components/responsecontentpartdoneevent.d.ts +3 -2
- package/dist/esm/models/components/responsecontentpartdoneevent.d.ts.map +1 -1
- package/dist/esm/models/components/responsecontentpartdoneevent.js +11 -10
- package/dist/esm/models/components/responsecontentpartdoneevent.js.map +1 -1
- package/dist/esm/models/components/responseformat.d.ts +2 -1
- package/dist/esm/models/components/responseformat.d.ts.map +1 -1
- package/dist/esm/models/components/responseformat.js +6 -5
- package/dist/esm/models/components/responseformat.js.map +1 -1
- package/dist/esm/models/components/responseobject.d.ts +5 -4
- package/dist/esm/models/components/responseobject.d.ts.map +1 -1
- package/dist/esm/models/components/responseobject.js +41 -40
- package/dist/esm/models/components/responseobject.js.map +1 -1
- package/dist/esm/models/components/responsestreamingevent.d.ts +2 -1
- package/dist/esm/models/components/responsestreamingevent.d.ts.map +1 -1
- package/dist/esm/models/components/responsestreamingevent.js +68 -67
- package/dist/esm/models/components/responsestreamingevent.js.map +1 -1
- package/dist/esm/models/components/sessionrecord.d.ts +2 -0
- package/dist/esm/models/components/sessionrecord.d.ts.map +1 -1
- package/dist/esm/models/components/sessionrecord.js +4 -0
- package/dist/esm/models/components/sessionrecord.js.map +1 -1
- package/dist/esm/models/components/shellenvironment.d.ts +2 -1
- package/dist/esm/models/components/shellenvironment.d.ts.map +1 -1
- package/dist/esm/models/components/shellenvironment.js +5 -4
- package/dist/esm/models/components/shellenvironment.js.map +1 -1
- package/dist/esm/models/components/skillentry.d.ts +2 -1
- package/dist/esm/models/components/skillentry.d.ts.map +1 -1
- package/dist/esm/models/components/skillentry.js +5 -4
- package/dist/esm/models/components/skillentry.js.map +1 -1
- package/dist/esm/models/components/tooldefinition.d.ts +5 -4
- package/dist/esm/models/components/tooldefinition.d.ts.map +1 -1
- package/dist/esm/models/components/tooldefinition.js +29 -28
- package/dist/esm/models/components/tooldefinition.js.map +1 -1
- package/dist/esm/models/components/websearchaction.d.ts +2 -1
- package/dist/esm/models/components/websearchaction.d.ts.map +1 -1
- package/dist/esm/models/components/websearchaction.js +6 -5
- package/dist/esm/models/components/websearchaction.js.map +1 -1
- package/dist/esm/models/operations/createchatcompletionstream.d.ts +2 -1
- package/dist/esm/models/operations/createchatcompletionstream.d.ts.map +1 -1
- package/dist/esm/models/operations/createchatcompletionstream.js +6 -5
- package/dist/esm/models/operations/createchatcompletionstream.js.map +1 -1
- package/dist/esm/models/operations/uploadfile.d.ts +1 -1
- package/dist/esm/types/discriminatedUnion.d.ts +25 -0
- package/dist/esm/types/discriminatedUnion.d.ts.map +1 -0
- package/dist/esm/types/discriminatedUnion.js +57 -0
- package/dist/esm/types/discriminatedUnion.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/hooks/multipartFilename.ts +60 -0
- package/src/hooks/registration.ts +2 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/agentschedulespec.ts +9 -6
- package/src/models/components/chunkingstrategy.ts +9 -6
- package/src/models/components/codeinterpreteroutput.ts +8 -5
- package/src/models/components/computeraction.ts +15 -12
- package/src/models/components/customtoolformat.ts +10 -2
- package/src/models/components/filesearchcompoundfilter.ts +41 -39
- package/src/models/components/githubpullrequestrequest.ts +13 -0
- package/src/models/components/guardrailconfig.ts +9 -6
- package/src/models/components/method.ts +75 -43
- package/src/models/components/openaichatcompletionchoice.ts +24 -21
- package/src/models/components/openaichatcompletionchunk.ts +24 -21
- package/src/models/components/outputmessage.ts +19 -10
- package/src/models/components/outputmessagewithid.ts +19 -10
- package/src/models/components/outputtext.ts +23 -16
- package/src/models/components/responsecontentpartaddedevent.ts +25 -13
- package/src/models/components/responsecontentpartdoneevent.ts +22 -12
- package/src/models/components/responseformat.ts +9 -6
- package/src/models/components/responseobject.ts +62 -48
- package/src/models/components/responsestreamingevent.ts +118 -68
- package/src/models/components/sessionrecord.ts +6 -0
- package/src/models/components/shellenvironment.ts +8 -5
- package/src/models/components/skillentry.ts +10 -5
- package/src/models/components/tooldefinition.ts +42 -31
- package/src/models/components/websearchaction.ts +12 -6
- package/src/models/operations/createchatcompletionstream.ts +12 -6
- package/src/models/operations/uploadfile.ts +1 -1
- package/src/types/discriminatedUnion.ts +96 -0
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
8
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
import {
|
|
@@ -21,17 +23,18 @@ import {
|
|
|
21
23
|
|
|
22
24
|
export type CodeInterpreterOutput =
|
|
23
25
|
| CodeInterpreterOutputLogs
|
|
24
|
-
| CodeInterpreterOutputImage
|
|
26
|
+
| CodeInterpreterOutputImage
|
|
27
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
25
28
|
|
|
26
29
|
/** @internal */
|
|
27
30
|
export const CodeInterpreterOutput$inboundSchema: z.ZodType<
|
|
28
31
|
CodeInterpreterOutput,
|
|
29
32
|
z.ZodTypeDef,
|
|
30
33
|
unknown
|
|
31
|
-
> =
|
|
32
|
-
CodeInterpreterOutputLogs$inboundSchema,
|
|
33
|
-
CodeInterpreterOutputImage$inboundSchema,
|
|
34
|
-
|
|
34
|
+
> = discriminatedUnion("type", {
|
|
35
|
+
logs: CodeInterpreterOutputLogs$inboundSchema,
|
|
36
|
+
image: CodeInterpreterOutputImage$inboundSchema,
|
|
37
|
+
});
|
|
35
38
|
/** @internal */
|
|
36
39
|
export type CodeInterpreterOutput$Outbound =
|
|
37
40
|
| CodeInterpreterOutputLogs$Outbound
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
8
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
import {
|
|
@@ -70,24 +72,25 @@ export type ComputerAction =
|
|
|
70
72
|
| ScreenshotAction
|
|
71
73
|
| ScrollAction
|
|
72
74
|
| TypeAction
|
|
73
|
-
| WaitAction
|
|
75
|
+
| WaitAction
|
|
76
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
74
77
|
|
|
75
78
|
/** @internal */
|
|
76
79
|
export const ComputerAction$inboundSchema: z.ZodType<
|
|
77
80
|
ComputerAction,
|
|
78
81
|
z.ZodTypeDef,
|
|
79
82
|
unknown
|
|
80
|
-
> =
|
|
81
|
-
ClickAction$inboundSchema,
|
|
82
|
-
DoubleClickAction$inboundSchema,
|
|
83
|
-
DragAction$inboundSchema,
|
|
84
|
-
KeyPressAction$inboundSchema,
|
|
85
|
-
MoveAction$inboundSchema,
|
|
86
|
-
ScreenshotAction$inboundSchema,
|
|
87
|
-
ScrollAction$inboundSchema,
|
|
88
|
-
TypeAction$inboundSchema,
|
|
89
|
-
WaitAction$inboundSchema,
|
|
90
|
-
|
|
83
|
+
> = discriminatedUnion("type", {
|
|
84
|
+
click: ClickAction$inboundSchema,
|
|
85
|
+
double_click: DoubleClickAction$inboundSchema,
|
|
86
|
+
drag: DragAction$inboundSchema,
|
|
87
|
+
keypress: KeyPressAction$inboundSchema,
|
|
88
|
+
move: MoveAction$inboundSchema,
|
|
89
|
+
screenshot: ScreenshotAction$inboundSchema,
|
|
90
|
+
scroll: ScrollAction$inboundSchema,
|
|
91
|
+
type: TypeAction$inboundSchema,
|
|
92
|
+
wait: WaitAction$inboundSchema,
|
|
93
|
+
});
|
|
91
94
|
/** @internal */
|
|
92
95
|
export type ComputerAction$Outbound =
|
|
93
96
|
| ClickAction$Outbound
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
8
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
import {
|
|
@@ -19,14 +21,20 @@ import {
|
|
|
19
21
|
TextFormat$outboundSchema,
|
|
20
22
|
} from "./textformat.js";
|
|
21
23
|
|
|
22
|
-
export type CustomToolFormat =
|
|
24
|
+
export type CustomToolFormat =
|
|
25
|
+
| TextFormat
|
|
26
|
+
| GrammarFormat
|
|
27
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
23
28
|
|
|
24
29
|
/** @internal */
|
|
25
30
|
export const CustomToolFormat$inboundSchema: z.ZodType<
|
|
26
31
|
CustomToolFormat,
|
|
27
32
|
z.ZodTypeDef,
|
|
28
33
|
unknown
|
|
29
|
-
> =
|
|
34
|
+
> = discriminatedUnion("type", {
|
|
35
|
+
text: TextFormat$inboundSchema,
|
|
36
|
+
grammar: GrammarFormat$inboundSchema,
|
|
37
|
+
});
|
|
30
38
|
/** @internal */
|
|
31
39
|
export type CustomToolFormat$Outbound =
|
|
32
40
|
| TextFormat$Outbound
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
8
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
7
9
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -33,6 +35,7 @@ export type FileSearchCompoundFilter = {
|
|
|
33
35
|
| (FileSearchComparisonFilter & { type: "lte" })
|
|
34
36
|
| (FileSearchCompoundFilter & { type: "and" })
|
|
35
37
|
| (FileSearchCompoundFilter & { type: "or" })
|
|
38
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
36
39
|
>;
|
|
37
40
|
};
|
|
38
41
|
|
|
@@ -44,7 +47,8 @@ export type FileSearchCompoundFilterFilters =
|
|
|
44
47
|
| (FileSearchComparisonFilter & { type: "lt" })
|
|
45
48
|
| (FileSearchComparisonFilter & { type: "lte" })
|
|
46
49
|
| (FileSearchCompoundFilter & { type: "and" })
|
|
47
|
-
| (FileSearchCompoundFilter & { type: "or" })
|
|
50
|
+
| (FileSearchCompoundFilter & { type: "or" })
|
|
51
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
48
52
|
|
|
49
53
|
/** @internal */
|
|
50
54
|
export const FileSearchCompoundFilterType$inboundSchema: z.ZodNativeEnum<
|
|
@@ -62,34 +66,32 @@ export const FileSearchCompoundFilter$inboundSchema: z.ZodType<
|
|
|
62
66
|
unknown
|
|
63
67
|
> = z.object({
|
|
64
68
|
type: FileSearchCompoundFilterType$inboundSchema,
|
|
65
|
-
filters: z.array(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
z.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
z.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]),
|
|
92
|
-
),
|
|
69
|
+
filters: z.array(discriminatedUnion("type", {
|
|
70
|
+
eq: FileSearchComparisonFilter$inboundSchema.and(
|
|
71
|
+
z.object({ type: z.literal("eq") }),
|
|
72
|
+
),
|
|
73
|
+
ne: FileSearchComparisonFilter$inboundSchema.and(
|
|
74
|
+
z.object({ type: z.literal("ne") }),
|
|
75
|
+
),
|
|
76
|
+
gt: FileSearchComparisonFilter$inboundSchema.and(
|
|
77
|
+
z.object({ type: z.literal("gt") }),
|
|
78
|
+
),
|
|
79
|
+
gte: FileSearchComparisonFilter$inboundSchema.and(
|
|
80
|
+
z.object({ type: z.literal("gte") }),
|
|
81
|
+
),
|
|
82
|
+
lt: FileSearchComparisonFilter$inboundSchema.and(
|
|
83
|
+
z.object({ type: z.literal("lt") }),
|
|
84
|
+
),
|
|
85
|
+
lte: FileSearchComparisonFilter$inboundSchema.and(
|
|
86
|
+
z.object({ type: z.literal("lte") }),
|
|
87
|
+
),
|
|
88
|
+
and: z.lazy(() => FileSearchCompoundFilter$inboundSchema).and(
|
|
89
|
+
z.object({ type: z.literal("and") }),
|
|
90
|
+
),
|
|
91
|
+
or: z.lazy(() => FileSearchCompoundFilter$inboundSchema).and(
|
|
92
|
+
z.object({ type: z.literal("or") }),
|
|
93
|
+
),
|
|
94
|
+
})),
|
|
93
95
|
});
|
|
94
96
|
/** @internal */
|
|
95
97
|
export type FileSearchCompoundFilter$Outbound = {
|
|
@@ -165,32 +167,32 @@ export const FileSearchCompoundFilterFilters$inboundSchema: z.ZodType<
|
|
|
165
167
|
FileSearchCompoundFilterFilters,
|
|
166
168
|
z.ZodTypeDef,
|
|
167
169
|
unknown
|
|
168
|
-
> =
|
|
169
|
-
FileSearchComparisonFilter$inboundSchema.and(
|
|
170
|
+
> = discriminatedUnion("type", {
|
|
171
|
+
eq: FileSearchComparisonFilter$inboundSchema.and(
|
|
170
172
|
z.object({ type: z.literal("eq") }),
|
|
171
173
|
),
|
|
172
|
-
FileSearchComparisonFilter$inboundSchema.and(
|
|
174
|
+
ne: FileSearchComparisonFilter$inboundSchema.and(
|
|
173
175
|
z.object({ type: z.literal("ne") }),
|
|
174
176
|
),
|
|
175
|
-
FileSearchComparisonFilter$inboundSchema.and(
|
|
177
|
+
gt: FileSearchComparisonFilter$inboundSchema.and(
|
|
176
178
|
z.object({ type: z.literal("gt") }),
|
|
177
179
|
),
|
|
178
|
-
FileSearchComparisonFilter$inboundSchema.and(
|
|
180
|
+
gte: FileSearchComparisonFilter$inboundSchema.and(
|
|
179
181
|
z.object({ type: z.literal("gte") }),
|
|
180
182
|
),
|
|
181
|
-
FileSearchComparisonFilter$inboundSchema.and(
|
|
183
|
+
lt: FileSearchComparisonFilter$inboundSchema.and(
|
|
182
184
|
z.object({ type: z.literal("lt") }),
|
|
183
185
|
),
|
|
184
|
-
FileSearchComparisonFilter$inboundSchema.and(
|
|
186
|
+
lte: FileSearchComparisonFilter$inboundSchema.and(
|
|
185
187
|
z.object({ type: z.literal("lte") }),
|
|
186
188
|
),
|
|
187
|
-
z.lazy(() => FileSearchCompoundFilter$inboundSchema).and(
|
|
189
|
+
and: z.lazy(() => FileSearchCompoundFilter$inboundSchema).and(
|
|
188
190
|
z.object({ type: z.literal("and") }),
|
|
189
191
|
),
|
|
190
|
-
z.lazy(() => FileSearchCompoundFilter$inboundSchema).and(
|
|
192
|
+
or: z.lazy(() => FileSearchCompoundFilter$inboundSchema).and(
|
|
191
193
|
z.object({ type: z.literal("or") }),
|
|
192
194
|
),
|
|
193
|
-
|
|
195
|
+
});
|
|
194
196
|
/** @internal */
|
|
195
197
|
export type FileSearchCompoundFilterFilters$Outbound =
|
|
196
198
|
| (FileSearchComparisonFilter$Outbound & { type: "eq" })
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -22,6 +23,7 @@ export type GitHubPullRequestRequest = {
|
|
|
22
23
|
body?: string | undefined;
|
|
23
24
|
base?: string | null | undefined;
|
|
24
25
|
draft?: boolean | undefined;
|
|
26
|
+
checkoutPath?: string | undefined;
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
/** @internal */
|
|
@@ -35,6 +37,11 @@ export const GitHubPullRequestRequest$inboundSchema: z.ZodType<
|
|
|
35
37
|
body: z.string().default(""),
|
|
36
38
|
base: z.nullable(z.string()).optional(),
|
|
37
39
|
draft: z.boolean().default(false),
|
|
40
|
+
checkout_path: z.string().default(""),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"checkout_path": "checkoutPath",
|
|
44
|
+
});
|
|
38
45
|
});
|
|
39
46
|
/** @internal */
|
|
40
47
|
export type GitHubPullRequestRequest$Outbound = {
|
|
@@ -43,6 +50,7 @@ export type GitHubPullRequestRequest$Outbound = {
|
|
|
43
50
|
body: string;
|
|
44
51
|
base?: string | null | undefined;
|
|
45
52
|
draft: boolean;
|
|
53
|
+
checkout_path: string;
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
/** @internal */
|
|
@@ -56,6 +64,11 @@ export const GitHubPullRequestRequest$outboundSchema: z.ZodType<
|
|
|
56
64
|
body: z.string().default(""),
|
|
57
65
|
base: z.nullable(z.string()).optional(),
|
|
58
66
|
draft: z.boolean().default(false),
|
|
67
|
+
checkoutPath: z.string().default(""),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
checkoutPath: "checkout_path",
|
|
71
|
+
});
|
|
59
72
|
});
|
|
60
73
|
|
|
61
74
|
export function gitHubPullRequestRequestToJSON(
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
8
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
7
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
11
|
import {
|
|
@@ -28,18 +30,19 @@ import {
|
|
|
28
30
|
export type GuardrailConfig =
|
|
29
31
|
| BanWordsGuardrail
|
|
30
32
|
| PromptInjectionGuardrail
|
|
31
|
-
| LeakageGuardrail
|
|
33
|
+
| LeakageGuardrail
|
|
34
|
+
| discriminatedUnionTypes.Unknown<"mode">;
|
|
32
35
|
|
|
33
36
|
/** @internal */
|
|
34
37
|
export const GuardrailConfig$inboundSchema: z.ZodType<
|
|
35
38
|
GuardrailConfig,
|
|
36
39
|
z.ZodTypeDef,
|
|
37
40
|
unknown
|
|
38
|
-
> =
|
|
39
|
-
BanWordsGuardrail$inboundSchema,
|
|
40
|
-
PromptInjectionGuardrail$inboundSchema,
|
|
41
|
-
LeakageGuardrail$inboundSchema,
|
|
42
|
-
|
|
41
|
+
> = discriminatedUnion("mode", {
|
|
42
|
+
ban_words: BanWordsGuardrail$inboundSchema,
|
|
43
|
+
prompt_injection: PromptInjectionGuardrail$inboundSchema,
|
|
44
|
+
leakage: LeakageGuardrail$inboundSchema,
|
|
45
|
+
});
|
|
43
46
|
/** @internal */
|
|
44
47
|
export type GuardrailConfig$Outbound =
|
|
45
48
|
| BanWordsGuardrail$Outbound
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
9
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
8
10
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
11
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -135,13 +137,25 @@ export type Graders1 = {
|
|
|
135
137
|
operation: GradersOperation;
|
|
136
138
|
};
|
|
137
139
|
|
|
138
|
-
export type Graders =
|
|
140
|
+
export type Graders =
|
|
141
|
+
| Graders1
|
|
142
|
+
| Graders2
|
|
143
|
+
| Graders3
|
|
144
|
+
| Graders4
|
|
145
|
+
| Graders5
|
|
146
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
139
147
|
|
|
140
148
|
export type Grader2 = {
|
|
141
149
|
type: "multi";
|
|
142
150
|
name: string;
|
|
143
151
|
graders: {
|
|
144
|
-
[k: string]:
|
|
152
|
+
[k: string]:
|
|
153
|
+
| Graders1
|
|
154
|
+
| Graders2
|
|
155
|
+
| Graders3
|
|
156
|
+
| Graders4
|
|
157
|
+
| Graders5
|
|
158
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
145
159
|
};
|
|
146
160
|
calculateOutput: string;
|
|
147
161
|
};
|
|
@@ -237,12 +251,32 @@ export type One1 = {
|
|
|
237
251
|
operation: Operation;
|
|
238
252
|
};
|
|
239
253
|
|
|
240
|
-
export type Grader1 =
|
|
241
|
-
|
|
242
|
-
|
|
254
|
+
export type Grader1 =
|
|
255
|
+
| One1
|
|
256
|
+
| One2
|
|
257
|
+
| One3
|
|
258
|
+
| One4
|
|
259
|
+
| One5
|
|
260
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
261
|
+
|
|
262
|
+
export type Grader =
|
|
263
|
+
| Grader2
|
|
264
|
+
| One1
|
|
265
|
+
| One2
|
|
266
|
+
| One3
|
|
267
|
+
| One4
|
|
268
|
+
| One5
|
|
269
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
243
270
|
|
|
244
271
|
export type Reinforcement = {
|
|
245
|
-
grader:
|
|
272
|
+
grader:
|
|
273
|
+
| Grader2
|
|
274
|
+
| One1
|
|
275
|
+
| One2
|
|
276
|
+
| One3
|
|
277
|
+
| One4
|
|
278
|
+
| One5
|
|
279
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
246
280
|
hyperparameters?: ReinforcementHyperparameters | null | undefined;
|
|
247
281
|
};
|
|
248
282
|
|
|
@@ -775,13 +809,13 @@ export function graders1FromJSON(
|
|
|
775
809
|
|
|
776
810
|
/** @internal */
|
|
777
811
|
export const Graders$inboundSchema: z.ZodType<Graders, z.ZodTypeDef, unknown> =
|
|
778
|
-
|
|
779
|
-
z.lazy(() => Graders1$inboundSchema),
|
|
780
|
-
z.lazy(() => Graders2$inboundSchema),
|
|
781
|
-
z.lazy(() => Graders3$inboundSchema),
|
|
782
|
-
z.lazy(() => Graders4$inboundSchema),
|
|
783
|
-
z.lazy(() => Graders5$inboundSchema),
|
|
784
|
-
|
|
812
|
+
discriminatedUnion("type", {
|
|
813
|
+
string_check: z.lazy(() => Graders1$inboundSchema),
|
|
814
|
+
text_similarity: z.lazy(() => Graders2$inboundSchema),
|
|
815
|
+
python: z.lazy(() => Graders3$inboundSchema),
|
|
816
|
+
score_model: z.lazy(() => Graders4$inboundSchema),
|
|
817
|
+
label_model: z.lazy(() => Graders5$inboundSchema),
|
|
818
|
+
});
|
|
785
819
|
/** @internal */
|
|
786
820
|
export type Graders$Outbound =
|
|
787
821
|
| Graders1$Outbound
|
|
@@ -821,15 +855,13 @@ export const Grader2$inboundSchema: z.ZodType<Grader2, z.ZodTypeDef, unknown> =
|
|
|
821
855
|
z.object({
|
|
822
856
|
type: z.literal("multi"),
|
|
823
857
|
name: z.string(),
|
|
824
|
-
graders: z.record(
|
|
825
|
-
z.
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
]),
|
|
832
|
-
),
|
|
858
|
+
graders: z.record(discriminatedUnion("type", {
|
|
859
|
+
string_check: z.lazy(() => Graders1$inboundSchema),
|
|
860
|
+
text_similarity: z.lazy(() => Graders2$inboundSchema),
|
|
861
|
+
python: z.lazy(() => Graders3$inboundSchema),
|
|
862
|
+
score_model: z.lazy(() => Graders4$inboundSchema),
|
|
863
|
+
label_model: z.lazy(() => Graders5$inboundSchema),
|
|
864
|
+
})),
|
|
833
865
|
calculate_output: z.string(),
|
|
834
866
|
}).transform((v) => {
|
|
835
867
|
return remap$(v, {
|
|
@@ -1294,13 +1326,13 @@ export function one1FromJSON(
|
|
|
1294
1326
|
|
|
1295
1327
|
/** @internal */
|
|
1296
1328
|
export const Grader1$inboundSchema: z.ZodType<Grader1, z.ZodTypeDef, unknown> =
|
|
1297
|
-
|
|
1298
|
-
z.lazy(() => One1$inboundSchema),
|
|
1299
|
-
z.lazy(() => One2$inboundSchema),
|
|
1300
|
-
z.lazy(() => One3$inboundSchema),
|
|
1301
|
-
z.lazy(() => One4$inboundSchema),
|
|
1302
|
-
z.lazy(() => One5$inboundSchema),
|
|
1303
|
-
|
|
1329
|
+
discriminatedUnion("type", {
|
|
1330
|
+
string_check: z.lazy(() => One1$inboundSchema),
|
|
1331
|
+
text_similarity: z.lazy(() => One2$inboundSchema),
|
|
1332
|
+
python: z.lazy(() => One3$inboundSchema),
|
|
1333
|
+
score_model: z.lazy(() => One4$inboundSchema),
|
|
1334
|
+
label_model: z.lazy(() => One5$inboundSchema),
|
|
1335
|
+
});
|
|
1304
1336
|
/** @internal */
|
|
1305
1337
|
export type Grader1$Outbound =
|
|
1306
1338
|
| One1$Outbound
|
|
@@ -1339,13 +1371,13 @@ export function grader1FromJSON(
|
|
|
1339
1371
|
export const Grader$inboundSchema: z.ZodType<Grader, z.ZodTypeDef, unknown> = z
|
|
1340
1372
|
.union([
|
|
1341
1373
|
z.lazy(() => Grader2$inboundSchema),
|
|
1342
|
-
|
|
1343
|
-
z.lazy(() => One1$inboundSchema),
|
|
1344
|
-
z.lazy(() => One2$inboundSchema),
|
|
1345
|
-
z.lazy(() => One3$inboundSchema),
|
|
1346
|
-
z.lazy(() => One4$inboundSchema),
|
|
1347
|
-
z.lazy(() => One5$inboundSchema),
|
|
1348
|
-
|
|
1374
|
+
discriminatedUnion("type", {
|
|
1375
|
+
string_check: z.lazy(() => One1$inboundSchema),
|
|
1376
|
+
text_similarity: z.lazy(() => One2$inboundSchema),
|
|
1377
|
+
python: z.lazy(() => One3$inboundSchema),
|
|
1378
|
+
score_model: z.lazy(() => One4$inboundSchema),
|
|
1379
|
+
label_model: z.lazy(() => One5$inboundSchema),
|
|
1380
|
+
}),
|
|
1349
1381
|
]);
|
|
1350
1382
|
/** @internal */
|
|
1351
1383
|
export type Grader$Outbound =
|
|
@@ -1393,13 +1425,13 @@ export const Reinforcement$inboundSchema: z.ZodType<
|
|
|
1393
1425
|
> = z.object({
|
|
1394
1426
|
grader: z.union([
|
|
1395
1427
|
z.lazy(() => Grader2$inboundSchema),
|
|
1396
|
-
|
|
1397
|
-
z.lazy(() => One1$inboundSchema),
|
|
1398
|
-
z.lazy(() => One2$inboundSchema),
|
|
1399
|
-
z.lazy(() => One3$inboundSchema),
|
|
1400
|
-
z.lazy(() => One4$inboundSchema),
|
|
1401
|
-
z.lazy(() => One5$inboundSchema),
|
|
1402
|
-
|
|
1428
|
+
discriminatedUnion("type", {
|
|
1429
|
+
string_check: z.lazy(() => One1$inboundSchema),
|
|
1430
|
+
text_similarity: z.lazy(() => One2$inboundSchema),
|
|
1431
|
+
python: z.lazy(() => One3$inboundSchema),
|
|
1432
|
+
score_model: z.lazy(() => One4$inboundSchema),
|
|
1433
|
+
label_model: z.lazy(() => One5$inboundSchema),
|
|
1434
|
+
}),
|
|
1403
1435
|
]),
|
|
1404
1436
|
hyperparameters: z.nullable(ReinforcementHyperparameters$inboundSchema)
|
|
1405
1437
|
.optional(),
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
|
|
9
|
+
import { discriminatedUnion } from "../../types/discriminatedUnion.js";
|
|
8
10
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
11
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -134,7 +136,8 @@ export type Content2 =
|
|
|
134
136
|
| OpenAIChatCompletionChoice21
|
|
135
137
|
| OpenAIChatCompletionChoice22
|
|
136
138
|
| OpenAIChatCompletionChoice23
|
|
137
|
-
| OpenAIChatCompletionChoice24
|
|
139
|
+
| OpenAIChatCompletionChoice24
|
|
140
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
138
141
|
|
|
139
142
|
/**
|
|
140
143
|
* The contents of the assistant message. Can be null when the message contains tool calls only.
|
|
@@ -146,6 +149,7 @@ export type OpenAIChatCompletionChoiceContent =
|
|
|
146
149
|
| OpenAIChatCompletionChoice22
|
|
147
150
|
| OpenAIChatCompletionChoice23
|
|
148
151
|
| OpenAIChatCompletionChoice24
|
|
152
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
149
153
|
>;
|
|
150
154
|
|
|
151
155
|
/**
|
|
@@ -203,6 +207,7 @@ export type Message = {
|
|
|
203
207
|
| OpenAIChatCompletionChoice22
|
|
204
208
|
| OpenAIChatCompletionChoice23
|
|
205
209
|
| OpenAIChatCompletionChoice24
|
|
210
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
206
211
|
>
|
|
207
212
|
| null;
|
|
208
213
|
/**
|
|
@@ -732,12 +737,12 @@ export const Content2$inboundSchema: z.ZodType<
|
|
|
732
737
|
Content2,
|
|
733
738
|
z.ZodTypeDef,
|
|
734
739
|
unknown
|
|
735
|
-
> =
|
|
736
|
-
z.lazy(() => OpenAIChatCompletionChoice21$inboundSchema),
|
|
737
|
-
z.lazy(() => OpenAIChatCompletionChoice22$inboundSchema),
|
|
738
|
-
z.lazy(() => OpenAIChatCompletionChoice23$inboundSchema),
|
|
739
|
-
z.lazy(() => OpenAIChatCompletionChoice24$inboundSchema),
|
|
740
|
-
|
|
740
|
+
> = discriminatedUnion("type", {
|
|
741
|
+
text: z.lazy(() => OpenAIChatCompletionChoice21$inboundSchema),
|
|
742
|
+
image_url: z.lazy(() => OpenAIChatCompletionChoice22$inboundSchema),
|
|
743
|
+
input_audio: z.lazy(() => OpenAIChatCompletionChoice23$inboundSchema),
|
|
744
|
+
file: z.lazy(() => OpenAIChatCompletionChoice24$inboundSchema),
|
|
745
|
+
});
|
|
741
746
|
/** @internal */
|
|
742
747
|
export type Content2$Outbound =
|
|
743
748
|
| OpenAIChatCompletionChoice21$Outbound
|
|
@@ -777,12 +782,12 @@ export const OpenAIChatCompletionChoiceContent$inboundSchema: z.ZodType<
|
|
|
777
782
|
unknown
|
|
778
783
|
> = z.union([
|
|
779
784
|
z.string(),
|
|
780
|
-
z.array(
|
|
781
|
-
z.lazy(() => OpenAIChatCompletionChoice21$inboundSchema),
|
|
782
|
-
z.lazy(() => OpenAIChatCompletionChoice22$inboundSchema),
|
|
783
|
-
z.lazy(() => OpenAIChatCompletionChoice23$inboundSchema),
|
|
784
|
-
z.lazy(() => OpenAIChatCompletionChoice24$inboundSchema),
|
|
785
|
-
|
|
785
|
+
z.array(discriminatedUnion("type", {
|
|
786
|
+
text: z.lazy(() => OpenAIChatCompletionChoice21$inboundSchema),
|
|
787
|
+
image_url: z.lazy(() => OpenAIChatCompletionChoice22$inboundSchema),
|
|
788
|
+
input_audio: z.lazy(() => OpenAIChatCompletionChoice23$inboundSchema),
|
|
789
|
+
file: z.lazy(() => OpenAIChatCompletionChoice24$inboundSchema),
|
|
790
|
+
})),
|
|
786
791
|
]);
|
|
787
792
|
/** @internal */
|
|
788
793
|
export type OpenAIChatCompletionChoiceContent$Outbound =
|
|
@@ -930,14 +935,12 @@ export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
|
|
|
930
935
|
content: z.nullable(
|
|
931
936
|
z.union([
|
|
932
937
|
z.string(),
|
|
933
|
-
z.array(
|
|
934
|
-
z.
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
]),
|
|
940
|
-
),
|
|
938
|
+
z.array(discriminatedUnion("type", {
|
|
939
|
+
text: z.lazy(() => OpenAIChatCompletionChoice21$inboundSchema),
|
|
940
|
+
image_url: z.lazy(() => OpenAIChatCompletionChoice22$inboundSchema),
|
|
941
|
+
input_audio: z.lazy(() => OpenAIChatCompletionChoice23$inboundSchema),
|
|
942
|
+
file: z.lazy(() => OpenAIChatCompletionChoice24$inboundSchema),
|
|
943
|
+
})),
|
|
941
944
|
]),
|
|
942
945
|
),
|
|
943
946
|
reasoning: z.nullable(z.string()).optional(),
|