@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
|
@@ -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";
|
|
@@ -140,7 +142,8 @@ export type OpenAIChatCompletionChunkContent2 =
|
|
|
140
142
|
| OpenAIChatCompletionChunk21
|
|
141
143
|
| OpenAIChatCompletionChunk22
|
|
142
144
|
| OpenAIChatCompletionChunk23
|
|
143
|
-
| OpenAIChatCompletionChunk24
|
|
145
|
+
| OpenAIChatCompletionChunk24
|
|
146
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
144
147
|
|
|
145
148
|
/**
|
|
146
149
|
* The content of the chunk. May be a string, content parts, or null.
|
|
@@ -152,6 +155,7 @@ export type OpenAIChatCompletionChunkContent =
|
|
|
152
155
|
| OpenAIChatCompletionChunk22
|
|
153
156
|
| OpenAIChatCompletionChunk23
|
|
154
157
|
| OpenAIChatCompletionChunk24
|
|
158
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
155
159
|
>;
|
|
156
160
|
|
|
157
161
|
/**
|
|
@@ -208,6 +212,7 @@ export type Delta = {
|
|
|
208
212
|
| OpenAIChatCompletionChunk22
|
|
209
213
|
| OpenAIChatCompletionChunk23
|
|
210
214
|
| OpenAIChatCompletionChunk24
|
|
215
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
211
216
|
>
|
|
212
217
|
| null
|
|
213
218
|
| undefined;
|
|
@@ -778,12 +783,12 @@ export const OpenAIChatCompletionChunkContent2$inboundSchema: z.ZodType<
|
|
|
778
783
|
OpenAIChatCompletionChunkContent2,
|
|
779
784
|
z.ZodTypeDef,
|
|
780
785
|
unknown
|
|
781
|
-
> =
|
|
782
|
-
z.lazy(() => OpenAIChatCompletionChunk21$inboundSchema),
|
|
783
|
-
z.lazy(() => OpenAIChatCompletionChunk22$inboundSchema),
|
|
784
|
-
z.lazy(() => OpenAIChatCompletionChunk23$inboundSchema),
|
|
785
|
-
z.lazy(() => OpenAIChatCompletionChunk24$inboundSchema),
|
|
786
|
-
|
|
786
|
+
> = discriminatedUnion("type", {
|
|
787
|
+
text: z.lazy(() => OpenAIChatCompletionChunk21$inboundSchema),
|
|
788
|
+
image_url: z.lazy(() => OpenAIChatCompletionChunk22$inboundSchema),
|
|
789
|
+
input_audio: z.lazy(() => OpenAIChatCompletionChunk23$inboundSchema),
|
|
790
|
+
file: z.lazy(() => OpenAIChatCompletionChunk24$inboundSchema),
|
|
791
|
+
});
|
|
787
792
|
/** @internal */
|
|
788
793
|
export type OpenAIChatCompletionChunkContent2$Outbound =
|
|
789
794
|
| OpenAIChatCompletionChunk21$Outbound
|
|
@@ -829,12 +834,12 @@ export const OpenAIChatCompletionChunkContent$inboundSchema: z.ZodType<
|
|
|
829
834
|
unknown
|
|
830
835
|
> = z.union([
|
|
831
836
|
z.string(),
|
|
832
|
-
z.array(
|
|
833
|
-
z.lazy(() => OpenAIChatCompletionChunk21$inboundSchema),
|
|
834
|
-
z.lazy(() => OpenAIChatCompletionChunk22$inboundSchema),
|
|
835
|
-
z.lazy(() => OpenAIChatCompletionChunk23$inboundSchema),
|
|
836
|
-
z.lazy(() => OpenAIChatCompletionChunk24$inboundSchema),
|
|
837
|
-
|
|
837
|
+
z.array(discriminatedUnion("type", {
|
|
838
|
+
text: z.lazy(() => OpenAIChatCompletionChunk21$inboundSchema),
|
|
839
|
+
image_url: z.lazy(() => OpenAIChatCompletionChunk22$inboundSchema),
|
|
840
|
+
input_audio: z.lazy(() => OpenAIChatCompletionChunk23$inboundSchema),
|
|
841
|
+
file: z.lazy(() => OpenAIChatCompletionChunk24$inboundSchema),
|
|
842
|
+
})),
|
|
838
843
|
]);
|
|
839
844
|
/** @internal */
|
|
840
845
|
export type OpenAIChatCompletionChunkContent$Outbound =
|
|
@@ -984,14 +989,12 @@ export const Delta$inboundSchema: z.ZodType<Delta, z.ZodTypeDef, unknown> = z
|
|
|
984
989
|
content: z.nullable(
|
|
985
990
|
z.union([
|
|
986
991
|
z.string(),
|
|
987
|
-
z.array(
|
|
988
|
-
z.
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
]),
|
|
994
|
-
),
|
|
992
|
+
z.array(discriminatedUnion("type", {
|
|
993
|
+
text: z.lazy(() => OpenAIChatCompletionChunk21$inboundSchema),
|
|
994
|
+
image_url: z.lazy(() => OpenAIChatCompletionChunk22$inboundSchema),
|
|
995
|
+
input_audio: z.lazy(() => OpenAIChatCompletionChunk23$inboundSchema),
|
|
996
|
+
file: z.lazy(() => OpenAIChatCompletionChunk24$inboundSchema),
|
|
997
|
+
})),
|
|
995
998
|
]),
|
|
996
999
|
).optional(),
|
|
997
1000
|
reasoning: z.nullable(z.string()).optional(),
|
|
@@ -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";
|
|
@@ -22,7 +24,8 @@ import {
|
|
|
22
24
|
|
|
23
25
|
export type OutputMessageContent =
|
|
24
26
|
| (OutputText & { type: "output_text" })
|
|
25
|
-
| (Refusal & { type: "refusal" })
|
|
27
|
+
| (Refusal & { type: "refusal" })
|
|
28
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
26
29
|
|
|
27
30
|
/**
|
|
28
31
|
* The processing status of this message (in_progress, completed, or incomplete).
|
|
@@ -69,7 +72,9 @@ export type OutputMessage = {
|
|
|
69
72
|
* Array of content items in the assistant's response. Can contain text outputs or refusal messages.
|
|
70
73
|
*/
|
|
71
74
|
content: Array<
|
|
72
|
-
(OutputText & { type: "output_text" })
|
|
75
|
+
| (OutputText & { type: "output_text" })
|
|
76
|
+
| (Refusal & { type: "refusal" })
|
|
77
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
73
78
|
>;
|
|
74
79
|
/**
|
|
75
80
|
* The processing status of this message (in_progress, completed, or incomplete).
|
|
@@ -86,10 +91,12 @@ export const OutputMessageContent$inboundSchema: z.ZodType<
|
|
|
86
91
|
OutputMessageContent,
|
|
87
92
|
z.ZodTypeDef,
|
|
88
93
|
unknown
|
|
89
|
-
> =
|
|
90
|
-
OutputText$inboundSchema.and(
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
> = discriminatedUnion("type", {
|
|
95
|
+
output_text: OutputText$inboundSchema.and(
|
|
96
|
+
z.object({ type: z.literal("output_text") }),
|
|
97
|
+
),
|
|
98
|
+
refusal: Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
|
|
99
|
+
});
|
|
93
100
|
/** @internal */
|
|
94
101
|
export type OutputMessageContent$Outbound =
|
|
95
102
|
| (OutputText$Outbound & { type: "output_text" })
|
|
@@ -149,12 +156,14 @@ export const OutputMessage$inboundSchema: z.ZodType<
|
|
|
149
156
|
id: z.string(),
|
|
150
157
|
role: z.literal("assistant"),
|
|
151
158
|
content: z.array(
|
|
152
|
-
|
|
153
|
-
OutputText$inboundSchema.and(
|
|
159
|
+
discriminatedUnion("type", {
|
|
160
|
+
output_text: OutputText$inboundSchema.and(
|
|
154
161
|
z.object({ type: z.literal("output_text") }),
|
|
155
162
|
),
|
|
156
|
-
Refusal$inboundSchema.and(
|
|
157
|
-
|
|
163
|
+
refusal: Refusal$inboundSchema.and(
|
|
164
|
+
z.object({ type: z.literal("refusal") }),
|
|
165
|
+
),
|
|
166
|
+
}),
|
|
158
167
|
),
|
|
159
168
|
status: OutputMessageStatus$inboundSchema,
|
|
160
169
|
phase: Phase$inboundSchema.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";
|
|
@@ -23,7 +25,8 @@ import {
|
|
|
23
25
|
|
|
24
26
|
export type OutputMessageWithIdContent =
|
|
25
27
|
| (OutputText & { type: "output_text" })
|
|
26
|
-
| (Refusal & { type: "refusal" })
|
|
28
|
+
| (Refusal & { type: "refusal" })
|
|
29
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* The processing status of this message (in_progress, completed, or incomplete).
|
|
@@ -74,7 +77,9 @@ export type OutputMessageWithId = {
|
|
|
74
77
|
* Array of content items in the assistant's response. Can contain text outputs or refusal messages.
|
|
75
78
|
*/
|
|
76
79
|
content: Array<
|
|
77
|
-
(OutputText & { type: "output_text" })
|
|
80
|
+
| (OutputText & { type: "output_text" })
|
|
81
|
+
| (Refusal & { type: "refusal" })
|
|
82
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
78
83
|
>;
|
|
79
84
|
/**
|
|
80
85
|
* The processing status of this message (in_progress, completed, or incomplete).
|
|
@@ -99,10 +104,12 @@ export const OutputMessageWithIdContent$inboundSchema: z.ZodType<
|
|
|
99
104
|
OutputMessageWithIdContent,
|
|
100
105
|
z.ZodTypeDef,
|
|
101
106
|
unknown
|
|
102
|
-
> =
|
|
103
|
-
OutputText$inboundSchema.and(
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
> = discriminatedUnion("type", {
|
|
108
|
+
output_text: OutputText$inboundSchema.and(
|
|
109
|
+
z.object({ type: z.literal("output_text") }),
|
|
110
|
+
),
|
|
111
|
+
refusal: Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
|
|
112
|
+
});
|
|
106
113
|
/** @internal */
|
|
107
114
|
export type OutputMessageWithIdContent$Outbound =
|
|
108
115
|
| (OutputText$Outbound & { type: "output_text" })
|
|
@@ -163,12 +170,14 @@ export const OutputMessageWithId$inboundSchema: z.ZodType<
|
|
|
163
170
|
id: z.string(),
|
|
164
171
|
role: z.literal("assistant"),
|
|
165
172
|
content: z.array(
|
|
166
|
-
|
|
167
|
-
OutputText$inboundSchema.and(
|
|
173
|
+
discriminatedUnion("type", {
|
|
174
|
+
output_text: OutputText$inboundSchema.and(
|
|
168
175
|
z.object({ type: z.literal("output_text") }),
|
|
169
176
|
),
|
|
170
|
-
Refusal$inboundSchema.and(
|
|
171
|
-
|
|
177
|
+
refusal: Refusal$inboundSchema.and(
|
|
178
|
+
z.object({ type: z.literal("refusal") }),
|
|
179
|
+
),
|
|
180
|
+
}),
|
|
172
181
|
),
|
|
173
182
|
status: OutputMessageWithIdStatus$inboundSchema,
|
|
174
183
|
phase: OutputMessageWithIdPhase$inboundSchema.optional(),
|
|
@@ -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 {
|
|
@@ -41,7 +43,8 @@ export type Annotations =
|
|
|
41
43
|
| FileCitation
|
|
42
44
|
| URLCitation
|
|
43
45
|
| ContainerFileCitation
|
|
44
|
-
| FilePath
|
|
46
|
+
| FilePath
|
|
47
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
45
48
|
|
|
46
49
|
/**
|
|
47
50
|
* Text content output from the model with optional annotations for citations and file references.
|
|
@@ -59,7 +62,13 @@ export type OutputText = {
|
|
|
59
62
|
* Array of annotations providing citations and references for the text. Used to attribute sources and reference files mentioned in the output.
|
|
60
63
|
*/
|
|
61
64
|
annotations?:
|
|
62
|
-
| Array<
|
|
65
|
+
| Array<
|
|
66
|
+
| FileCitation
|
|
67
|
+
| URLCitation
|
|
68
|
+
| ContainerFileCitation
|
|
69
|
+
| FilePath
|
|
70
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
71
|
+
>
|
|
63
72
|
| undefined;
|
|
64
73
|
logprobs?: Array<LogProb> | undefined;
|
|
65
74
|
};
|
|
@@ -69,12 +78,12 @@ export const Annotations$inboundSchema: z.ZodType<
|
|
|
69
78
|
Annotations,
|
|
70
79
|
z.ZodTypeDef,
|
|
71
80
|
unknown
|
|
72
|
-
> =
|
|
73
|
-
FileCitation$inboundSchema,
|
|
74
|
-
URLCitation$inboundSchema,
|
|
75
|
-
ContainerFileCitation$inboundSchema,
|
|
76
|
-
FilePath$inboundSchema,
|
|
77
|
-
|
|
81
|
+
> = discriminatedUnion("type", {
|
|
82
|
+
file_citation: FileCitation$inboundSchema,
|
|
83
|
+
url_citation: URLCitation$inboundSchema,
|
|
84
|
+
container_file_citation: ContainerFileCitation$inboundSchema,
|
|
85
|
+
file_path: FilePath$inboundSchema,
|
|
86
|
+
});
|
|
78
87
|
/** @internal */
|
|
79
88
|
export type Annotations$Outbound =
|
|
80
89
|
| FileCitation$Outbound
|
|
@@ -115,14 +124,12 @@ export const OutputText$inboundSchema: z.ZodType<
|
|
|
115
124
|
> = z.object({
|
|
116
125
|
type: z.literal("output_text"),
|
|
117
126
|
text: z.string(),
|
|
118
|
-
annotations: z.array(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
]),
|
|
125
|
-
).optional(),
|
|
127
|
+
annotations: z.array(discriminatedUnion("type", {
|
|
128
|
+
file_citation: FileCitation$inboundSchema,
|
|
129
|
+
url_citation: URLCitation$inboundSchema,
|
|
130
|
+
container_file_citation: ContainerFileCitation$inboundSchema,
|
|
131
|
+
file_path: FilePath$inboundSchema,
|
|
132
|
+
})).optional(),
|
|
126
133
|
logprobs: z.array(LogProb$inboundSchema).optional(),
|
|
127
134
|
});
|
|
128
135
|
/** @internal */
|
|
@@ -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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
12
|
import {
|
|
@@ -29,7 +31,8 @@ import {
|
|
|
29
31
|
export type Part =
|
|
30
32
|
| (OutputText & { type: "output_text" })
|
|
31
33
|
| (Refusal & { type: "refusal" })
|
|
32
|
-
| (ReasoningText & { type: "reasoning_text" })
|
|
34
|
+
| (ReasoningText & { type: "reasoning_text" })
|
|
35
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
33
36
|
|
|
34
37
|
export type ResponseContentPartAddedEvent = {
|
|
35
38
|
type: "response.content_part.added";
|
|
@@ -40,18 +43,23 @@ export type ResponseContentPartAddedEvent = {
|
|
|
40
43
|
part:
|
|
41
44
|
| (OutputText & { type: "output_text" })
|
|
42
45
|
| (Refusal & { type: "refusal" })
|
|
43
|
-
| (ReasoningText & { type: "reasoning_text" })
|
|
46
|
+
| (ReasoningText & { type: "reasoning_text" })
|
|
47
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
44
48
|
};
|
|
45
49
|
|
|
46
50
|
/** @internal */
|
|
47
|
-
export const Part$inboundSchema: z.ZodType<Part, z.ZodTypeDef, unknown> =
|
|
48
|
-
|
|
49
|
-
OutputText$inboundSchema.and(
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
export const Part$inboundSchema: z.ZodType<Part, z.ZodTypeDef, unknown> =
|
|
52
|
+
discriminatedUnion("type", {
|
|
53
|
+
output_text: OutputText$inboundSchema.and(
|
|
54
|
+
z.object({ type: z.literal("output_text") }),
|
|
55
|
+
),
|
|
56
|
+
refusal: Refusal$inboundSchema.and(
|
|
57
|
+
z.object({ type: z.literal("refusal") }),
|
|
58
|
+
),
|
|
59
|
+
reasoning_text: ReasoningText$inboundSchema.and(
|
|
52
60
|
z.object({ type: z.literal("reasoning_text") }),
|
|
53
61
|
),
|
|
54
|
-
|
|
62
|
+
});
|
|
55
63
|
/** @internal */
|
|
56
64
|
export type Part$Outbound =
|
|
57
65
|
| (OutputText$Outbound & { type: "output_text" })
|
|
@@ -92,13 +100,17 @@ export const ResponseContentPartAddedEvent$inboundSchema: z.ZodType<
|
|
|
92
100
|
item_id: z.string(),
|
|
93
101
|
output_index: z.number().int(),
|
|
94
102
|
content_index: z.number().int(),
|
|
95
|
-
part:
|
|
96
|
-
OutputText$inboundSchema.and(
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
part: discriminatedUnion("type", {
|
|
104
|
+
output_text: OutputText$inboundSchema.and(
|
|
105
|
+
z.object({ type: z.literal("output_text") }),
|
|
106
|
+
),
|
|
107
|
+
refusal: Refusal$inboundSchema.and(
|
|
108
|
+
z.object({ type: z.literal("refusal") }),
|
|
109
|
+
),
|
|
110
|
+
reasoning_text: ReasoningText$inboundSchema.and(
|
|
99
111
|
z.object({ type: z.literal("reasoning_text") }),
|
|
100
112
|
),
|
|
101
|
-
|
|
113
|
+
}),
|
|
102
114
|
}).transform((v) => {
|
|
103
115
|
return remap$(v, {
|
|
104
116
|
"sequence_number": "sequenceNumber",
|
|
@@ -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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
12
|
import {
|
|
@@ -29,7 +31,8 @@ import {
|
|
|
29
31
|
export type ResponseContentPartDoneEventPart =
|
|
30
32
|
| (OutputText & { type: "output_text" })
|
|
31
33
|
| (Refusal & { type: "refusal" })
|
|
32
|
-
| (ReasoningText & { type: "reasoning_text" })
|
|
34
|
+
| (ReasoningText & { type: "reasoning_text" })
|
|
35
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
33
36
|
|
|
34
37
|
export type ResponseContentPartDoneEvent = {
|
|
35
38
|
type: "response.content_part.done";
|
|
@@ -40,7 +43,8 @@ export type ResponseContentPartDoneEvent = {
|
|
|
40
43
|
part:
|
|
41
44
|
| (OutputText & { type: "output_text" })
|
|
42
45
|
| (Refusal & { type: "refusal" })
|
|
43
|
-
| (ReasoningText & { type: "reasoning_text" })
|
|
46
|
+
| (ReasoningText & { type: "reasoning_text" })
|
|
47
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
44
48
|
};
|
|
45
49
|
|
|
46
50
|
/** @internal */
|
|
@@ -48,13 +52,15 @@ export const ResponseContentPartDoneEventPart$inboundSchema: z.ZodType<
|
|
|
48
52
|
ResponseContentPartDoneEventPart,
|
|
49
53
|
z.ZodTypeDef,
|
|
50
54
|
unknown
|
|
51
|
-
> =
|
|
52
|
-
OutputText$inboundSchema.and(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
> = discriminatedUnion("type", {
|
|
56
|
+
output_text: OutputText$inboundSchema.and(
|
|
57
|
+
z.object({ type: z.literal("output_text") }),
|
|
58
|
+
),
|
|
59
|
+
refusal: Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
|
|
60
|
+
reasoning_text: ReasoningText$inboundSchema.and(
|
|
55
61
|
z.object({ type: z.literal("reasoning_text") }),
|
|
56
62
|
),
|
|
57
|
-
|
|
63
|
+
});
|
|
58
64
|
/** @internal */
|
|
59
65
|
export type ResponseContentPartDoneEventPart$Outbound =
|
|
60
66
|
| (OutputText$Outbound & { type: "output_text" })
|
|
@@ -104,13 +110,17 @@ export const ResponseContentPartDoneEvent$inboundSchema: z.ZodType<
|
|
|
104
110
|
item_id: z.string(),
|
|
105
111
|
output_index: z.number().int(),
|
|
106
112
|
content_index: z.number().int(),
|
|
107
|
-
part:
|
|
108
|
-
OutputText$inboundSchema.and(
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
part: discriminatedUnion("type", {
|
|
114
|
+
output_text: OutputText$inboundSchema.and(
|
|
115
|
+
z.object({ type: z.literal("output_text") }),
|
|
116
|
+
),
|
|
117
|
+
refusal: Refusal$inboundSchema.and(
|
|
118
|
+
z.object({ type: z.literal("refusal") }),
|
|
119
|
+
),
|
|
120
|
+
reasoning_text: ReasoningText$inboundSchema.and(
|
|
111
121
|
z.object({ type: z.literal("reasoning_text") }),
|
|
112
122
|
),
|
|
113
|
-
|
|
123
|
+
}),
|
|
114
124
|
}).transform((v) => {
|
|
115
125
|
return remap$(v, {
|
|
116
126
|
"sequence_number": "sequenceNumber",
|
|
@@ -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 ResponseFormat =
|
|
29
31
|
| TextResponseFormat
|
|
30
32
|
| JSONSchemaResponseFormat
|
|
31
|
-
| JSONObjectResponseFormat
|
|
33
|
+
| JSONObjectResponseFormat
|
|
34
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
32
35
|
|
|
33
36
|
/** @internal */
|
|
34
37
|
export const ResponseFormat$inboundSchema: z.ZodType<
|
|
35
38
|
ResponseFormat,
|
|
36
39
|
z.ZodTypeDef,
|
|
37
40
|
unknown
|
|
38
|
-
> =
|
|
39
|
-
TextResponseFormat$inboundSchema,
|
|
40
|
-
JSONSchemaResponseFormat$inboundSchema,
|
|
41
|
-
JSONObjectResponseFormat$inboundSchema,
|
|
42
|
-
|
|
41
|
+
> = discriminatedUnion("type", {
|
|
42
|
+
text: TextResponseFormat$inboundSchema,
|
|
43
|
+
json_schema: JSONSchemaResponseFormat$inboundSchema,
|
|
44
|
+
json_object: JSONObjectResponseFormat$inboundSchema,
|
|
45
|
+
});
|
|
43
46
|
/** @internal */
|
|
44
47
|
export type ResponseFormat$Outbound =
|
|
45
48
|
| TextResponseFormat$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";
|
|
@@ -197,7 +199,8 @@ export type FiltersFilters =
|
|
|
197
199
|
| (ComparisonFilter & { type: "lt" })
|
|
198
200
|
| (ComparisonFilter & { type: "lte" })
|
|
199
201
|
| (ResponseObjectFilters2 & { type: "and" })
|
|
200
|
-
| (ResponseObjectFilters2 & { type: "or" })
|
|
202
|
+
| (ResponseObjectFilters2 & { type: "or" })
|
|
203
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
201
204
|
|
|
202
205
|
export type Filters2 = {
|
|
203
206
|
type: FiltersType;
|
|
@@ -210,6 +213,7 @@ export type Filters2 = {
|
|
|
210
213
|
| (ComparisonFilter & { type: "lte" })
|
|
211
214
|
| (ResponseObjectFilters2 & { type: "and" })
|
|
212
215
|
| (ResponseObjectFilters2 & { type: "or" })
|
|
216
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
213
217
|
>;
|
|
214
218
|
};
|
|
215
219
|
|
|
@@ -221,7 +225,8 @@ export type ToolsFilters =
|
|
|
221
225
|
| (ComparisonFilter & { type: "lt" })
|
|
222
226
|
| (ComparisonFilter & { type: "lte" })
|
|
223
227
|
| (Filters2 & { type: "and" })
|
|
224
|
-
| (Filters2 & { type: "or" })
|
|
228
|
+
| (Filters2 & { type: "or" })
|
|
229
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
225
230
|
|
|
226
231
|
/**
|
|
227
232
|
* File search tool definition: Configures semantic search over one or more vector stores, with optional filters, ranking options, and result limits.
|
|
@@ -238,6 +243,7 @@ export type ToolsFileSearchToolDefinition = {
|
|
|
238
243
|
| (ComparisonFilter & { type: "lte" })
|
|
239
244
|
| (Filters2 & { type: "and" })
|
|
240
245
|
| (Filters2 & { type: "or" })
|
|
246
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
241
247
|
| undefined;
|
|
242
248
|
maxNumResults?: number | undefined;
|
|
243
249
|
rankingOptions?: RankingOptions | undefined;
|
|
@@ -426,20 +432,20 @@ export const FiltersFilters$inboundSchema: z.ZodType<
|
|
|
426
432
|
FiltersFilters,
|
|
427
433
|
z.ZodTypeDef,
|
|
428
434
|
unknown
|
|
429
|
-
> =
|
|
430
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
431
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
432
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
433
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
|
|
434
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
|
|
435
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
|
|
436
|
-
z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
|
|
435
|
+
> = discriminatedUnion("type", {
|
|
436
|
+
eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
437
|
+
ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
438
|
+
gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
439
|
+
gte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
|
|
440
|
+
lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
|
|
441
|
+
lte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
|
|
442
|
+
and: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
|
|
437
443
|
z.object({ type: z.literal("and") }),
|
|
438
444
|
),
|
|
439
|
-
z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
|
|
445
|
+
or: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
|
|
440
446
|
z.object({ type: z.literal("or") }),
|
|
441
447
|
),
|
|
442
|
-
|
|
448
|
+
});
|
|
443
449
|
/** @internal */
|
|
444
450
|
export type FiltersFilters$Outbound =
|
|
445
451
|
| (ComparisonFilter$Outbound & { type: "eq" })
|
|
@@ -491,22 +497,24 @@ export const Filters2$inboundSchema: z.ZodType<
|
|
|
491
497
|
unknown
|
|
492
498
|
> = z.object({
|
|
493
499
|
type: FiltersType$inboundSchema,
|
|
494
|
-
filters: z.array(
|
|
495
|
-
z.
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
500
|
+
filters: z.array(discriminatedUnion("type", {
|
|
501
|
+
eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
502
|
+
ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
503
|
+
gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
504
|
+
gte: ComparisonFilter$inboundSchema.and(
|
|
505
|
+
z.object({ type: z.literal("gte") }),
|
|
506
|
+
),
|
|
507
|
+
lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
|
|
508
|
+
lte: ComparisonFilter$inboundSchema.and(
|
|
509
|
+
z.object({ type: z.literal("lte") }),
|
|
510
|
+
),
|
|
511
|
+
and: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
|
|
512
|
+
z.object({ type: z.literal("and") }),
|
|
513
|
+
),
|
|
514
|
+
or: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
|
|
515
|
+
z.object({ type: z.literal("or") }),
|
|
516
|
+
),
|
|
517
|
+
})),
|
|
510
518
|
});
|
|
511
519
|
/** @internal */
|
|
512
520
|
export type Filters2$Outbound = {
|
|
@@ -566,18 +574,20 @@ export const ToolsFilters$inboundSchema: z.ZodType<
|
|
|
566
574
|
ToolsFilters,
|
|
567
575
|
z.ZodTypeDef,
|
|
568
576
|
unknown
|
|
569
|
-
> =
|
|
570
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
571
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
572
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
573
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
|
|
574
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
|
|
575
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
|
|
576
|
-
z.lazy(() => Filters2$inboundSchema).and(
|
|
577
|
+
> = discriminatedUnion("type", {
|
|
578
|
+
eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
579
|
+
ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
580
|
+
gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
581
|
+
gte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
|
|
582
|
+
lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
|
|
583
|
+
lte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
|
|
584
|
+
and: z.lazy(() => Filters2$inboundSchema).and(
|
|
577
585
|
z.object({ type: z.literal("and") }),
|
|
578
586
|
),
|
|
579
|
-
z.lazy(() => Filters2$inboundSchema).and(
|
|
580
|
-
|
|
587
|
+
or: z.lazy(() => Filters2$inboundSchema).and(
|
|
588
|
+
z.object({ type: z.literal("or") }),
|
|
589
|
+
),
|
|
590
|
+
});
|
|
581
591
|
/** @internal */
|
|
582
592
|
export type ToolsFilters$Outbound =
|
|
583
593
|
| (ComparisonFilter$Outbound & { type: "eq" })
|
|
@@ -630,20 +640,24 @@ export const ToolsFileSearchToolDefinition$inboundSchema: z.ZodType<
|
|
|
630
640
|
> = z.object({
|
|
631
641
|
type: z.literal("file_search"),
|
|
632
642
|
vector_store_ids: z.array(z.string()),
|
|
633
|
-
filters:
|
|
634
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
635
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
636
|
-
ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
637
|
-
ComparisonFilter$inboundSchema.and(
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
z.
|
|
643
|
+
filters: discriminatedUnion("type", {
|
|
644
|
+
eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
|
|
645
|
+
ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
|
|
646
|
+
gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
|
|
647
|
+
gte: ComparisonFilter$inboundSchema.and(
|
|
648
|
+
z.object({ type: z.literal("gte") }),
|
|
649
|
+
),
|
|
650
|
+
lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
|
|
651
|
+
lte: ComparisonFilter$inboundSchema.and(
|
|
652
|
+
z.object({ type: z.literal("lte") }),
|
|
653
|
+
),
|
|
654
|
+
and: z.lazy(() => Filters2$inboundSchema).and(
|
|
641
655
|
z.object({ type: z.literal("and") }),
|
|
642
656
|
),
|
|
643
|
-
z.lazy(() => Filters2$inboundSchema).and(
|
|
657
|
+
or: z.lazy(() => Filters2$inboundSchema).and(
|
|
644
658
|
z.object({ type: z.literal("or") }),
|
|
645
659
|
),
|
|
646
|
-
|
|
660
|
+
}).optional(),
|
|
647
661
|
max_num_results: z.number().int().optional(),
|
|
648
662
|
ranking_options: RankingOptions$inboundSchema.optional(),
|
|
649
663
|
}).transform((v) => {
|