@apicity/kimicoding 0.6.0 → 0.6.2
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/README.md +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/zod.d.ts +109 -537
- package/dist/src/zod.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Kimi for Coding provider for Apicity - completely standalone with Anthropic Mess
|
|
|
8
8
|
|
|
9
9
|
Runtime dependencies:
|
|
10
10
|
|
|
11
|
-
- `zod@^
|
|
11
|
+
- `zod@^4.4.3` — request schemas attached to every POST endpoint as `.schema`
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export { KimiCodingError } from "./types.js";
|
|
|
3
3
|
export { withRetry, withFallback, withStreamRetry, withStreamFallback, withRateLimit, createRateLimiter, } from "./middleware.js";
|
|
4
4
|
export type { RetryOptions, FallbackOptions, RateLimiterOptions, RateLimiter, RateLimitOptions, } from "./middleware.js";
|
|
5
5
|
export { sseToIterable } from "./sse.js";
|
|
6
|
-
export type { ChatRequest, ChatParsedRequest, ChatMessage, AnthropicMessage, AnthropicStreamEvent, AnthropicContentBlock, EmbeddingRequest, EmbeddingParsedRequest, EmbeddingResponse, EmbeddingData, CountTokensRequest, CountTokensParsedRequest, CountTokensResponse, Provider, KimiCodingOptions, KimiCodingProvider, ContentBlock, TextContentBlock, ImageContentBlock, ImageSource, Base64ImageSource, UrlImageSource, MessageContent, Role, KimiCodingModel, KimiCodingModelListResponse, } from "./types.js";
|
|
6
|
+
export type { ChatRequest, ChatRequestInput, ChatParsedRequest, ChatMessage, AnthropicMessage, AnthropicStreamEvent, AnthropicContentBlock, EmbeddingRequest, EmbeddingRequestInput, EmbeddingParsedRequest, EmbeddingResponse, EmbeddingData, CountTokensRequest, CountTokensRequestInput, CountTokensParsedRequest, CountTokensResponse, Provider, KimiCodingOptions, KimiCodingProvider, ContentBlock, TextContentBlock, ImageContentBlock, ImageSource, Base64ImageSource, UrlImageSource, MessageContent, Role, KimiCodingModel, KimiCodingModelListResponse, } from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EACL,SAAS,EACT,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,IAAI,EACJ,eAAe,EACf,2BAA2B,GAC5B,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EACL,SAAS,EACT,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,IAAI,EACJ,eAAe,EACf,2BAA2B,GAC5B,MAAM,SAAS,CAAC"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
|
-
export type { Role, Base64ImageSource, UrlImageSource, ImageSource, TextContentBlock, ImageContentBlock, ContentBlock, MessageContent, ChatMessage, ChatRequest, ChatParsedRequest, EmbeddingRequest, EmbeddingParsedRequest, CountTokensRequest, CountTokensParsedRequest, KimiCodingOptions, } from "./zod.js";
|
|
2
|
+
export type { Role, Base64ImageSource, UrlImageSource, ImageSource, TextContentBlock, ImageContentBlock, ContentBlock, MessageContent, ChatMessage, ChatRequest, ChatRequestInput, ChatParsedRequest, EmbeddingRequest, EmbeddingRequestInput, EmbeddingParsedRequest, CountTokensRequest, CountTokensRequestInput, CountTokensParsedRequest, KimiCodingOptions, } from "./zod.js";
|
|
3
3
|
export interface AnthropicContentBlock {
|
|
4
4
|
type: "text" | "thinking";
|
|
5
5
|
text?: string;
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,YAAY,EACV,IAAI,EACJ,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAGD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAA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AAC;KACpD,CAAC;IACF,GAAG,EAAE;QAAE,MAAM,EAAE;YAAE,EAAE,EAAE,eAAe,CAAA;SAAE,CAAA;KAAE,CAAC;CAC1C;AAED,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBACX,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAM5D;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC"}
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AA6JA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,MAAM,CAAS;IACf,IAAI,CAAU;IACvB,YAAY,OAAe,EAAE,MAAc,EAAE,IAAc;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC;IAC3B,CAAC;CACF"}
|
package/dist/src/zod.d.ts
CHANGED
|
@@ -1,617 +1,186 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const Base64ImageSourceSchema: z.ZodObject<{
|
|
3
3
|
type: z.ZodLiteral<"base64">;
|
|
4
|
-
media_type: z.ZodEnum<
|
|
4
|
+
media_type: z.ZodEnum<{
|
|
5
|
+
"image/jpeg": "image/jpeg";
|
|
6
|
+
"image/png": "image/png";
|
|
7
|
+
"image/gif": "image/gif";
|
|
8
|
+
"image/webp": "image/webp";
|
|
9
|
+
}>;
|
|
5
10
|
data: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
type: "base64";
|
|
8
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
9
|
-
data: string;
|
|
10
|
-
}, {
|
|
11
|
-
type: "base64";
|
|
12
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
13
|
-
data: string;
|
|
14
|
-
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
15
12
|
export declare const UrlImageSourceSchema: z.ZodObject<{
|
|
16
13
|
type: z.ZodLiteral<"url">;
|
|
17
14
|
url: z.ZodString;
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
url: string;
|
|
21
|
-
}, {
|
|
22
|
-
type: "url";
|
|
23
|
-
url: string;
|
|
24
|
-
}>;
|
|
25
|
-
export declare const ImageSourceSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const ImageSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
17
|
type: z.ZodLiteral<"base64">;
|
|
27
|
-
media_type: z.ZodEnum<
|
|
18
|
+
media_type: z.ZodEnum<{
|
|
19
|
+
"image/jpeg": "image/jpeg";
|
|
20
|
+
"image/png": "image/png";
|
|
21
|
+
"image/gif": "image/gif";
|
|
22
|
+
"image/webp": "image/webp";
|
|
23
|
+
}>;
|
|
28
24
|
data: z.ZodString;
|
|
29
|
-
},
|
|
30
|
-
type: "base64";
|
|
31
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
32
|
-
data: string;
|
|
33
|
-
}, {
|
|
34
|
-
type: "base64";
|
|
35
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
36
|
-
data: string;
|
|
37
|
-
}>, z.ZodObject<{
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
26
|
type: z.ZodLiteral<"url">;
|
|
39
27
|
url: z.ZodString;
|
|
40
|
-
},
|
|
41
|
-
type: "url";
|
|
42
|
-
url: string;
|
|
43
|
-
}, {
|
|
44
|
-
type: "url";
|
|
45
|
-
url: string;
|
|
46
|
-
}>]>;
|
|
28
|
+
}, z.core.$strip>], "type">;
|
|
47
29
|
export declare const TextContentBlockSchema: z.ZodObject<{
|
|
48
30
|
type: z.ZodLiteral<"text">;
|
|
49
31
|
text: z.ZodString;
|
|
50
|
-
},
|
|
51
|
-
type: "text";
|
|
52
|
-
text: string;
|
|
53
|
-
}, {
|
|
54
|
-
type: "text";
|
|
55
|
-
text: string;
|
|
56
|
-
}>;
|
|
32
|
+
}, z.core.$strip>;
|
|
57
33
|
export declare const ImageContentBlockSchema: z.ZodObject<{
|
|
58
34
|
type: z.ZodLiteral<"image">;
|
|
59
|
-
source: z.ZodDiscriminatedUnion<
|
|
35
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
60
36
|
type: z.ZodLiteral<"base64">;
|
|
61
|
-
media_type: z.ZodEnum<
|
|
37
|
+
media_type: z.ZodEnum<{
|
|
38
|
+
"image/jpeg": "image/jpeg";
|
|
39
|
+
"image/png": "image/png";
|
|
40
|
+
"image/gif": "image/gif";
|
|
41
|
+
"image/webp": "image/webp";
|
|
42
|
+
}>;
|
|
62
43
|
data: z.ZodString;
|
|
63
|
-
},
|
|
64
|
-
type: "base64";
|
|
65
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
66
|
-
data: string;
|
|
67
|
-
}, {
|
|
68
|
-
type: "base64";
|
|
69
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
70
|
-
data: string;
|
|
71
|
-
}>, z.ZodObject<{
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
45
|
type: z.ZodLiteral<"url">;
|
|
73
46
|
url: z.ZodString;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, {
|
|
78
|
-
type: "url";
|
|
79
|
-
url: string;
|
|
80
|
-
}>]>;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
type: "image";
|
|
83
|
-
source: {
|
|
84
|
-
type: "base64";
|
|
85
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
86
|
-
data: string;
|
|
87
|
-
} | {
|
|
88
|
-
type: "url";
|
|
89
|
-
url: string;
|
|
90
|
-
};
|
|
91
|
-
}, {
|
|
92
|
-
type: "image";
|
|
93
|
-
source: {
|
|
94
|
-
type: "base64";
|
|
95
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
96
|
-
data: string;
|
|
97
|
-
} | {
|
|
98
|
-
type: "url";
|
|
99
|
-
url: string;
|
|
100
|
-
};
|
|
101
|
-
}>;
|
|
102
|
-
export declare const ContentBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
47
|
+
}, z.core.$strip>], "type">;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const ContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
103
50
|
type: z.ZodLiteral<"text">;
|
|
104
51
|
text: z.ZodString;
|
|
105
|
-
},
|
|
106
|
-
type: "text";
|
|
107
|
-
text: string;
|
|
108
|
-
}, {
|
|
109
|
-
type: "text";
|
|
110
|
-
text: string;
|
|
111
|
-
}>, z.ZodObject<{
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
53
|
type: z.ZodLiteral<"image">;
|
|
113
|
-
source: z.ZodDiscriminatedUnion<
|
|
54
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
114
55
|
type: z.ZodLiteral<"base64">;
|
|
115
|
-
media_type: z.ZodEnum<
|
|
56
|
+
media_type: z.ZodEnum<{
|
|
57
|
+
"image/jpeg": "image/jpeg";
|
|
58
|
+
"image/png": "image/png";
|
|
59
|
+
"image/gif": "image/gif";
|
|
60
|
+
"image/webp": "image/webp";
|
|
61
|
+
}>;
|
|
116
62
|
data: z.ZodString;
|
|
117
|
-
},
|
|
118
|
-
type: "base64";
|
|
119
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
120
|
-
data: string;
|
|
121
|
-
}, {
|
|
122
|
-
type: "base64";
|
|
123
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
124
|
-
data: string;
|
|
125
|
-
}>, z.ZodObject<{
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
64
|
type: z.ZodLiteral<"url">;
|
|
127
65
|
url: z.ZodString;
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
url: string;
|
|
131
|
-
}, {
|
|
132
|
-
type: "url";
|
|
133
|
-
url: string;
|
|
134
|
-
}>]>;
|
|
135
|
-
}, "strip", z.ZodTypeAny, {
|
|
136
|
-
type: "image";
|
|
137
|
-
source: {
|
|
138
|
-
type: "base64";
|
|
139
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
140
|
-
data: string;
|
|
141
|
-
} | {
|
|
142
|
-
type: "url";
|
|
143
|
-
url: string;
|
|
144
|
-
};
|
|
145
|
-
}, {
|
|
146
|
-
type: "image";
|
|
147
|
-
source: {
|
|
148
|
-
type: "base64";
|
|
149
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
150
|
-
data: string;
|
|
151
|
-
} | {
|
|
152
|
-
type: "url";
|
|
153
|
-
url: string;
|
|
154
|
-
};
|
|
155
|
-
}>]>;
|
|
66
|
+
}, z.core.$strip>], "type">;
|
|
67
|
+
}, z.core.$strip>], "type">;
|
|
156
68
|
export declare const ChatMessageSchema: z.ZodObject<{
|
|
157
|
-
role: z.ZodEnum<
|
|
158
|
-
|
|
69
|
+
role: z.ZodEnum<{
|
|
70
|
+
user: "user";
|
|
71
|
+
assistant: "assistant";
|
|
72
|
+
}>;
|
|
73
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
159
74
|
type: z.ZodLiteral<"text">;
|
|
160
75
|
text: z.ZodString;
|
|
161
|
-
},
|
|
162
|
-
type: "text";
|
|
163
|
-
text: string;
|
|
164
|
-
}, {
|
|
165
|
-
type: "text";
|
|
166
|
-
text: string;
|
|
167
|
-
}>, z.ZodObject<{
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
77
|
type: z.ZodLiteral<"image">;
|
|
169
|
-
source: z.ZodDiscriminatedUnion<
|
|
78
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
170
79
|
type: z.ZodLiteral<"base64">;
|
|
171
|
-
media_type: z.ZodEnum<
|
|
80
|
+
media_type: z.ZodEnum<{
|
|
81
|
+
"image/jpeg": "image/jpeg";
|
|
82
|
+
"image/png": "image/png";
|
|
83
|
+
"image/gif": "image/gif";
|
|
84
|
+
"image/webp": "image/webp";
|
|
85
|
+
}>;
|
|
172
86
|
data: z.ZodString;
|
|
173
|
-
},
|
|
174
|
-
type: "base64";
|
|
175
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
176
|
-
data: string;
|
|
177
|
-
}, {
|
|
178
|
-
type: "base64";
|
|
179
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
180
|
-
data: string;
|
|
181
|
-
}>, z.ZodObject<{
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
88
|
type: z.ZodLiteral<"url">;
|
|
183
89
|
url: z.ZodString;
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}, {
|
|
188
|
-
type: "url";
|
|
189
|
-
url: string;
|
|
190
|
-
}>]>;
|
|
191
|
-
}, "strip", z.ZodTypeAny, {
|
|
192
|
-
type: "image";
|
|
193
|
-
source: {
|
|
194
|
-
type: "base64";
|
|
195
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
196
|
-
data: string;
|
|
197
|
-
} | {
|
|
198
|
-
type: "url";
|
|
199
|
-
url: string;
|
|
200
|
-
};
|
|
201
|
-
}, {
|
|
202
|
-
type: "image";
|
|
203
|
-
source: {
|
|
204
|
-
type: "base64";
|
|
205
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
206
|
-
data: string;
|
|
207
|
-
} | {
|
|
208
|
-
type: "url";
|
|
209
|
-
url: string;
|
|
210
|
-
};
|
|
211
|
-
}>]>, "many">]>;
|
|
212
|
-
}, "strip", z.ZodTypeAny, {
|
|
213
|
-
role: "user" | "assistant";
|
|
214
|
-
content: string | ({
|
|
215
|
-
type: "text";
|
|
216
|
-
text: string;
|
|
217
|
-
} | {
|
|
218
|
-
type: "image";
|
|
219
|
-
source: {
|
|
220
|
-
type: "base64";
|
|
221
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
222
|
-
data: string;
|
|
223
|
-
} | {
|
|
224
|
-
type: "url";
|
|
225
|
-
url: string;
|
|
226
|
-
};
|
|
227
|
-
})[];
|
|
228
|
-
}, {
|
|
229
|
-
role: "user" | "assistant";
|
|
230
|
-
content: string | ({
|
|
231
|
-
type: "text";
|
|
232
|
-
text: string;
|
|
233
|
-
} | {
|
|
234
|
-
type: "image";
|
|
235
|
-
source: {
|
|
236
|
-
type: "base64";
|
|
237
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
238
|
-
data: string;
|
|
239
|
-
} | {
|
|
240
|
-
type: "url";
|
|
241
|
-
url: string;
|
|
242
|
-
};
|
|
243
|
-
})[];
|
|
244
|
-
}>;
|
|
90
|
+
}, z.core.$strip>], "type">;
|
|
91
|
+
}, z.core.$strip>], "type">>]>;
|
|
92
|
+
}, z.core.$strip>;
|
|
245
93
|
export declare const ChatRequestSchema: z.ZodObject<{
|
|
246
94
|
model: z.ZodString;
|
|
247
95
|
messages: z.ZodArray<z.ZodObject<{
|
|
248
|
-
role: z.ZodEnum<
|
|
249
|
-
|
|
96
|
+
role: z.ZodEnum<{
|
|
97
|
+
user: "user";
|
|
98
|
+
assistant: "assistant";
|
|
99
|
+
}>;
|
|
100
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
250
101
|
type: z.ZodLiteral<"text">;
|
|
251
102
|
text: z.ZodString;
|
|
252
|
-
},
|
|
253
|
-
type: "text";
|
|
254
|
-
text: string;
|
|
255
|
-
}, {
|
|
256
|
-
type: "text";
|
|
257
|
-
text: string;
|
|
258
|
-
}>, z.ZodObject<{
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
104
|
type: z.ZodLiteral<"image">;
|
|
260
|
-
source: z.ZodDiscriminatedUnion<
|
|
105
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
261
106
|
type: z.ZodLiteral<"base64">;
|
|
262
|
-
media_type: z.ZodEnum<
|
|
107
|
+
media_type: z.ZodEnum<{
|
|
108
|
+
"image/jpeg": "image/jpeg";
|
|
109
|
+
"image/png": "image/png";
|
|
110
|
+
"image/gif": "image/gif";
|
|
111
|
+
"image/webp": "image/webp";
|
|
112
|
+
}>;
|
|
263
113
|
data: z.ZodString;
|
|
264
|
-
},
|
|
265
|
-
type: "base64";
|
|
266
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
267
|
-
data: string;
|
|
268
|
-
}, {
|
|
269
|
-
type: "base64";
|
|
270
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
271
|
-
data: string;
|
|
272
|
-
}>, z.ZodObject<{
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
273
115
|
type: z.ZodLiteral<"url">;
|
|
274
116
|
url: z.ZodString;
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}, {
|
|
279
|
-
type: "url";
|
|
280
|
-
url: string;
|
|
281
|
-
}>]>;
|
|
282
|
-
}, "strip", z.ZodTypeAny, {
|
|
283
|
-
type: "image";
|
|
284
|
-
source: {
|
|
285
|
-
type: "base64";
|
|
286
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
287
|
-
data: string;
|
|
288
|
-
} | {
|
|
289
|
-
type: "url";
|
|
290
|
-
url: string;
|
|
291
|
-
};
|
|
292
|
-
}, {
|
|
293
|
-
type: "image";
|
|
294
|
-
source: {
|
|
295
|
-
type: "base64";
|
|
296
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
297
|
-
data: string;
|
|
298
|
-
} | {
|
|
299
|
-
type: "url";
|
|
300
|
-
url: string;
|
|
301
|
-
};
|
|
302
|
-
}>]>, "many">]>;
|
|
303
|
-
}, "strip", z.ZodTypeAny, {
|
|
304
|
-
role: "user" | "assistant";
|
|
305
|
-
content: string | ({
|
|
306
|
-
type: "text";
|
|
307
|
-
text: string;
|
|
308
|
-
} | {
|
|
309
|
-
type: "image";
|
|
310
|
-
source: {
|
|
311
|
-
type: "base64";
|
|
312
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
313
|
-
data: string;
|
|
314
|
-
} | {
|
|
315
|
-
type: "url";
|
|
316
|
-
url: string;
|
|
317
|
-
};
|
|
318
|
-
})[];
|
|
319
|
-
}, {
|
|
320
|
-
role: "user" | "assistant";
|
|
321
|
-
content: string | ({
|
|
322
|
-
type: "text";
|
|
323
|
-
text: string;
|
|
324
|
-
} | {
|
|
325
|
-
type: "image";
|
|
326
|
-
source: {
|
|
327
|
-
type: "base64";
|
|
328
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
329
|
-
data: string;
|
|
330
|
-
} | {
|
|
331
|
-
type: "url";
|
|
332
|
-
url: string;
|
|
333
|
-
};
|
|
334
|
-
})[];
|
|
335
|
-
}>, "many">;
|
|
117
|
+
}, z.core.$strip>], "type">;
|
|
118
|
+
}, z.core.$strip>], "type">>]>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
336
120
|
max_tokens: z.ZodNumber;
|
|
337
121
|
system: z.ZodOptional<z.ZodString>;
|
|
338
122
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
339
123
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
340
|
-
stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
124
|
+
stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
341
125
|
stream: z.ZodOptional<z.ZodBoolean>;
|
|
342
|
-
},
|
|
343
|
-
model: string;
|
|
344
|
-
messages: {
|
|
345
|
-
role: "user" | "assistant";
|
|
346
|
-
content: string | ({
|
|
347
|
-
type: "text";
|
|
348
|
-
text: string;
|
|
349
|
-
} | {
|
|
350
|
-
type: "image";
|
|
351
|
-
source: {
|
|
352
|
-
type: "base64";
|
|
353
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
354
|
-
data: string;
|
|
355
|
-
} | {
|
|
356
|
-
type: "url";
|
|
357
|
-
url: string;
|
|
358
|
-
};
|
|
359
|
-
})[];
|
|
360
|
-
}[];
|
|
361
|
-
max_tokens: number;
|
|
362
|
-
system?: string | undefined;
|
|
363
|
-
temperature?: number | undefined;
|
|
364
|
-
top_p?: number | undefined;
|
|
365
|
-
stop_sequences?: string[] | undefined;
|
|
366
|
-
stream?: boolean | undefined;
|
|
367
|
-
}, {
|
|
368
|
-
model: string;
|
|
369
|
-
messages: {
|
|
370
|
-
role: "user" | "assistant";
|
|
371
|
-
content: string | ({
|
|
372
|
-
type: "text";
|
|
373
|
-
text: string;
|
|
374
|
-
} | {
|
|
375
|
-
type: "image";
|
|
376
|
-
source: {
|
|
377
|
-
type: "base64";
|
|
378
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
379
|
-
data: string;
|
|
380
|
-
} | {
|
|
381
|
-
type: "url";
|
|
382
|
-
url: string;
|
|
383
|
-
};
|
|
384
|
-
})[];
|
|
385
|
-
}[];
|
|
386
|
-
max_tokens: number;
|
|
387
|
-
system?: string | undefined;
|
|
388
|
-
temperature?: number | undefined;
|
|
389
|
-
top_p?: number | undefined;
|
|
390
|
-
stop_sequences?: string[] | undefined;
|
|
391
|
-
stream?: boolean | undefined;
|
|
392
|
-
}>;
|
|
126
|
+
}, z.core.$strip>;
|
|
393
127
|
export declare const EmbeddingRequestSchema: z.ZodObject<{
|
|
394
|
-
input: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
128
|
+
input: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>;
|
|
395
129
|
model: z.ZodString;
|
|
396
|
-
encoding_format: z.ZodOptional<z.ZodEnum<
|
|
130
|
+
encoding_format: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
base64: "base64";
|
|
132
|
+
float: "float";
|
|
133
|
+
}>>;
|
|
397
134
|
dimensions: z.ZodOptional<z.ZodNumber>;
|
|
398
135
|
user: z.ZodOptional<z.ZodString>;
|
|
399
|
-
},
|
|
400
|
-
model: string;
|
|
401
|
-
input: string | string[] | number[] | number[][];
|
|
402
|
-
user?: string | undefined;
|
|
403
|
-
encoding_format?: "float" | "base64" | undefined;
|
|
404
|
-
dimensions?: number | undefined;
|
|
405
|
-
}, {
|
|
406
|
-
model: string;
|
|
407
|
-
input: string | string[] | number[] | number[][];
|
|
408
|
-
user?: string | undefined;
|
|
409
|
-
encoding_format?: "float" | "base64" | undefined;
|
|
410
|
-
dimensions?: number | undefined;
|
|
411
|
-
}>;
|
|
136
|
+
}, z.core.$strip>;
|
|
412
137
|
export declare const CountTokensRequestSchema: z.ZodObject<{
|
|
413
138
|
model: z.ZodString;
|
|
414
139
|
messages: z.ZodArray<z.ZodObject<{
|
|
415
|
-
role: z.ZodEnum<
|
|
416
|
-
|
|
140
|
+
role: z.ZodEnum<{
|
|
141
|
+
user: "user";
|
|
142
|
+
assistant: "assistant";
|
|
143
|
+
}>;
|
|
144
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
417
145
|
type: z.ZodLiteral<"text">;
|
|
418
146
|
text: z.ZodString;
|
|
419
|
-
},
|
|
420
|
-
type: "text";
|
|
421
|
-
text: string;
|
|
422
|
-
}, {
|
|
423
|
-
type: "text";
|
|
424
|
-
text: string;
|
|
425
|
-
}>, z.ZodObject<{
|
|
147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
426
148
|
type: z.ZodLiteral<"image">;
|
|
427
|
-
source: z.ZodDiscriminatedUnion<
|
|
149
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
428
150
|
type: z.ZodLiteral<"base64">;
|
|
429
|
-
media_type: z.ZodEnum<
|
|
151
|
+
media_type: z.ZodEnum<{
|
|
152
|
+
"image/jpeg": "image/jpeg";
|
|
153
|
+
"image/png": "image/png";
|
|
154
|
+
"image/gif": "image/gif";
|
|
155
|
+
"image/webp": "image/webp";
|
|
156
|
+
}>;
|
|
430
157
|
data: z.ZodString;
|
|
431
|
-
},
|
|
432
|
-
type: "base64";
|
|
433
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
434
|
-
data: string;
|
|
435
|
-
}, {
|
|
436
|
-
type: "base64";
|
|
437
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
438
|
-
data: string;
|
|
439
|
-
}>, z.ZodObject<{
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
440
159
|
type: z.ZodLiteral<"url">;
|
|
441
160
|
url: z.ZodString;
|
|
442
|
-
},
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}, {
|
|
446
|
-
type: "url";
|
|
447
|
-
url: string;
|
|
448
|
-
}>]>;
|
|
449
|
-
}, "strip", z.ZodTypeAny, {
|
|
450
|
-
type: "image";
|
|
451
|
-
source: {
|
|
452
|
-
type: "base64";
|
|
453
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
454
|
-
data: string;
|
|
455
|
-
} | {
|
|
456
|
-
type: "url";
|
|
457
|
-
url: string;
|
|
458
|
-
};
|
|
459
|
-
}, {
|
|
460
|
-
type: "image";
|
|
461
|
-
source: {
|
|
462
|
-
type: "base64";
|
|
463
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
464
|
-
data: string;
|
|
465
|
-
} | {
|
|
466
|
-
type: "url";
|
|
467
|
-
url: string;
|
|
468
|
-
};
|
|
469
|
-
}>]>, "many">]>;
|
|
470
|
-
}, "strip", z.ZodTypeAny, {
|
|
471
|
-
role: "user" | "assistant";
|
|
472
|
-
content: string | ({
|
|
473
|
-
type: "text";
|
|
474
|
-
text: string;
|
|
475
|
-
} | {
|
|
476
|
-
type: "image";
|
|
477
|
-
source: {
|
|
478
|
-
type: "base64";
|
|
479
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
480
|
-
data: string;
|
|
481
|
-
} | {
|
|
482
|
-
type: "url";
|
|
483
|
-
url: string;
|
|
484
|
-
};
|
|
485
|
-
})[];
|
|
486
|
-
}, {
|
|
487
|
-
role: "user" | "assistant";
|
|
488
|
-
content: string | ({
|
|
489
|
-
type: "text";
|
|
490
|
-
text: string;
|
|
491
|
-
} | {
|
|
492
|
-
type: "image";
|
|
493
|
-
source: {
|
|
494
|
-
type: "base64";
|
|
495
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
496
|
-
data: string;
|
|
497
|
-
} | {
|
|
498
|
-
type: "url";
|
|
499
|
-
url: string;
|
|
500
|
-
};
|
|
501
|
-
})[];
|
|
502
|
-
}>, "many">;
|
|
161
|
+
}, z.core.$strip>], "type">;
|
|
162
|
+
}, z.core.$strip>], "type">>]>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
503
164
|
system: z.ZodOptional<z.ZodString>;
|
|
504
165
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
505
166
|
name: z.ZodString;
|
|
506
167
|
description: z.ZodOptional<z.ZodString>;
|
|
507
168
|
input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
508
|
-
},
|
|
509
|
-
|
|
510
|
-
input_schema: Record<string, unknown>;
|
|
511
|
-
description?: string | undefined;
|
|
512
|
-
}, {
|
|
513
|
-
name: string;
|
|
514
|
-
input_schema: Record<string, unknown>;
|
|
515
|
-
description?: string | undefined;
|
|
516
|
-
}>, "many">>;
|
|
517
|
-
tool_choice: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
169
|
+
}, z.core.$strip>>>;
|
|
170
|
+
tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
518
171
|
type: z.ZodString;
|
|
519
|
-
},
|
|
520
|
-
type: string;
|
|
521
|
-
}, {
|
|
522
|
-
type: string;
|
|
523
|
-
}>, z.ZodObject<{
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
524
173
|
type: z.ZodLiteral<"tool">;
|
|
525
174
|
name: z.ZodString;
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
name: string;
|
|
529
|
-
}, {
|
|
530
|
-
type: "tool";
|
|
531
|
-
name: string;
|
|
532
|
-
}>]>>;
|
|
533
|
-
}, "strip", z.ZodTypeAny, {
|
|
534
|
-
model: string;
|
|
535
|
-
messages: {
|
|
536
|
-
role: "user" | "assistant";
|
|
537
|
-
content: string | ({
|
|
538
|
-
type: "text";
|
|
539
|
-
text: string;
|
|
540
|
-
} | {
|
|
541
|
-
type: "image";
|
|
542
|
-
source: {
|
|
543
|
-
type: "base64";
|
|
544
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
545
|
-
data: string;
|
|
546
|
-
} | {
|
|
547
|
-
type: "url";
|
|
548
|
-
url: string;
|
|
549
|
-
};
|
|
550
|
-
})[];
|
|
551
|
-
}[];
|
|
552
|
-
system?: string | undefined;
|
|
553
|
-
tools?: {
|
|
554
|
-
name: string;
|
|
555
|
-
input_schema: Record<string, unknown>;
|
|
556
|
-
description?: string | undefined;
|
|
557
|
-
}[] | undefined;
|
|
558
|
-
tool_choice?: {
|
|
559
|
-
type: string;
|
|
560
|
-
} | {
|
|
561
|
-
type: "tool";
|
|
562
|
-
name: string;
|
|
563
|
-
} | undefined;
|
|
564
|
-
}, {
|
|
565
|
-
model: string;
|
|
566
|
-
messages: {
|
|
567
|
-
role: "user" | "assistant";
|
|
568
|
-
content: string | ({
|
|
569
|
-
type: "text";
|
|
570
|
-
text: string;
|
|
571
|
-
} | {
|
|
572
|
-
type: "image";
|
|
573
|
-
source: {
|
|
574
|
-
type: "base64";
|
|
575
|
-
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
|
|
576
|
-
data: string;
|
|
577
|
-
} | {
|
|
578
|
-
type: "url";
|
|
579
|
-
url: string;
|
|
580
|
-
};
|
|
581
|
-
})[];
|
|
582
|
-
}[];
|
|
583
|
-
system?: string | undefined;
|
|
584
|
-
tools?: {
|
|
585
|
-
name: string;
|
|
586
|
-
input_schema: Record<string, unknown>;
|
|
587
|
-
description?: string | undefined;
|
|
588
|
-
}[] | undefined;
|
|
589
|
-
tool_choice?: {
|
|
590
|
-
type: string;
|
|
591
|
-
} | {
|
|
592
|
-
type: "tool";
|
|
593
|
-
name: string;
|
|
594
|
-
} | undefined;
|
|
595
|
-
}>;
|
|
175
|
+
}, z.core.$strip>]>>;
|
|
176
|
+
}, z.core.$strip>;
|
|
596
177
|
export declare const KimiCodingOptionsSchema: z.ZodObject<{
|
|
597
178
|
apiKey: z.ZodString;
|
|
598
179
|
baseURL: z.ZodOptional<z.ZodString>;
|
|
599
180
|
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
600
181
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
601
|
-
fetch: z.ZodOptional<z.
|
|
602
|
-
},
|
|
603
|
-
apiKey: string;
|
|
604
|
-
baseURL?: string | undefined;
|
|
605
|
-
maxRetries?: number | undefined;
|
|
606
|
-
timeout?: number | undefined;
|
|
607
|
-
fetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined;
|
|
608
|
-
}, {
|
|
609
|
-
apiKey: string;
|
|
610
|
-
baseURL?: string | undefined;
|
|
611
|
-
maxRetries?: number | undefined;
|
|
612
|
-
timeout?: number | undefined;
|
|
613
|
-
fetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined;
|
|
614
|
-
}>;
|
|
182
|
+
fetch: z.ZodOptional<z.ZodCustom<(input: RequestInfo | URL, init?: RequestInit) => Promise<Response>, (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
615
184
|
export type Base64ImageSource = z.infer<typeof Base64ImageSourceSchema>;
|
|
616
185
|
export type UrlImageSource = z.infer<typeof UrlImageSourceSchema>;
|
|
617
186
|
export type ImageSource = z.infer<typeof ImageSourceSchema>;
|
|
@@ -622,10 +191,13 @@ export type MessageContent = string | ContentBlock[];
|
|
|
622
191
|
export type ChatMessage = z.infer<typeof ChatMessageSchema>;
|
|
623
192
|
export type Role = ChatMessage["role"];
|
|
624
193
|
export type ChatRequest = z.input<typeof ChatRequestSchema>;
|
|
194
|
+
export type ChatRequestInput = ChatRequest;
|
|
625
195
|
export type ChatParsedRequest = z.output<typeof ChatRequestSchema>;
|
|
626
196
|
export type EmbeddingRequest = z.input<typeof EmbeddingRequestSchema>;
|
|
197
|
+
export type EmbeddingRequestInput = EmbeddingRequest;
|
|
627
198
|
export type EmbeddingParsedRequest = z.output<typeof EmbeddingRequestSchema>;
|
|
628
199
|
export type CountTokensRequest = z.input<typeof CountTokensRequestSchema>;
|
|
200
|
+
export type CountTokensRequestInput = CountTokensRequest;
|
|
629
201
|
export type CountTokensParsedRequest = z.output<typeof CountTokensRequestSchema>;
|
|
630
202
|
export type KimiCodingOptions = z.infer<typeof KimiCodingOptionsSchema>;
|
|
631
203
|
//# sourceMappingURL=zod.d.ts.map
|
package/dist/src/zod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|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,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apicity/kimicoding",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Kimi for Coding provider for Apicity - completely standalone with Anthropic Messages API format, streaming-first, and built-in middleware.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"zod": "^
|
|
28
|
+
"zod": "^4.4.3"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist",
|