u
This commit is contained in:
@@ -7,7 +7,7 @@ import env from '../config/env.js';
|
||||
import { getImageByHash } from '../db/pic.js';
|
||||
import { prepareVfs, syncVfsToDb, extractFullHash, isReadOnlyDatabasePath } from './vfs.js';
|
||||
import { resolveOpenRouterKey, resolveImageModel } from './llm-key.js';
|
||||
import { TOOL_DESCRIPTIONS } from './prompts.js';
|
||||
import { TOOL_DESCRIPTIONS, TOOL_PARAMETER_DESCRIPTIONS } from './prompts.js';
|
||||
|
||||
/**
|
||||
* edit-image — generate or edit images using the modelslugimage company setting.
|
||||
@@ -261,15 +261,15 @@ export function createEditImageTool({ googleAuthId, model: fallbackModel }) {
|
||||
properties: {
|
||||
note: {
|
||||
type: ['string', 'null'],
|
||||
description: 'A note explaining what this image generation or edit is doing (or null). This note will be displayed to the user while the image is being generated or edited.',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.note,
|
||||
},
|
||||
prompt: {
|
||||
type: 'string',
|
||||
description: 'Description of the image to generate, or edit/transformation instructions when attachments are provided.',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.prompt,
|
||||
},
|
||||
attachments: {
|
||||
type: ['array', 'null'],
|
||||
description: 'Optional reference image(s) for editing/image-to-image or null. Omit for text-to-image generation.',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.attachments,
|
||||
items: {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
@@ -277,11 +277,11 @@ export function createEditImageTool({ googleAuthId, model: fallbackModel }) {
|
||||
properties: {
|
||||
vfsfilename: {
|
||||
type: 'string',
|
||||
description: 'VFS path (e.g. "images/sample.png") or database path ("image/<hash>").',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.attachment_vfsfilename,
|
||||
},
|
||||
high: {
|
||||
type: ['boolean', 'null'],
|
||||
description: 'Feed image in high quality/resolution if true; low quality/resolution if false or null (default).',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.attachment_high,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -289,16 +289,16 @@ export function createEditImageTool({ googleAuthId, model: fallbackModel }) {
|
||||
size: {
|
||||
type: ['string', 'null'],
|
||||
enum: [...VALID_SIZES, null],
|
||||
description: 'Resolution tier (3 choices): "1K" (standard, default), "2K" (high quality), "4K" (ultra high), or null.',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.size,
|
||||
},
|
||||
ratio: {
|
||||
type: ['string', 'null'],
|
||||
enum: [...VALID_RATIOS, null],
|
||||
description: 'Aspect ratio (3 choices): "1:1" (square, default), "4:3" (landscape), "3:4" (portrait), or null.',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.ratio,
|
||||
},
|
||||
vfsoutputfilename: {
|
||||
type: ['string', 'null'],
|
||||
description: 'VFS path where the output image should be saved (e.g. "images/edited.avif") or null. Defaults to "images/generated-<timestamp>.avif". Output is always converted to AVIF.',
|
||||
description: TOOL_PARAMETER_DESCRIPTIONS.edit_image.vfsoutputfilename,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user