@chainfuse/types 4.0.3 → 4.0.4
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/dist/ai-tools/index.d.ts +111 -9
- package/dist/ai-tools/index.js +8 -4
- package/dist/zod-4/index.d.ts +2 -3
- package/dist/zod-4/index.js +1 -1
- package/package.json +3 -3
package/dist/ai-tools/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as zm from 'zod/mini';
|
|
2
|
+
import * as z4 from 'zod/v4';
|
|
2
3
|
import type { ZodCoordinate } from '../zod-mini/index.js';
|
|
3
4
|
import { type CloudflareFunctionModelsEnum, type CloudflareModelsEnum } from './workers-ai/index.js';
|
|
4
5
|
export interface Coordinate {
|
|
5
|
-
lat:
|
|
6
|
-
lon:
|
|
6
|
+
lat: zm.infer<typeof ZodCoordinate>;
|
|
7
|
+
lon: zm.infer<typeof ZodCoordinate>;
|
|
7
8
|
}
|
|
8
9
|
export declare namespace AiModels {
|
|
9
10
|
namespace LanguageModels {
|
|
@@ -76,7 +77,7 @@ export declare namespace AiModels {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
export declare const ZodLanguageModelValues:
|
|
80
|
+
export declare const ZodLanguageModelValues: zm.ZodMiniEnum<{
|
|
80
81
|
"workersai:@cf/openai/gpt-oss-120b": "workersai:@cf/openai/gpt-oss-120b";
|
|
81
82
|
"workersai:@cf/qwen/qwen1.5-0.5b-chat": "workersai:@cf/qwen/qwen1.5-0.5b-chat";
|
|
82
83
|
"workersai:@cf/google/gemma-2b-it-lora": "workersai:@cf/google/gemma-2b-it-lora";
|
|
@@ -151,8 +152,83 @@ export declare const ZodLanguageModelValues: z.ZodMiniEnum<{
|
|
|
151
152
|
"openai:o1": AiModels.LanguageModels.OpenAi.o1;
|
|
152
153
|
"openai:o3": AiModels.LanguageModels.OpenAi.o3;
|
|
153
154
|
}>;
|
|
154
|
-
export
|
|
155
|
-
|
|
155
|
+
export declare const ZodLanguageModelValues4: z4.ZodEnum<{
|
|
156
|
+
"workersai:@cf/openai/gpt-oss-120b": "workersai:@cf/openai/gpt-oss-120b";
|
|
157
|
+
"workersai:@cf/qwen/qwen1.5-0.5b-chat": "workersai:@cf/qwen/qwen1.5-0.5b-chat";
|
|
158
|
+
"workersai:@cf/google/gemma-2b-it-lora": "workersai:@cf/google/gemma-2b-it-lora";
|
|
159
|
+
"workersai:@hf/nexusflow/starling-lm-7b-beta": "workersai:@hf/nexusflow/starling-lm-7b-beta";
|
|
160
|
+
"workersai:@cf/meta/llama-3-8b-instruct": "workersai:@cf/meta/llama-3-8b-instruct";
|
|
161
|
+
"workersai:@cf/meta/llama-3.2-3b-instruct": "workersai:@cf/meta/llama-3.2-3b-instruct";
|
|
162
|
+
"workersai:@hf/thebloke/llamaguard-7b-awq": "workersai:@hf/thebloke/llamaguard-7b-awq";
|
|
163
|
+
"workersai:@hf/thebloke/neural-chat-7b-v3-1-awq": "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq";
|
|
164
|
+
"workersai:@cf/meta/llama-guard-3-8b": "workersai:@cf/meta/llama-guard-3-8b";
|
|
165
|
+
"workersai:@cf/meta/llama-2-7b-chat-fp16": "workersai:@cf/meta/llama-2-7b-chat-fp16";
|
|
166
|
+
"workersai:@cf/mistral/mistral-7b-instruct-v0.1": "workersai:@cf/mistral/mistral-7b-instruct-v0.1";
|
|
167
|
+
"workersai:@cf/mistral/mistral-7b-instruct-v0.2-lora": "workersai:@cf/mistral/mistral-7b-instruct-v0.2-lora";
|
|
168
|
+
"workersai:@cf/tinyllama/tinyllama-1.1b-chat-v1.0": "workersai:@cf/tinyllama/tinyllama-1.1b-chat-v1.0";
|
|
169
|
+
"workersai:@hf/mistral/mistral-7b-instruct-v0.2": "workersai:@hf/mistral/mistral-7b-instruct-v0.2";
|
|
170
|
+
"workersai:@cf/fblgit/una-cybertron-7b-v2-bf16": "workersai:@cf/fblgit/una-cybertron-7b-v2-bf16";
|
|
171
|
+
"workersai:@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": "workersai:@cf/deepseek-ai/deepseek-r1-distill-qwen-32b";
|
|
172
|
+
"workersai:@cf/thebloke/discolm-german-7b-v1-awq": "workersai:@cf/thebloke/discolm-german-7b-v1-awq";
|
|
173
|
+
"workersai:@cf/meta/llama-2-7b-chat-int8": "workersai:@cf/meta/llama-2-7b-chat-int8";
|
|
174
|
+
"workersai:@cf/meta/llama-3.1-8b-instruct-fp8": "workersai:@cf/meta/llama-3.1-8b-instruct-fp8";
|
|
175
|
+
"workersai:@hf/thebloke/mistral-7b-instruct-v0.1-awq": "workersai:@hf/thebloke/mistral-7b-instruct-v0.1-awq";
|
|
176
|
+
"workersai:@cf/qwen/qwen1.5-7b-chat-awq": "workersai:@cf/qwen/qwen1.5-7b-chat-awq";
|
|
177
|
+
"workersai:@cf/meta/llama-3.2-1b-instruct": "workersai:@cf/meta/llama-3.2-1b-instruct";
|
|
178
|
+
"workersai:@hf/thebloke/llama-2-13b-chat-awq": "workersai:@hf/thebloke/llama-2-13b-chat-awq";
|
|
179
|
+
"workersai:@hf/thebloke/deepseek-coder-6.7b-base-awq": "workersai:@hf/thebloke/deepseek-coder-6.7b-base-awq";
|
|
180
|
+
"workersai:@cf/meta-llama/llama-2-7b-chat-hf-lora": "workersai:@cf/meta-llama/llama-2-7b-chat-hf-lora";
|
|
181
|
+
"workersai:@cf/meta/llama-3.3-70b-instruct-fp8-fast": "workersai:@cf/meta/llama-3.3-70b-instruct-fp8-fast";
|
|
182
|
+
"workersai:@hf/thebloke/openhermes-2.5-mistral-7b-awq": "workersai:@hf/thebloke/openhermes-2.5-mistral-7b-awq";
|
|
183
|
+
"workersai:@hf/thebloke/deepseek-coder-6.7b-instruct-awq": "workersai:@hf/thebloke/deepseek-coder-6.7b-instruct-awq";
|
|
184
|
+
"workersai:@cf/qwen/qwen2.5-coder-32b-instruct": "workersai:@cf/qwen/qwen2.5-coder-32b-instruct";
|
|
185
|
+
"workersai:@cf/deepseek-ai/deepseek-math-7b-instruct": "workersai:@cf/deepseek-ai/deepseek-math-7b-instruct";
|
|
186
|
+
"workersai:@cf/tiiuae/falcon-7b-instruct": "workersai:@cf/tiiuae/falcon-7b-instruct";
|
|
187
|
+
"workersai:@hf/nousresearch/hermes-2-pro-mistral-7b": "workersai:@hf/nousresearch/hermes-2-pro-mistral-7b";
|
|
188
|
+
"workersai:@cf/meta/llama-3.1-8b-instruct-awq": "workersai:@cf/meta/llama-3.1-8b-instruct-awq";
|
|
189
|
+
"workersai:@hf/thebloke/zephyr-7b-beta-awq": "workersai:@hf/thebloke/zephyr-7b-beta-awq";
|
|
190
|
+
"workersai:@cf/google/gemma-7b-it-lora": "workersai:@cf/google/gemma-7b-it-lora";
|
|
191
|
+
"workersai:@cf/qwen/qwen1.5-1.8b-chat": "workersai:@cf/qwen/qwen1.5-1.8b-chat";
|
|
192
|
+
"workersai:@cf/mistralai/mistral-small-3.1-24b-instruct": "workersai:@cf/mistralai/mistral-small-3.1-24b-instruct";
|
|
193
|
+
"workersai:@cf/meta/llama-3-8b-instruct-awq": "workersai:@cf/meta/llama-3-8b-instruct-awq";
|
|
194
|
+
"workersai:@cf/meta/llama-3.2-11b-vision-instruct": "workersai:@cf/meta/llama-3.2-11b-vision-instruct";
|
|
195
|
+
"workersai:@cf/defog/sqlcoder-7b-2": "workersai:@cf/defog/sqlcoder-7b-2";
|
|
196
|
+
"workersai:@cf/microsoft/phi-2": "workersai:@cf/microsoft/phi-2";
|
|
197
|
+
"workersai:@cf/openai/gpt-oss-20b": "workersai:@cf/openai/gpt-oss-20b";
|
|
198
|
+
"workersai:@hf/google/gemma-7b-it": "workersai:@hf/google/gemma-7b-it";
|
|
199
|
+
"workersai:@cf/qwen/qwen1.5-14b-chat-awq": "workersai:@cf/qwen/qwen1.5-14b-chat-awq";
|
|
200
|
+
"workersai:@cf/openchat/openchat-3.5-0106": "workersai:@cf/openchat/openchat-3.5-0106";
|
|
201
|
+
"workersai:@cf/meta/llama-4-scout-17b-16e-instruct": "workersai:@cf/meta/llama-4-scout-17b-16e-instruct";
|
|
202
|
+
"workersai:@cf/google/gemma-3-12b-it": "workersai:@cf/google/gemma-3-12b-it";
|
|
203
|
+
"workersai:@cf/qwen/qwq-32b": "workersai:@cf/qwen/qwq-32b";
|
|
204
|
+
"azure:gpt-4.1-nano": AiModels.LanguageModels.Azure.gpt41_nano;
|
|
205
|
+
"azure:gpt-4o-mini": AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
206
|
+
"azure:gpt-4.1-mini": AiModels.LanguageModels.Azure.gpt41_mini;
|
|
207
|
+
"azure:o1-mini": AiModels.LanguageModels.Azure.o1_mini;
|
|
208
|
+
"azure:o3-mini": AiModels.LanguageModels.Azure.o3_mini;
|
|
209
|
+
"azure:o4-mini": AiModels.LanguageModels.Azure.o4_mini;
|
|
210
|
+
"azure:gpt-4o": AiModels.LanguageModels.Azure.gpt4o;
|
|
211
|
+
"azure:gpt-4.1": AiModels.LanguageModels.Azure.gpt41;
|
|
212
|
+
"azure:o1": AiModels.LanguageModels.Azure.o1;
|
|
213
|
+
"azure:o3": AiModels.LanguageModels.Azure.o3;
|
|
214
|
+
"anthropic:claude-4-sonnet-latest": AiModels.LanguageModels.Anthropic.sonnet;
|
|
215
|
+
"anthropic:claude-4-opus-latest": AiModels.LanguageModels.Anthropic.haiku;
|
|
216
|
+
"google.generative-ai:gemini-2.0-flash-lite": AiModels.LanguageModels.GoogleGenerativeAi.gemini_flash_lite;
|
|
217
|
+
"google.generative-ai:gemini-2.5-flash-preview": AiModels.LanguageModels.GoogleGenerativeAi.gemini_flash;
|
|
218
|
+
"google.generative-ai:gemini-2.5-pro-preview": AiModels.LanguageModels.GoogleGenerativeAi.gemini_pro;
|
|
219
|
+
"openai:gpt-4.1-nano": AiModels.LanguageModels.OpenAi.gpt41_nano;
|
|
220
|
+
"openai:gpt-4o-mini": AiModels.LanguageModels.OpenAi.gpt4o_mini;
|
|
221
|
+
"openai:gpt-4.1-mini": AiModels.LanguageModels.OpenAi.gpt41_mini;
|
|
222
|
+
"openai:o1-mini": AiModels.LanguageModels.OpenAi.o1_mini;
|
|
223
|
+
"openai:o3-mini": AiModels.LanguageModels.OpenAi.o3_mini;
|
|
224
|
+
"openai:o4-mini": AiModels.LanguageModels.OpenAi.o4_mini;
|
|
225
|
+
"openai:gpt-4o": AiModels.LanguageModels.OpenAi.gpt4o;
|
|
226
|
+
"openai:gpt-4.1": AiModels.LanguageModels.OpenAi.gpt41;
|
|
227
|
+
"openai:o1": AiModels.LanguageModels.OpenAi.o1;
|
|
228
|
+
"openai:o3": AiModels.LanguageModels.OpenAi.o3;
|
|
229
|
+
}>;
|
|
230
|
+
export type LanguageModelValues = zm.infer<typeof ZodLanguageModelValues>;
|
|
231
|
+
export declare const ZodImageModelValues: zm.ZodMiniEnum<{
|
|
156
232
|
"workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting": "workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting";
|
|
157
233
|
"workersai:@cf/black-forest-labs/flux-1-schnell": "workersai:@cf/black-forest-labs/flux-1-schnell";
|
|
158
234
|
"workersai:@cf/bytedance/stable-diffusion-xl-lightning": "workersai:@cf/bytedance/stable-diffusion-xl-lightning";
|
|
@@ -166,8 +242,34 @@ export declare const ZodImageModelValues: z.ZodMiniEnum<{
|
|
|
166
242
|
"google.generative-ai:imagen-3.0-fast-generate-001": AiModels.ImageModels.GoogleGenerativeAi.imagen_fast;
|
|
167
243
|
"openai:dall-e-3": AiModels.ImageModels.OpenAi.dalle3;
|
|
168
244
|
}>;
|
|
169
|
-
export
|
|
170
|
-
|
|
245
|
+
export declare const ZodImageModelValues4: z4.ZodEnum<{
|
|
246
|
+
"workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting": "workersai:@cf/runwayml/stable-diffusion-v1-5-inpainting";
|
|
247
|
+
"workersai:@cf/black-forest-labs/flux-1-schnell": "workersai:@cf/black-forest-labs/flux-1-schnell";
|
|
248
|
+
"workersai:@cf/bytedance/stable-diffusion-xl-lightning": "workersai:@cf/bytedance/stable-diffusion-xl-lightning";
|
|
249
|
+
"workersai:@cf/lykon/dreamshaper-8-lcm": "workersai:@cf/lykon/dreamshaper-8-lcm";
|
|
250
|
+
"workersai:@cf/leonardo/phoenix-1.0": "workersai:@cf/leonardo/phoenix-1.0";
|
|
251
|
+
"workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0": "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0";
|
|
252
|
+
"workersai:@cf/runwayml/stable-diffusion-v1-5-img2img": "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img";
|
|
253
|
+
"workersai:@cf/leonardo/lucid-origin": "workersai:@cf/leonardo/lucid-origin";
|
|
254
|
+
"azure:dall-e-3": AiModels.ImageModels.Azure.dalle3;
|
|
255
|
+
"google.generative-ai:imagen-3.0-generate-002": AiModels.ImageModels.GoogleGenerativeAi.imagen;
|
|
256
|
+
"google.generative-ai:imagen-3.0-fast-generate-001": AiModels.ImageModels.GoogleGenerativeAi.imagen_fast;
|
|
257
|
+
"openai:dall-e-3": AiModels.ImageModels.OpenAi.dalle3;
|
|
258
|
+
}>;
|
|
259
|
+
export type ImageModelValues = zm.infer<typeof ZodImageModelValues>;
|
|
260
|
+
export declare const ZodTextEmbeddingModelValues: zm.ZodMiniEnum<{
|
|
261
|
+
"workersai:@cf/baai/bge-m3": "workersai:@cf/baai/bge-m3";
|
|
262
|
+
"workersai:@cf/baai/bge-small-en-v1.5": "workersai:@cf/baai/bge-small-en-v1.5";
|
|
263
|
+
"workersai:@cf/baai/bge-base-en-v1.5": "workersai:@cf/baai/bge-base-en-v1.5";
|
|
264
|
+
"workersai:@cf/google/embeddinggemma-300m": "workersai:@cf/google/embeddinggemma-300m";
|
|
265
|
+
"workersai:@cf/baai/bge-large-en-v1.5": "workersai:@cf/baai/bge-large-en-v1.5";
|
|
266
|
+
"azure:text-embedding-3-large": AiModels.TextEmbeddingModels.Azure.te3_large;
|
|
267
|
+
"azure:text-embedding-3-small": AiModels.TextEmbeddingModels.Azure.te3_small;
|
|
268
|
+
"google.generative-ai:text-embedding-004": AiModels.TextEmbeddingModels.GoogleGenerativeAi.te4;
|
|
269
|
+
"openai:text-embedding-3-large": AiModels.TextEmbeddingModels.OpenAi.te3_large;
|
|
270
|
+
"openai:text-embedding-3-small": AiModels.TextEmbeddingModels.OpenAi.te3_small;
|
|
271
|
+
}>;
|
|
272
|
+
export declare const ZodTextEmbeddingModelValues4: z4.ZodEnum<{
|
|
171
273
|
"workersai:@cf/baai/bge-m3": "workersai:@cf/baai/bge-m3";
|
|
172
274
|
"workersai:@cf/baai/bge-small-en-v1.5": "workersai:@cf/baai/bge-small-en-v1.5";
|
|
173
275
|
"workersai:@cf/baai/bge-base-en-v1.5": "workersai:@cf/baai/bge-base-en-v1.5";
|
|
@@ -179,7 +281,7 @@ export declare const ZodTextEmbeddingModelValues: z.ZodMiniEnum<{
|
|
|
179
281
|
"openai:text-embedding-3-large": AiModels.TextEmbeddingModels.OpenAi.te3_large;
|
|
180
282
|
"openai:text-embedding-3-small": AiModels.TextEmbeddingModels.OpenAi.te3_small;
|
|
181
283
|
}>;
|
|
182
|
-
export type TextEmbeddingModelValues =
|
|
284
|
+
export type TextEmbeddingModelValues = zm.infer<typeof ZodTextEmbeddingModelValues>;
|
|
183
285
|
export declare const default_mc_generic: LanguageModelValues;
|
|
184
286
|
export declare const default_mc_summary: LanguageModelValues;
|
|
185
287
|
export declare const default_mc_extraction: LanguageModelValues;
|
package/dist/ai-tools/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as zm from 'zod/mini';
|
|
2
|
+
import * as z4 from 'zod/v4';
|
|
2
3
|
import { enabledCloudflareLlmEmbeddingProviders, enabledCloudflareLlmFunctionProviders, enabledCloudflareLlmImageProviders, enabledCloudflareLlmProviders } from './workers-ai/index.js';
|
|
3
4
|
export var AiModels;
|
|
4
5
|
(function (AiModels) {
|
|
@@ -91,17 +92,20 @@ const ZodLanguageModelValuesRaw = Object.entries(AiModels.LanguageModels).reduce
|
|
|
91
92
|
acc.push(value);
|
|
92
93
|
return acc;
|
|
93
94
|
}, []);
|
|
94
|
-
export const ZodLanguageModelValues =
|
|
95
|
+
export const ZodLanguageModelValues = zm.enum(Object.values(Object.assign({}, ...ZodLanguageModelValuesRaw)));
|
|
96
|
+
export const ZodLanguageModelValues4 = z4.enum(Object.values(Object.assign({}, ...ZodLanguageModelValuesRaw)));
|
|
95
97
|
const ZodImageModelValuesRaw = Object.entries(AiModels.ImageModels).reduce((acc, [, value]) => {
|
|
96
98
|
acc.push(value);
|
|
97
99
|
return acc;
|
|
98
100
|
}, []);
|
|
99
|
-
export const ZodImageModelValues =
|
|
101
|
+
export const ZodImageModelValues = zm.enum(Object.values(Object.assign({}, ...ZodImageModelValuesRaw)));
|
|
102
|
+
export const ZodImageModelValues4 = z4.enum(Object.values(Object.assign({}, ...ZodImageModelValuesRaw)));
|
|
100
103
|
const ZodTextEmbeddingModelValuesRaw = Object.entries(AiModels.TextEmbeddingModels).reduce((acc, [, value]) => {
|
|
101
104
|
acc.push(value);
|
|
102
105
|
return acc;
|
|
103
106
|
}, []);
|
|
104
|
-
export const ZodTextEmbeddingModelValues =
|
|
107
|
+
export const ZodTextEmbeddingModelValues = zm.enum(Object.values(Object.assign({}, ...ZodTextEmbeddingModelValuesRaw)));
|
|
108
|
+
export const ZodTextEmbeddingModelValues4 = z4.enum(Object.values(Object.assign({}, ...ZodTextEmbeddingModelValuesRaw)));
|
|
105
109
|
export const default_mc_generic = AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
106
110
|
export const default_mc_summary = AiModels.LanguageModels.Azure.gpt4o;
|
|
107
111
|
export const default_mc_extraction = AiModels.LanguageModels.Azure.gpt4o_mini;
|
package/dist/zod-4/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export type JSON = zInfer<ZodJSONSchema>;
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export type JSON = z.infer<z.ZodJSONSchema>;
|
|
4
3
|
export declare const WorkflowId: z.ZodString;
|
|
5
4
|
export declare const DoId: z.ZodCustomStringFormat<"hex">;
|
|
6
5
|
export declare const ZodCoordinate: z.ZodString;
|
package/dist/zod-4/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"zod": "^4.1.11"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@cloudflare/workers-types": "^4.
|
|
105
|
+
"@cloudflare/workers-types": "^4.20250924.0",
|
|
106
106
|
"@types/validator": "^13.15.3"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "6a6c57df6f9dbfe763ab4cd7f02038b2b47bd57b"
|
|
109
109
|
}
|