mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-28 18:06:30 +02:00
make generate_image conditionally show up
This commit is contained in:
parent
cdfa7daf98
commit
70cbd8beea
2 changed files with 7 additions and 4 deletions
|
|
@ -3,13 +3,15 @@ import { z } from 'zod';
|
|||
|
||||
// Provide a minimal default template to satisfy legacy code paths that
|
||||
// still reference `templates.default`. Real templates are DB-backed.
|
||||
const includeGeminiImageTool = !!process.env.GOOGLE_API_KEY;
|
||||
|
||||
const defaultTemplate: z.infer<typeof WorkflowTemplate> = {
|
||||
name: 'Blank Template',
|
||||
description: 'A blank canvas to build your assistant.',
|
||||
startAgent: "",
|
||||
agents: [],
|
||||
prompts: [],
|
||||
tools: [
|
||||
tools: includeGeminiImageTool ? [
|
||||
{
|
||||
name: "Generate Image",
|
||||
description: "Generate an image using Google Gemini given a text prompt. Returns base64-encoded image data and any text parts.",
|
||||
|
|
@ -24,7 +26,7 @@ const defaultTemplate: z.infer<typeof WorkflowTemplate> = {
|
|||
additionalProperties: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
] : [],
|
||||
pipelines: [],
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue