mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-13 17:22:37 +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
|
|
@ -95,9 +95,10 @@ export class CreateProjectUseCase implements ICreateProjectUseCase {
|
|||
}
|
||||
}
|
||||
|
||||
// Ensure the Gemini Image tool is always available by default
|
||||
// Conditionally include Gemini Image tool by default if GOOGLE_API_KEY is present
|
||||
const hasGoogleKey = !!process.env.GOOGLE_API_KEY;
|
||||
const hasImageTool = (workflow.tools || []).some(t => t.isGeminiImage || t.name === 'Generate Image');
|
||||
if (!hasImageTool) {
|
||||
if (hasGoogleKey && !hasImageTool) {
|
||||
const imageTool = {
|
||||
name: 'Generate Image',
|
||||
description: 'Generate an image using Google Gemini given a text prompt. Returns base64-encoded image data and any text parts.',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue