@keystrokehq/gemini 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/count-tokens.cjs +4 -4
- package/dist/actions/count-tokens.cjs.map +1 -1
- package/dist/actions/count-tokens.d.cts +21 -3
- package/dist/actions/count-tokens.d.cts.map +1 -1
- package/dist/actions/count-tokens.d.mts +21 -3
- package/dist/actions/count-tokens.d.mts.map +1 -1
- package/dist/actions/count-tokens.mjs +4 -4
- package/dist/actions/count-tokens.mjs.map +1 -1
- package/dist/actions/embed-content.cjs +1 -1
- package/dist/actions/embed-content.cjs.map +1 -1
- package/dist/actions/embed-content.d.cts +21 -3
- package/dist/actions/embed-content.d.cts.map +1 -1
- package/dist/actions/embed-content.d.mts +21 -3
- package/dist/actions/embed-content.d.mts.map +1 -1
- package/dist/actions/embed-content.mjs +1 -1
- package/dist/actions/embed-content.mjs.map +1 -1
- package/dist/actions/generate-content.cjs +7 -7
- package/dist/actions/generate-content.cjs.map +1 -1
- package/dist/actions/generate-content.d.cts +72 -3
- package/dist/actions/generate-content.d.cts.map +1 -1
- package/dist/actions/generate-content.d.mts +72 -3
- package/dist/actions/generate-content.d.mts.map +1 -1
- package/dist/actions/generate-content.mjs +7 -7
- package/dist/actions/generate-content.mjs.map +1 -1
- package/dist/actions/generate-image.cjs +4 -4
- package/dist/actions/generate-image.cjs.map +1 -1
- package/dist/actions/generate-image.d.cts +74 -3
- package/dist/actions/generate-image.d.cts.map +1 -1
- package/dist/actions/generate-image.d.mts +74 -3
- package/dist/actions/generate-image.d.mts.map +1 -1
- package/dist/actions/generate-image.mjs +4 -4
- package/dist/actions/generate-image.mjs.map +1 -1
- package/dist/actions/generate-videos.cjs +4 -4
- package/dist/actions/generate-videos.cjs.map +1 -1
- package/dist/actions/generate-videos.d.cts +52 -3
- package/dist/actions/generate-videos.d.cts.map +1 -1
- package/dist/actions/generate-videos.d.mts +52 -3
- package/dist/actions/generate-videos.d.mts.map +1 -1
- package/dist/actions/generate-videos.mjs +4 -4
- package/dist/actions/generate-videos.mjs.map +1 -1
- package/dist/actions/list-models.cjs +16 -16
- package/dist/actions/list-models.cjs.map +1 -1
- package/dist/actions/list-models.d.cts +79 -3
- package/dist/actions/list-models.d.cts.map +1 -1
- package/dist/actions/list-models.d.mts +79 -3
- package/dist/actions/list-models.d.mts.map +1 -1
- package/dist/actions/list-models.mjs +16 -16
- package/dist/actions/list-models.mjs.map +1 -1
- package/dist/actions/wait-for-video.cjs +11 -11
- package/dist/actions/wait-for-video.cjs.map +1 -1
- package/dist/actions/wait-for-video.d.cts +33 -3
- package/dist/actions/wait-for-video.d.cts.map +1 -1
- package/dist/actions/wait-for-video.d.mts +33 -3
- package/dist/actions/wait-for-video.d.mts.map +1 -1
- package/dist/actions/wait-for-video.mjs +11 -11
- package/dist/actions/wait-for-video.mjs.map +1 -1
- package/dist/execute.cjs +1 -1
- package/dist/execute.cjs.map +1 -1
- package/dist/execute.mjs +1 -1
- package/dist/execute.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -47,15 +47,15 @@ const GeminiGenerateImageInput = zod.z.object({
|
|
|
47
47
|
system_instruction: zod.z.string().describe("System instruction to guide image generation behavior").optional()
|
|
48
48
|
});
|
|
49
49
|
const GeminiGenerateImage_FileDownloadableSchema = zod.z.object({
|
|
50
|
-
name: zod.z.string().describe("Name of the file"),
|
|
51
|
-
s3url: zod.z.string().describe("S3 URL of the downloaded file."),
|
|
52
|
-
mimetype: zod.z.string().describe("Mime type of the file.")
|
|
50
|
+
name: zod.z.string().describe("Name of the file").nullable(),
|
|
51
|
+
s3url: zod.z.string().describe("S3 URL of the downloaded file.").nullable(),
|
|
52
|
+
mimetype: zod.z.string().describe("Mime type of the file.").nullable()
|
|
53
53
|
});
|
|
54
54
|
const GeminiGenerateImageOutput = zod.z.object({ image: GeminiGenerateImage_FileDownloadableSchema.nullable() });
|
|
55
55
|
const geminiGenerateImage = require_action.action("GEMINI_GENERATE_IMAGE", {
|
|
56
56
|
slug: "gemini-generate-image",
|
|
57
57
|
name: "Generate Image (Nano Banana)",
|
|
58
|
-
description: "Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one image per call
|
|
58
|
+
description: "Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one downloadable image per call, or a text-type entry in data.content when no image is produced. Always validate that an image was returned before treating the call as successful. Output formats are raster only (JPG/PNG/WebP); request PNG for transparency. Concurrent usage may trigger HTTP 429/RESOURCE_EXHAUSTED — keep concurrency ≤3 and use exponential backoff (1s→2s→4s, ~5 retries). NOTE NEVER EVER TRUE SYNC_TO_WORKBENCH IN RUBE_MULTI_EXECUTE_TOOL",
|
|
59
59
|
input: GeminiGenerateImageInput,
|
|
60
60
|
output: GeminiGenerateImageOutput
|
|
61
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-image.cjs","names":["z","action"],"sources":["../../src/actions/generate-image.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateImageInput
|
|
1
|
+
{"version":3,"file":"generate-image.cjs","names":["z","action"],"sources":["../../src/actions/generate-image.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateImageInput = z.object({\n model: z.enum([\"gemini-2.5-flash-image\", \"gemini-3-pro-image-preview\", \"gemini-2.0-flash-exp-image-generation\"]).default(\"gemini-3-pro-image-preview\").describe(\"Model to use for image generation. Options: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (advanced with 4K, thinking mode), 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental).\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter\").optional(),\n top_p: z.number().describe(\"Nucleus sampling parameter (0.0 to 1.0)\").optional(),\n prompt: z.string().describe(\"Text prompt for image generation Sensitive, trademarked, or explicit content triggers HTTP 400 (PROHIBITED_CONTENT or IMAGE_RECITATION) with no image returned — rephrase into neutral, policy-compliant language rather than retrying identical prompts.\"),\n timeout: z.number().default(300).describe(\"Request timeout in seconds. Default is 300 seconds (5 minutes). Increase for complex prompts or high-resolution images. Minimum 120 seconds, maximum 600 seconds.\").optional(),\n image_size: z.enum([\"1K\", \"2K\", \"4K\"]).default(\"1K\").describe(\"Output resolution (only for 'gemini-3-pro-image-preview'). Options: 1K, 2K, 4K.\").optional(),\n temperature: z.number().describe(\"Controls randomness (0.0 to 2.0)\").optional(),\n aspect_ratio: z.enum([\"1:1\", \"2:3\", \"3:2\", \"3:4\", \"4:3\", \"4:5\", \"5:4\", \"9:16\", \"16:9\", \"21:9\"]).default(\"1:1\").describe(\"Aspect ratio for generated image. Not supported by 'gemini-2.0-flash-exp-image-generation' model. Accepted values: '1:1', '4:5', '16:9', '9:16'. Unsupported strings will fail or silently default to 1:1.\").optional(),\n safety_settings: z.array(z.object({\n category: z.enum([\"HARM_CATEGORY_HARASSMENT\", \"HARM_CATEGORY_HATE_SPEECH\", \"HARM_CATEGORY_SEXUALLY_EXPLICIT\", \"HARM_CATEGORY_DANGEROUS_CONTENT\"]).describe(\"The category of harmful content to filter\"),\n threshold: z.enum([\"BLOCK_NONE\", \"BLOCK_LOW_AND_ABOVE\", \"BLOCK_MEDIUM_AND_ABOVE\", \"BLOCK_ONLY_HIGH\"]).describe(\"The threshold for blocking content in this category\"),\n})).describe(\"Safety filter settings. List of objects specifying content categories to filter and threshold levels. Each setting requires 'category' (HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, or HARM_CATEGORY_DANGEROUS_CONTENT) and 'threshold' (BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, or BLOCK_ONLY_HIGH).\").optional(),\n max_output_tokens: z.number().int().describe(\"Maximum number of tokens to generate (max 32,768). For image generation, images consume tokens based on resolution: 1K/2K consume 1,120 tokens, 4K consumes 2,000 tokens. If set too low, the API may return MAX_TOKENS finish reason with no image. If not specified, the API uses its default which is sufficient for image generation.\").optional(),\n system_instruction: z.string().describe(\"System instruction to guide image generation behavior\").optional(),\n});\nconst GeminiGenerateImage_FileDownloadableSchema = z.object({\n name: z.string().describe(\"Name of the file\").nullable(),\n s3url: z.string().describe(\"S3 URL of the downloaded file.\").nullable(),\n mimetype: z.string().describe(\"Mime type of the file.\").nullable(),\n});\nexport const GeminiGenerateImageOutput = z.object({\n image: GeminiGenerateImage_FileDownloadableSchema.nullable(),\n});\n\nexport const geminiGenerateImage = action(\"GEMINI_GENERATE_IMAGE\", {\n slug: \"gemini-generate-image\",\n name: \"Generate Image (Nano Banana)\",\n description: \"Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one downloadable image per call, or a text-type entry in data.content when no image is produced. Always validate that an image was returned before treating the call as successful. Output formats are raster only (JPG/PNG/WebP); request PNG for transparency. Concurrent usage may trigger HTTP 429/RESOURCE_EXHAUSTED — keep concurrency ≤3 and use exponential backoff (1s→2s→4s, ~5 retries). NOTE NEVER EVER TRUE SYNC_TO_WORKBENCH IN RUBE_MULTI_EXECUTE_TOOL\",\n input: GeminiGenerateImageInput,\n output: GeminiGenerateImageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,OAAOA,IAAAA,EAAE,KAAK;EAAC;EAA0B;EAA8B;CAAuC,CAAC,CAAC,CAAC,QAAQ,4BAA4B,CAAC,CAAC,SAAS,2NAA2N,CAAC,CAAC,SAAS;CACtY,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CACtE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2PAA2P;CACvR,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,SAAS,mKAAmK,CAAC,CAAC,SAAS;CACxN,YAAYA,IAAAA,EAAE,KAAK;EAAC;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC1J,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC9E,cAAcA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAQ;EAAQ;CAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,4MAA4M,CAAC,CAAC,SAAS;CAC/U,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAClC,UAAUA,IAAAA,EAAE,KAAK;GAAC;GAA4B;GAA6B;GAAmC;EAAiC,CAAC,CAAC,CAAC,SAAS,2CAA2C;EACtM,WAAWA,IAAAA,EAAE,KAAK;GAAC;GAAc;GAAuB;GAA0B;EAAiB,CAAC,CAAC,CAAC,SAAS,qDAAqD;CACtK,CAAC,CAAC,CAAC,CAAC,SAAS,kWAAkW,CAAC,CAAC,SAAS;CACxX,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2UAA2U,CAAC,CAAC,SAAS;CACnY,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;AAC5G,CAAC;AACD,MAAM,6CAA6CA,IAAAA,EAAE,OAAO;CAC1D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;CACvD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;AACnE,CAAC;AACD,MAAa,4BAA4BA,IAAAA,EAAE,OAAO,EAChD,OAAO,2CAA2C,SAAS,EAC7D,CAAC;AAED,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,80 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/generate-image.d.ts
|
|
4
|
-
declare const GeminiGenerateImageInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const GeminiGenerateImageInput: z.ZodObject<{
|
|
5
|
+
model: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
"gemini-2.5-flash-image": "gemini-2.5-flash-image";
|
|
7
|
+
"gemini-3-pro-image-preview": "gemini-3-pro-image-preview";
|
|
8
|
+
"gemini-2.0-flash-exp-image-generation": "gemini-2.0-flash-exp-image-generation";
|
|
9
|
+
}>>>;
|
|
10
|
+
top_k: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
prompt: z.ZodString;
|
|
13
|
+
timeout: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
14
|
+
image_size: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
15
|
+
"1K": "1K";
|
|
16
|
+
"2K": "2K";
|
|
17
|
+
"4K": "4K";
|
|
18
|
+
}>>>;
|
|
19
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
aspect_ratio: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
21
|
+
"1:1": "1:1";
|
|
22
|
+
"2:3": "2:3";
|
|
23
|
+
"3:2": "3:2";
|
|
24
|
+
"3:4": "3:4";
|
|
25
|
+
"4:3": "4:3";
|
|
26
|
+
"4:5": "4:5";
|
|
27
|
+
"5:4": "5:4";
|
|
28
|
+
"9:16": "9:16";
|
|
29
|
+
"16:9": "16:9";
|
|
30
|
+
"21:9": "21:9";
|
|
31
|
+
}>>>;
|
|
32
|
+
safety_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
category: z.ZodEnum<{
|
|
34
|
+
HARM_CATEGORY_HARASSMENT: "HARM_CATEGORY_HARASSMENT";
|
|
35
|
+
HARM_CATEGORY_HATE_SPEECH: "HARM_CATEGORY_HATE_SPEECH";
|
|
36
|
+
HARM_CATEGORY_SEXUALLY_EXPLICIT: "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
37
|
+
HARM_CATEGORY_DANGEROUS_CONTENT: "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
38
|
+
}>;
|
|
39
|
+
threshold: z.ZodEnum<{
|
|
40
|
+
BLOCK_NONE: "BLOCK_NONE";
|
|
41
|
+
BLOCK_LOW_AND_ABOVE: "BLOCK_LOW_AND_ABOVE";
|
|
42
|
+
BLOCK_MEDIUM_AND_ABOVE: "BLOCK_MEDIUM_AND_ABOVE";
|
|
43
|
+
BLOCK_ONLY_HIGH: "BLOCK_ONLY_HIGH";
|
|
44
|
+
}>;
|
|
45
|
+
}, z.core.$strip>>>;
|
|
46
|
+
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
system_instruction: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const GeminiGenerateImageOutput: z.ZodObject<{
|
|
50
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
51
|
+
name: z.ZodNullable<z.ZodString>;
|
|
52
|
+
s3url: z.ZodNullable<z.ZodString>;
|
|
53
|
+
mimetype: z.ZodNullable<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
declare const geminiGenerateImage: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
57
|
+
prompt: string;
|
|
58
|
+
model?: "gemini-2.5-flash-image" | "gemini-3-pro-image-preview" | "gemini-2.0-flash-exp-image-generation" | undefined;
|
|
59
|
+
top_k?: number | undefined;
|
|
60
|
+
top_p?: number | undefined;
|
|
61
|
+
timeout?: number | undefined;
|
|
62
|
+
image_size?: "1K" | "2K" | "4K" | undefined;
|
|
63
|
+
temperature?: number | undefined;
|
|
64
|
+
aspect_ratio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
65
|
+
safety_settings?: {
|
|
66
|
+
category: "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
67
|
+
threshold: "BLOCK_NONE" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH";
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
max_output_tokens?: number | undefined;
|
|
70
|
+
system_instruction?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
image: {
|
|
73
|
+
name: string | null;
|
|
74
|
+
s3url: string | null;
|
|
75
|
+
mimetype: string | null;
|
|
76
|
+
} | null;
|
|
77
|
+
}, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
78
|
//#endregion
|
|
8
79
|
export { geminiGenerateImage };
|
|
9
80
|
//# sourceMappingURL=generate-image.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-image.d.cts","names":[],"sources":["../../src/actions/generate-image.ts"],"mappings":";;;cAIa,wBAAA,
|
|
1
|
+
{"version":3,"file":"generate-image.d.cts","names":[],"sources":["../../src/actions/generate-image.ts"],"mappings":";;;cAIa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqBxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;cAIzB,mBAAA,gCAAmB,wBAAA"}
|
|
@@ -1,9 +1,80 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/generate-image.d.ts
|
|
4
|
-
declare const GeminiGenerateImageInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const GeminiGenerateImageInput: z.ZodObject<{
|
|
5
|
+
model: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
"gemini-2.5-flash-image": "gemini-2.5-flash-image";
|
|
7
|
+
"gemini-3-pro-image-preview": "gemini-3-pro-image-preview";
|
|
8
|
+
"gemini-2.0-flash-exp-image-generation": "gemini-2.0-flash-exp-image-generation";
|
|
9
|
+
}>>>;
|
|
10
|
+
top_k: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
prompt: z.ZodString;
|
|
13
|
+
timeout: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
14
|
+
image_size: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
15
|
+
"1K": "1K";
|
|
16
|
+
"2K": "2K";
|
|
17
|
+
"4K": "4K";
|
|
18
|
+
}>>>;
|
|
19
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
aspect_ratio: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
21
|
+
"1:1": "1:1";
|
|
22
|
+
"2:3": "2:3";
|
|
23
|
+
"3:2": "3:2";
|
|
24
|
+
"3:4": "3:4";
|
|
25
|
+
"4:3": "4:3";
|
|
26
|
+
"4:5": "4:5";
|
|
27
|
+
"5:4": "5:4";
|
|
28
|
+
"9:16": "9:16";
|
|
29
|
+
"16:9": "16:9";
|
|
30
|
+
"21:9": "21:9";
|
|
31
|
+
}>>>;
|
|
32
|
+
safety_settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
category: z.ZodEnum<{
|
|
34
|
+
HARM_CATEGORY_HARASSMENT: "HARM_CATEGORY_HARASSMENT";
|
|
35
|
+
HARM_CATEGORY_HATE_SPEECH: "HARM_CATEGORY_HATE_SPEECH";
|
|
36
|
+
HARM_CATEGORY_SEXUALLY_EXPLICIT: "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
37
|
+
HARM_CATEGORY_DANGEROUS_CONTENT: "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
38
|
+
}>;
|
|
39
|
+
threshold: z.ZodEnum<{
|
|
40
|
+
BLOCK_NONE: "BLOCK_NONE";
|
|
41
|
+
BLOCK_LOW_AND_ABOVE: "BLOCK_LOW_AND_ABOVE";
|
|
42
|
+
BLOCK_MEDIUM_AND_ABOVE: "BLOCK_MEDIUM_AND_ABOVE";
|
|
43
|
+
BLOCK_ONLY_HIGH: "BLOCK_ONLY_HIGH";
|
|
44
|
+
}>;
|
|
45
|
+
}, z.core.$strip>>>;
|
|
46
|
+
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
system_instruction: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const GeminiGenerateImageOutput: z.ZodObject<{
|
|
50
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
51
|
+
name: z.ZodNullable<z.ZodString>;
|
|
52
|
+
s3url: z.ZodNullable<z.ZodString>;
|
|
53
|
+
mimetype: z.ZodNullable<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
declare const geminiGenerateImage: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
57
|
+
prompt: string;
|
|
58
|
+
model?: "gemini-2.5-flash-image" | "gemini-3-pro-image-preview" | "gemini-2.0-flash-exp-image-generation" | undefined;
|
|
59
|
+
top_k?: number | undefined;
|
|
60
|
+
top_p?: number | undefined;
|
|
61
|
+
timeout?: number | undefined;
|
|
62
|
+
image_size?: "1K" | "2K" | "4K" | undefined;
|
|
63
|
+
temperature?: number | undefined;
|
|
64
|
+
aspect_ratio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
65
|
+
safety_settings?: {
|
|
66
|
+
category: "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
67
|
+
threshold: "BLOCK_NONE" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH";
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
max_output_tokens?: number | undefined;
|
|
70
|
+
system_instruction?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
image: {
|
|
73
|
+
name: string | null;
|
|
74
|
+
s3url: string | null;
|
|
75
|
+
mimetype: string | null;
|
|
76
|
+
} | null;
|
|
77
|
+
}, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
78
|
//#endregion
|
|
8
79
|
export { geminiGenerateImage };
|
|
9
80
|
//# sourceMappingURL=generate-image.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-image.d.mts","names":[],"sources":["../../src/actions/generate-image.ts"],"mappings":";;;cAIa,wBAAA,
|
|
1
|
+
{"version":3,"file":"generate-image.d.mts","names":[],"sources":["../../src/actions/generate-image.ts"],"mappings":";;;cAIa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqBxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;cAIzB,mBAAA,gCAAmB,wBAAA"}
|
|
@@ -47,14 +47,14 @@ const GeminiGenerateImageInput = z.object({
|
|
|
47
47
|
system_instruction: z.string().describe("System instruction to guide image generation behavior").optional()
|
|
48
48
|
});
|
|
49
49
|
const GeminiGenerateImage_FileDownloadableSchema = z.object({
|
|
50
|
-
name: z.string().describe("Name of the file"),
|
|
51
|
-
s3url: z.string().describe("S3 URL of the downloaded file."),
|
|
52
|
-
mimetype: z.string().describe("Mime type of the file.")
|
|
50
|
+
name: z.string().describe("Name of the file").nullable(),
|
|
51
|
+
s3url: z.string().describe("S3 URL of the downloaded file.").nullable(),
|
|
52
|
+
mimetype: z.string().describe("Mime type of the file.").nullable()
|
|
53
53
|
});
|
|
54
54
|
const geminiGenerateImage = action("GEMINI_GENERATE_IMAGE", {
|
|
55
55
|
slug: "gemini-generate-image",
|
|
56
56
|
name: "Generate Image (Nano Banana)",
|
|
57
|
-
description: "Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one image per call
|
|
57
|
+
description: "Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one downloadable image per call, or a text-type entry in data.content when no image is produced. Always validate that an image was returned before treating the call as successful. Output formats are raster only (JPG/PNG/WebP); request PNG for transparency. Concurrent usage may trigger HTTP 429/RESOURCE_EXHAUSTED — keep concurrency ≤3 and use exponential backoff (1s→2s→4s, ~5 retries). NOTE NEVER EVER TRUE SYNC_TO_WORKBENCH IN RUBE_MULTI_EXECUTE_TOOL",
|
|
58
58
|
input: GeminiGenerateImageInput,
|
|
59
59
|
output: z.object({ image: GeminiGenerateImage_FileDownloadableSchema.nullable() })
|
|
60
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-image.mjs","names":[],"sources":["../../src/actions/generate-image.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateImageInput
|
|
1
|
+
{"version":3,"file":"generate-image.mjs","names":[],"sources":["../../src/actions/generate-image.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateImageInput = z.object({\n model: z.enum([\"gemini-2.5-flash-image\", \"gemini-3-pro-image-preview\", \"gemini-2.0-flash-exp-image-generation\"]).default(\"gemini-3-pro-image-preview\").describe(\"Model to use for image generation. Options: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (advanced with 4K, thinking mode), 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental).\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter\").optional(),\n top_p: z.number().describe(\"Nucleus sampling parameter (0.0 to 1.0)\").optional(),\n prompt: z.string().describe(\"Text prompt for image generation Sensitive, trademarked, or explicit content triggers HTTP 400 (PROHIBITED_CONTENT or IMAGE_RECITATION) with no image returned — rephrase into neutral, policy-compliant language rather than retrying identical prompts.\"),\n timeout: z.number().default(300).describe(\"Request timeout in seconds. Default is 300 seconds (5 minutes). Increase for complex prompts or high-resolution images. Minimum 120 seconds, maximum 600 seconds.\").optional(),\n image_size: z.enum([\"1K\", \"2K\", \"4K\"]).default(\"1K\").describe(\"Output resolution (only for 'gemini-3-pro-image-preview'). Options: 1K, 2K, 4K.\").optional(),\n temperature: z.number().describe(\"Controls randomness (0.0 to 2.0)\").optional(),\n aspect_ratio: z.enum([\"1:1\", \"2:3\", \"3:2\", \"3:4\", \"4:3\", \"4:5\", \"5:4\", \"9:16\", \"16:9\", \"21:9\"]).default(\"1:1\").describe(\"Aspect ratio for generated image. Not supported by 'gemini-2.0-flash-exp-image-generation' model. Accepted values: '1:1', '4:5', '16:9', '9:16'. Unsupported strings will fail or silently default to 1:1.\").optional(),\n safety_settings: z.array(z.object({\n category: z.enum([\"HARM_CATEGORY_HARASSMENT\", \"HARM_CATEGORY_HATE_SPEECH\", \"HARM_CATEGORY_SEXUALLY_EXPLICIT\", \"HARM_CATEGORY_DANGEROUS_CONTENT\"]).describe(\"The category of harmful content to filter\"),\n threshold: z.enum([\"BLOCK_NONE\", \"BLOCK_LOW_AND_ABOVE\", \"BLOCK_MEDIUM_AND_ABOVE\", \"BLOCK_ONLY_HIGH\"]).describe(\"The threshold for blocking content in this category\"),\n})).describe(\"Safety filter settings. List of objects specifying content categories to filter and threshold levels. Each setting requires 'category' (HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, or HARM_CATEGORY_DANGEROUS_CONTENT) and 'threshold' (BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, or BLOCK_ONLY_HIGH).\").optional(),\n max_output_tokens: z.number().int().describe(\"Maximum number of tokens to generate (max 32,768). For image generation, images consume tokens based on resolution: 1K/2K consume 1,120 tokens, 4K consumes 2,000 tokens. If set too low, the API may return MAX_TOKENS finish reason with no image. If not specified, the API uses its default which is sufficient for image generation.\").optional(),\n system_instruction: z.string().describe(\"System instruction to guide image generation behavior\").optional(),\n});\nconst GeminiGenerateImage_FileDownloadableSchema = z.object({\n name: z.string().describe(\"Name of the file\").nullable(),\n s3url: z.string().describe(\"S3 URL of the downloaded file.\").nullable(),\n mimetype: z.string().describe(\"Mime type of the file.\").nullable(),\n});\nexport const GeminiGenerateImageOutput = z.object({\n image: GeminiGenerateImage_FileDownloadableSchema.nullable(),\n});\n\nexport const geminiGenerateImage = action(\"GEMINI_GENERATE_IMAGE\", {\n slug: \"gemini-generate-image\",\n name: \"Generate Image (Nano Banana)\",\n description: \"Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one downloadable image per call, or a text-type entry in data.content when no image is produced. Always validate that an image was returned before treating the call as successful. Output formats are raster only (JPG/PNG/WebP); request PNG for transparency. Concurrent usage may trigger HTTP 429/RESOURCE_EXHAUSTED — keep concurrency ≤3 and use exponential backoff (1s→2s→4s, ~5 retries). NOTE NEVER EVER TRUE SYNC_TO_WORKBENCH IN RUBE_MULTI_EXECUTE_TOOL\",\n input: GeminiGenerateImageInput,\n output: GeminiGenerateImageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,OAAO,EAAE,KAAK;EAAC;EAA0B;EAA8B;CAAuC,CAAC,CAAC,CAAC,QAAQ,4BAA4B,CAAC,CAAC,SAAS,2NAA2N,CAAC,CAAC,SAAS;CACtY,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CACtE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,2PAA2P;CACvR,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,SAAS,mKAAmK,CAAC,CAAC,SAAS;CACxN,YAAY,EAAE,KAAK;EAAC;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC1J,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC9E,cAAc,EAAE,KAAK;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAQ;EAAQ;CAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,4MAA4M,CAAC,CAAC,SAAS;CAC/U,iBAAiB,EAAE,MAAM,EAAE,OAAO;EAClC,UAAU,EAAE,KAAK;GAAC;GAA4B;GAA6B;GAAmC;EAAiC,CAAC,CAAC,CAAC,SAAS,2CAA2C;EACtM,WAAW,EAAE,KAAK;GAAC;GAAc;GAAuB;GAA0B;EAAiB,CAAC,CAAC,CAAC,SAAS,qDAAqD;CACtK,CAAC,CAAC,CAAC,CAAC,SAAS,kWAAkW,CAAC,CAAC,SAAS;CACxX,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2UAA2U,CAAC,CAAC,SAAS;CACnY,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;AAC5G,CAAC;AACD,MAAM,6CAA6C,EAAE,OAAO;CAC1D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;CACvD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACtE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;AACnE,CAAC;AAKD,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATuC,EAAE,OAAO,EAChD,OAAO,2CAA2C,SAAS,EAC7D,CAOU;AACV,CAAC"}
|
|
@@ -28,13 +28,13 @@ const GeminiGenerateVideosInput = zod.z.object({
|
|
|
28
28
|
]).describe("Person generation safety settings for video generation.\n\nModel-specific restrictions apply:\n- Veo 2: Supports DONT_ALLOW, ALLOW_ADULT, and ALLOW_ALL\n- Veo 3/3.1 models: Only ALLOW_ALL is supported (requires allowlist access)").optional()
|
|
29
29
|
});
|
|
30
30
|
const GeminiGenerateVideos_OperationCreationResponseSchema = zod.z.object({
|
|
31
|
-
done: zod.z.boolean().default(false).describe("Indicates whether the operation is complete. Always False when operation is first created.").
|
|
32
|
-
name: zod.z.string().describe("Server-assigned operation resource name (e.g., 'models/veo-3.0-generate-001/operations/abc123')."),
|
|
33
|
-
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Operation metadata with progress information (optional, may be present even when operation is not done).").
|
|
31
|
+
done: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.boolean().default(false).describe("Indicates whether the operation is complete. Always False when operation is first created.").optional()),
|
|
32
|
+
name: zod.z.string().describe("Server-assigned operation resource name (e.g., 'models/veo-3.0-generate-001/operations/abc123').").nullable(),
|
|
33
|
+
metadata: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.record(zod.z.string(), zod.z.unknown()).describe("Operation metadata with progress information (optional, may be present even when operation is not done).").optional())
|
|
34
34
|
}).passthrough().describe("Response from the predictLongRunning endpoint when initiating video generation.\n\nRepresents a Google Cloud Long-Running Operation object as defined by the standard\nOperation schema (google.longrunning.Operation). When first created, the response\nincludes 'name' (the operation identifier) and 'done' (typically False, indicating\nthe operation is in progress). Optional 'metadata' may provide progress information.");
|
|
35
35
|
const GeminiGenerateVideosOutput = zod.z.object({
|
|
36
36
|
raw: GeminiGenerateVideos_OperationCreationResponseSchema.nullable(),
|
|
37
|
-
operation_name: zod.z.string().describe("Long-running operation name/id")
|
|
37
|
+
operation_name: zod.z.string().describe("Long-running operation name/id").nullable()
|
|
38
38
|
});
|
|
39
39
|
const geminiGenerateVideos = require_action.action("GEMINI_GENERATE_VIDEOS", {
|
|
40
40
|
slug: "gemini-generate-videos",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-videos.cjs","names":["z","action"],"sources":["../../src/actions/generate-videos.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateVideosInput
|
|
1
|
+
{"version":3,"file":"generate-videos.cjs","names":["z","action"],"sources":["../../src/actions/generate-videos.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateVideosInput = z.object({\n seed: z.number().int().describe(\"Seed value for reproducibility. IMPORTANT: Only supported by Veo 3/3.1 models (VEO_3, VEO_3_FAST, VEO_3_1, VEO_3_1_FAST). VEO_2 does NOT support seed - using seed with VEO_2 will result in a validation error.\").optional(),\n model: z.enum([\"veo-2.0-generate-001\", \"veo-3.0-generate-001\", \"veo-3.0-fast-generate-001\", \"veo-3.1-generate-preview\", \"veo-3.1-fast-generate-preview\"]).default(\"veo-3.0-generate-001\").describe(\"Veo model for video generation. Available enum values: VEO_3 (default, recommended), VEO_2, VEO_3_FAST, VEO_3_1 (newest), VEO_3_1_FAST (newest). Avoid preview model ID variants (e.g., '*generate-preview*') — they fail to produce downloadable URIs. Use only stable IDs: veo-2.0-generate-001 or veo-3.0-generate-001.\").optional(),\n prompt: z.string().describe(\"Text prompt for Veo video generation. Must be a non-empty string describing the video to generate.\"),\n resolution: z.enum([\"720p\", \"1080p\"]).describe(\"Supported resolutions for video generation.\").optional(),\n aspect_ratio: z.enum([\"16:9\", \"9:16\"]).describe(\"Supported aspect ratios for video generation.\").optional(),\n negative_prompt: z.string().describe(\"Text describing content to avoid in the generated video (e.g., 'cartoon, drawing, low quality').\").optional(),\n duration_seconds: z.union([z.literal(4), z.literal(5), z.literal(6), z.literal(7), z.literal(8)]).describe(\"Supported video durations in seconds.\\n\\nModel-specific restrictions apply:\\n- Veo 2: Supports 5, 6, 7, or 8 seconds (4 seconds NOT supported)\\n- Veo 3/3.1 models: Supports 4, 6, or 8 seconds (5 and 7 seconds NOT supported)\").optional(),\n person_generation: z.enum([\"dont_allow\", \"allow_adult\", \"allow_all\"]).describe(\"Person generation safety settings for video generation.\\n\\nModel-specific restrictions apply:\\n- Veo 2: Supports DONT_ALLOW, ALLOW_ADULT, and ALLOW_ALL\\n- Veo 3/3.1 models: Only ALLOW_ALL is supported (requires allowlist access)\").optional(),\n});\nconst GeminiGenerateVideos_OperationCreationResponseSchema = z.object({\n done: z.preprocess((value) => (value === null ? undefined : value), z.boolean().default(false).describe(\"Indicates whether the operation is complete. Always False when operation is first created.\").optional()),\n name: z.string().describe(\"Server-assigned operation resource name (e.g., 'models/veo-3.0-generate-001/operations/abc123').\").nullable(),\n metadata: z.preprocess((value) => (value === null ? undefined : value), z.record(z.string(), z.unknown()).describe(\"Operation metadata with progress information (optional, may be present even when operation is not done).\").optional()),\n}).passthrough().describe(\"Response from the predictLongRunning endpoint when initiating video generation.\\n\\nRepresents a Google Cloud Long-Running Operation object as defined by the standard\\nOperation schema (google.longrunning.Operation). When first created, the response\\nincludes 'name' (the operation identifier) and 'done' (typically False, indicating\\nthe operation is in progress). Optional 'metadata' may provide progress information.\");\nexport const GeminiGenerateVideosOutput = z.object({\n raw: GeminiGenerateVideos_OperationCreationResponseSchema.nullable(),\n operation_name: z.string().describe(\"Long-running operation name/id\").nullable(),\n});\n\nexport const geminiGenerateVideos = action(\"GEMINI_GENERATE_VIDEOS\", {\n slug: \"gemini-generate-videos\",\n name: \"Generate Videos (Veo)\",\n description: \"Generates videos from text prompts using Google's Veo models. Returns an operation_name for tracking; pass it verbatim (no edits) to GEMINI_WAIT_FOR_VIDEO or GEMINI_GET_VIDEOS_OPERATION. Jobs take 30–180+ seconds; wait 10s before first poll, then poll every 10–30s (allow up to 12 min). Successful results include data.video_file.s3url — missing s3url means failure. If done=true but no video_file, check raiMediaFilteredReasons (safety block); revise prompt and regenerate. Text-only; cannot accept image inputs. Max ~3–5 concurrent jobs; 429 RESOURCE_EXHAUSTED requires exponential backoff. For retries, always start a fresh call — never reuse a failed operation_name.\",\n input: GeminiGenerateVideosInput,\n output: GeminiGenerateVideosOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kNAAkN,CAAC,CAAC,SAAS;CAC7P,OAAOA,IAAAA,EAAE,KAAK;EAAC;EAAwB;EAAwB;EAA6B;EAA4B;CAA+B,CAAC,CAAC,CAAC,QAAQ,sBAAsB,CAAC,CAAC,SAAS,4TAA4T,CAAC,CAAC,SAAS;CAC1gB,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oGAAoG;CAChI,YAAYA,IAAAA,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CACvG,cAAcA,IAAAA,EAAE,KAAK,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;CAC1G,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kGAAkG,CAAC,CAAC,SAAS;CAClJ,kBAAkBA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,CAAC;EAAGA,IAAAA,EAAE,QAAQ,CAAC;CAAC,CAAC,CAAC,CAAC,SAAS,iOAAiO,CAAC,CAAC,SAAS;CACvV,mBAAmBA,IAAAA,EAAE,KAAK;EAAC;EAAc;EAAe;CAAW,CAAC,CAAC,CAAC,SAAS,sOAAsO,CAAC,CAAC,SAAS;AAClU,CAAC;AACD,MAAM,uDAAuDA,IAAAA,EAAE,OAAO;CACpE,MAAMA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,4FAA4F,CAAC,CAAC,SAAS,CAAC;CAChN,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kGAAkG,CAAC,CAAC,SAAS;CACvI,UAAUA,IAAAA,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,0GAA0G,CAAC,CAAC,SAAS,CAAC;AAC3O,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oaAAoa;AAC9b,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,KAAK,qDAAqD,SAAS;CACnE,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;AACjF,CAAC;AAED,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,58 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/generate-videos.d.ts
|
|
4
|
-
declare const GeminiGenerateVideosInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const GeminiGenerateVideosInput: z.ZodObject<{
|
|
5
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
model: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
"veo-2.0-generate-001": "veo-2.0-generate-001";
|
|
8
|
+
"veo-3.0-generate-001": "veo-3.0-generate-001";
|
|
9
|
+
"veo-3.0-fast-generate-001": "veo-3.0-fast-generate-001";
|
|
10
|
+
"veo-3.1-generate-preview": "veo-3.1-generate-preview";
|
|
11
|
+
"veo-3.1-fast-generate-preview": "veo-3.1-fast-generate-preview";
|
|
12
|
+
}>>>;
|
|
13
|
+
prompt: z.ZodString;
|
|
14
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
"720p": "720p";
|
|
16
|
+
"1080p": "1080p";
|
|
17
|
+
}>>;
|
|
18
|
+
aspect_ratio: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
"9:16": "9:16";
|
|
20
|
+
"16:9": "16:9";
|
|
21
|
+
}>>;
|
|
22
|
+
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
duration_seconds: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>]>>;
|
|
24
|
+
person_generation: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
dont_allow: "dont_allow";
|
|
26
|
+
allow_adult: "allow_adult";
|
|
27
|
+
allow_all: "allow_all";
|
|
28
|
+
}>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
declare const GeminiGenerateVideosOutput: z.ZodObject<{
|
|
31
|
+
raw: z.ZodNullable<z.ZodObject<{
|
|
32
|
+
done: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
|
|
33
|
+
name: z.ZodNullable<z.ZodString>;
|
|
34
|
+
metadata: z.ZodPreprocess<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
35
|
+
}, z.core.$loose>>;
|
|
36
|
+
operation_name: z.ZodNullable<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
declare const geminiGenerateVideos: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
39
|
+
prompt: string;
|
|
40
|
+
seed?: number | undefined;
|
|
41
|
+
model?: "veo-2.0-generate-001" | "veo-3.0-generate-001" | "veo-3.0-fast-generate-001" | "veo-3.1-generate-preview" | "veo-3.1-fast-generate-preview" | undefined;
|
|
42
|
+
resolution?: "720p" | "1080p" | undefined;
|
|
43
|
+
aspect_ratio?: "9:16" | "16:9" | undefined;
|
|
44
|
+
negative_prompt?: string | undefined;
|
|
45
|
+
duration_seconds?: 4 | 5 | 6 | 7 | 8 | undefined;
|
|
46
|
+
person_generation?: "dont_allow" | "allow_adult" | "allow_all" | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
raw: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
name: string | null;
|
|
51
|
+
done?: boolean | undefined;
|
|
52
|
+
metadata?: Record<string, unknown> | undefined;
|
|
53
|
+
} | null;
|
|
54
|
+
operation_name: string | null;
|
|
55
|
+
}, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
56
|
//#endregion
|
|
8
57
|
export { geminiGenerateVideos };
|
|
9
58
|
//# sourceMappingURL=generate-videos.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-videos.d.cts","names":[],"sources":["../../src/actions/generate-videos.ts"],"mappings":";;;cAIa,yBAAA,
|
|
1
|
+
{"version":3,"file":"generate-videos.d.cts","names":[],"sources":["../../src/actions/generate-videos.ts"],"mappings":";;;cAIa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAezB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;cAK1B,oBAAA,gCAAoB,wBAAA;;;;;;;;;;;;;;eAM/B,MAAA;EAAA"}
|
|
@@ -1,9 +1,58 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/generate-videos.d.ts
|
|
4
|
-
declare const GeminiGenerateVideosInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const GeminiGenerateVideosInput: z.ZodObject<{
|
|
5
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
model: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
"veo-2.0-generate-001": "veo-2.0-generate-001";
|
|
8
|
+
"veo-3.0-generate-001": "veo-3.0-generate-001";
|
|
9
|
+
"veo-3.0-fast-generate-001": "veo-3.0-fast-generate-001";
|
|
10
|
+
"veo-3.1-generate-preview": "veo-3.1-generate-preview";
|
|
11
|
+
"veo-3.1-fast-generate-preview": "veo-3.1-fast-generate-preview";
|
|
12
|
+
}>>>;
|
|
13
|
+
prompt: z.ZodString;
|
|
14
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
"720p": "720p";
|
|
16
|
+
"1080p": "1080p";
|
|
17
|
+
}>>;
|
|
18
|
+
aspect_ratio: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
"9:16": "9:16";
|
|
20
|
+
"16:9": "16:9";
|
|
21
|
+
}>>;
|
|
22
|
+
negative_prompt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
duration_seconds: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<8>]>>;
|
|
24
|
+
person_generation: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
dont_allow: "dont_allow";
|
|
26
|
+
allow_adult: "allow_adult";
|
|
27
|
+
allow_all: "allow_all";
|
|
28
|
+
}>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
declare const GeminiGenerateVideosOutput: z.ZodObject<{
|
|
31
|
+
raw: z.ZodNullable<z.ZodObject<{
|
|
32
|
+
done: z.ZodPreprocess<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
|
|
33
|
+
name: z.ZodNullable<z.ZodString>;
|
|
34
|
+
metadata: z.ZodPreprocess<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
35
|
+
}, z.core.$loose>>;
|
|
36
|
+
operation_name: z.ZodNullable<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
declare const geminiGenerateVideos: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
39
|
+
prompt: string;
|
|
40
|
+
seed?: number | undefined;
|
|
41
|
+
model?: "veo-2.0-generate-001" | "veo-3.0-generate-001" | "veo-3.0-fast-generate-001" | "veo-3.1-generate-preview" | "veo-3.1-fast-generate-preview" | undefined;
|
|
42
|
+
resolution?: "720p" | "1080p" | undefined;
|
|
43
|
+
aspect_ratio?: "9:16" | "16:9" | undefined;
|
|
44
|
+
negative_prompt?: string | undefined;
|
|
45
|
+
duration_seconds?: 4 | 5 | 6 | 7 | 8 | undefined;
|
|
46
|
+
person_generation?: "dont_allow" | "allow_adult" | "allow_all" | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
raw: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
name: string | null;
|
|
51
|
+
done?: boolean | undefined;
|
|
52
|
+
metadata?: Record<string, unknown> | undefined;
|
|
53
|
+
} | null;
|
|
54
|
+
operation_name: string | null;
|
|
55
|
+
}, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
56
|
//#endregion
|
|
8
57
|
export { geminiGenerateVideos };
|
|
9
58
|
//# sourceMappingURL=generate-videos.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-videos.d.mts","names":[],"sources":["../../src/actions/generate-videos.ts"],"mappings":";;;cAIa,yBAAA,
|
|
1
|
+
{"version":3,"file":"generate-videos.d.mts","names":[],"sources":["../../src/actions/generate-videos.ts"],"mappings":";;;cAIa,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAezB,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;cAK1B,oBAAA,gCAAoB,wBAAA;;;;;;;;;;;;;;eAM/B,MAAA;EAAA"}
|
|
@@ -28,9 +28,9 @@ const GeminiGenerateVideosInput = z.object({
|
|
|
28
28
|
]).describe("Person generation safety settings for video generation.\n\nModel-specific restrictions apply:\n- Veo 2: Supports DONT_ALLOW, ALLOW_ADULT, and ALLOW_ALL\n- Veo 3/3.1 models: Only ALLOW_ALL is supported (requires allowlist access)").optional()
|
|
29
29
|
});
|
|
30
30
|
const GeminiGenerateVideos_OperationCreationResponseSchema = z.object({
|
|
31
|
-
done: z.boolean().default(false).describe("Indicates whether the operation is complete. Always False when operation is first created.").
|
|
32
|
-
name: z.string().describe("Server-assigned operation resource name (e.g., 'models/veo-3.0-generate-001/operations/abc123')."),
|
|
33
|
-
metadata: z.record(z.string(), z.unknown()).describe("Operation metadata with progress information (optional, may be present even when operation is not done).").
|
|
31
|
+
done: z.preprocess((value) => value === null ? void 0 : value, z.boolean().default(false).describe("Indicates whether the operation is complete. Always False when operation is first created.").optional()),
|
|
32
|
+
name: z.string().describe("Server-assigned operation resource name (e.g., 'models/veo-3.0-generate-001/operations/abc123').").nullable(),
|
|
33
|
+
metadata: z.preprocess((value) => value === null ? void 0 : value, z.record(z.string(), z.unknown()).describe("Operation metadata with progress information (optional, may be present even when operation is not done).").optional())
|
|
34
34
|
}).passthrough().describe("Response from the predictLongRunning endpoint when initiating video generation.\n\nRepresents a Google Cloud Long-Running Operation object as defined by the standard\nOperation schema (google.longrunning.Operation). When first created, the response\nincludes 'name' (the operation identifier) and 'done' (typically False, indicating\nthe operation is in progress). Optional 'metadata' may provide progress information.");
|
|
35
35
|
const geminiGenerateVideos = action("GEMINI_GENERATE_VIDEOS", {
|
|
36
36
|
slug: "gemini-generate-videos",
|
|
@@ -39,7 +39,7 @@ const geminiGenerateVideos = action("GEMINI_GENERATE_VIDEOS", {
|
|
|
39
39
|
input: GeminiGenerateVideosInput,
|
|
40
40
|
output: z.object({
|
|
41
41
|
raw: GeminiGenerateVideos_OperationCreationResponseSchema.nullable(),
|
|
42
|
-
operation_name: z.string().describe("Long-running operation name/id")
|
|
42
|
+
operation_name: z.string().describe("Long-running operation name/id").nullable()
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-videos.mjs","names":[],"sources":["../../src/actions/generate-videos.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateVideosInput
|
|
1
|
+
{"version":3,"file":"generate-videos.mjs","names":[],"sources":["../../src/actions/generate-videos.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateVideosInput = z.object({\n seed: z.number().int().describe(\"Seed value for reproducibility. IMPORTANT: Only supported by Veo 3/3.1 models (VEO_3, VEO_3_FAST, VEO_3_1, VEO_3_1_FAST). VEO_2 does NOT support seed - using seed with VEO_2 will result in a validation error.\").optional(),\n model: z.enum([\"veo-2.0-generate-001\", \"veo-3.0-generate-001\", \"veo-3.0-fast-generate-001\", \"veo-3.1-generate-preview\", \"veo-3.1-fast-generate-preview\"]).default(\"veo-3.0-generate-001\").describe(\"Veo model for video generation. Available enum values: VEO_3 (default, recommended), VEO_2, VEO_3_FAST, VEO_3_1 (newest), VEO_3_1_FAST (newest). Avoid preview model ID variants (e.g., '*generate-preview*') — they fail to produce downloadable URIs. Use only stable IDs: veo-2.0-generate-001 or veo-3.0-generate-001.\").optional(),\n prompt: z.string().describe(\"Text prompt for Veo video generation. Must be a non-empty string describing the video to generate.\"),\n resolution: z.enum([\"720p\", \"1080p\"]).describe(\"Supported resolutions for video generation.\").optional(),\n aspect_ratio: z.enum([\"16:9\", \"9:16\"]).describe(\"Supported aspect ratios for video generation.\").optional(),\n negative_prompt: z.string().describe(\"Text describing content to avoid in the generated video (e.g., 'cartoon, drawing, low quality').\").optional(),\n duration_seconds: z.union([z.literal(4), z.literal(5), z.literal(6), z.literal(7), z.literal(8)]).describe(\"Supported video durations in seconds.\\n\\nModel-specific restrictions apply:\\n- Veo 2: Supports 5, 6, 7, or 8 seconds (4 seconds NOT supported)\\n- Veo 3/3.1 models: Supports 4, 6, or 8 seconds (5 and 7 seconds NOT supported)\").optional(),\n person_generation: z.enum([\"dont_allow\", \"allow_adult\", \"allow_all\"]).describe(\"Person generation safety settings for video generation.\\n\\nModel-specific restrictions apply:\\n- Veo 2: Supports DONT_ALLOW, ALLOW_ADULT, and ALLOW_ALL\\n- Veo 3/3.1 models: Only ALLOW_ALL is supported (requires allowlist access)\").optional(),\n});\nconst GeminiGenerateVideos_OperationCreationResponseSchema = z.object({\n done: z.preprocess((value) => (value === null ? undefined : value), z.boolean().default(false).describe(\"Indicates whether the operation is complete. Always False when operation is first created.\").optional()),\n name: z.string().describe(\"Server-assigned operation resource name (e.g., 'models/veo-3.0-generate-001/operations/abc123').\").nullable(),\n metadata: z.preprocess((value) => (value === null ? undefined : value), z.record(z.string(), z.unknown()).describe(\"Operation metadata with progress information (optional, may be present even when operation is not done).\").optional()),\n}).passthrough().describe(\"Response from the predictLongRunning endpoint when initiating video generation.\\n\\nRepresents a Google Cloud Long-Running Operation object as defined by the standard\\nOperation schema (google.longrunning.Operation). When first created, the response\\nincludes 'name' (the operation identifier) and 'done' (typically False, indicating\\nthe operation is in progress). Optional 'metadata' may provide progress information.\");\nexport const GeminiGenerateVideosOutput = z.object({\n raw: GeminiGenerateVideos_OperationCreationResponseSchema.nullable(),\n operation_name: z.string().describe(\"Long-running operation name/id\").nullable(),\n});\n\nexport const geminiGenerateVideos = action(\"GEMINI_GENERATE_VIDEOS\", {\n slug: \"gemini-generate-videos\",\n name: \"Generate Videos (Veo)\",\n description: \"Generates videos from text prompts using Google's Veo models. Returns an operation_name for tracking; pass it verbatim (no edits) to GEMINI_WAIT_FOR_VIDEO or GEMINI_GET_VIDEOS_OPERATION. Jobs take 30–180+ seconds; wait 10s before first poll, then poll every 10–30s (allow up to 12 min). Successful results include data.video_file.s3url — missing s3url means failure. If done=true but no video_file, check raiMediaFilteredReasons (safety block); revise prompt and regenerate. Text-only; cannot accept image inputs. Max ~3–5 concurrent jobs; 429 RESOURCE_EXHAUSTED requires exponential backoff. For retries, always start a fresh call — never reuse a failed operation_name.\",\n input: GeminiGenerateVideosInput,\n output: GeminiGenerateVideosOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA4B,EAAE,OAAO;CAChD,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kNAAkN,CAAC,CAAC,SAAS;CAC7P,OAAO,EAAE,KAAK;EAAC;EAAwB;EAAwB;EAA6B;EAA4B;CAA+B,CAAC,CAAC,CAAC,QAAQ,sBAAsB,CAAC,CAAC,SAAS,4TAA4T,CAAC,CAAC,SAAS;CAC1gB,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oGAAoG;CAChI,YAAY,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CACvG,cAAc,EAAE,KAAK,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;CAC1G,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,kGAAkG,CAAC,CAAC,SAAS;CAClJ,kBAAkB,EAAE,MAAM;EAAC,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,CAAC;EAAG,EAAE,QAAQ,CAAC;CAAC,CAAC,CAAC,CAAC,SAAS,iOAAiO,CAAC,CAAC,SAAS;CACvV,mBAAmB,EAAE,KAAK;EAAC;EAAc;EAAe;CAAW,CAAC,CAAC,CAAC,SAAS,sOAAsO,CAAC,CAAC,SAAS;AAClU,CAAC;AACD,MAAM,uDAAuD,EAAE,OAAO;CACpE,MAAM,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,4FAA4F,CAAC,CAAC,SAAS,CAAC;CAChN,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kGAAkG,CAAC,CAAC,SAAS;CACvI,UAAU,EAAE,YAAY,UAAW,UAAU,OAAO,SAAY,OAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,0GAA0G,CAAC,CAAC,SAAS,CAAC;AAC3O,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oaAAoa;AAM9b,MAAa,uBAAuB,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAVwC,EAAE,OAAO;EACjD,KAAK,qDAAqD,SAAS;EACnE,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACjF,CAOU;AACV,CAAC"}
|
|
@@ -7,27 +7,27 @@ const GeminiListModelsInput = zod.z.object({
|
|
|
7
7
|
filter_prefix: zod.z.string().default("").describe("Filter models by name prefix (client-side). Leave empty to get all models.").optional()
|
|
8
8
|
});
|
|
9
9
|
const GeminiListModels_ModelSchema = zod.z.object({
|
|
10
|
-
name: zod.z.string().describe("Resource identifier in format models/{model}"),
|
|
11
|
-
topK: zod.z.number().int().describe("Default top-k sampling parameter").
|
|
12
|
-
topP: zod.z.number().describe("Default nucleus sampling parameter").
|
|
13
|
-
version: zod.z.string().describe("Major version number"),
|
|
14
|
-
thinking: zod.z.boolean().describe("Whether model supports thinking capability").
|
|
15
|
-
baseModelId: zod.z.string().describe("Base model name for generation requests").
|
|
16
|
-
description: zod.z.string().describe("Brief model summary").
|
|
17
|
-
displayName: zod.z.string().describe("Human-readable model name").
|
|
18
|
-
temperature: zod.z.union([zod.z.number().int(), zod.z.number()]).
|
|
19
|
-
maxTemperature: zod.z.union([zod.z.number().int(), zod.z.number()]).
|
|
20
|
-
inputTokenLimit: zod.z.number().int().describe("Maximum input tokens allowed").
|
|
21
|
-
outputTokenLimit: zod.z.number().int().describe("Maximum output tokens available").
|
|
22
|
-
supportedGenerationMethods: zod.z.array(zod.z.string()).describe("Supported methods like generateContent").
|
|
10
|
+
name: zod.z.string().describe("Resource identifier in format models/{model}").nullable(),
|
|
11
|
+
topK: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.number().int().describe("Default top-k sampling parameter").optional()),
|
|
12
|
+
topP: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.number().describe("Default nucleus sampling parameter").optional()),
|
|
13
|
+
version: zod.z.string().describe("Major version number").nullable(),
|
|
14
|
+
thinking: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.boolean().describe("Whether model supports thinking capability").optional()),
|
|
15
|
+
baseModelId: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Base model name for generation requests").optional()),
|
|
16
|
+
description: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Brief model summary").optional()),
|
|
17
|
+
displayName: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Human-readable model name").optional()),
|
|
18
|
+
temperature: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.union([zod.z.number().int(), zod.z.number()]).optional()),
|
|
19
|
+
maxTemperature: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.union([zod.z.number().int(), zod.z.number()]).optional()),
|
|
20
|
+
inputTokenLimit: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.number().int().describe("Maximum input tokens allowed").optional()),
|
|
21
|
+
outputTokenLimit: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.number().int().describe("Maximum output tokens available").optional()),
|
|
22
|
+
supportedGenerationMethods: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.array(zod.z.string()).describe("Supported methods like generateContent").optional())
|
|
23
23
|
}).describe("Represents a Gemini model with its capabilities and limits.");
|
|
24
24
|
const GeminiListModels_RawListModelsResponseSchema = zod.z.object({
|
|
25
|
-
models: zod.z.array(GeminiListModels_ModelSchema).describe("List of models").
|
|
26
|
-
nextPageToken: zod.z.string().describe("Token for retrieving next page").
|
|
25
|
+
models: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.array(GeminiListModels_ModelSchema).describe("List of models").optional()),
|
|
26
|
+
nextPageToken: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.string().describe("Token for retrieving next page").optional())
|
|
27
27
|
}).describe("Raw API response from the models.list endpoint.");
|
|
28
28
|
const GeminiListModelsOutput = zod.z.object({
|
|
29
29
|
raw: GeminiListModels_RawListModelsResponseSchema.nullable(),
|
|
30
|
-
models: zod.z.array(GeminiListModels_ModelSchema).describe("List of available models").
|
|
30
|
+
models: zod.z.preprocess((value) => value === null ? void 0 : value, zod.z.array(GeminiListModels_ModelSchema).describe("List of available models").optional())
|
|
31
31
|
});
|
|
32
32
|
const geminiListModels = require_action.action("GEMINI_LIST_MODELS", {
|
|
33
33
|
slug: "gemini-list-models",
|