u
This commit is contained in:
@@ -276,7 +276,7 @@ export function createAnalyzeImageTool({ googleAuthId, model }) {
|
||||
return defineTool({
|
||||
name: 'analyze_image',
|
||||
description:
|
||||
'Inspect 1–9 images via vision model. Multiple paths render as a labelled comparison grid. ' +
|
||||
'Inspect 1-9 images via vision model. Multiple paths render as a labelled comparison grid. ' +
|
||||
'Paths: VFS-relative ("images/foo.avif") or DB ("image/<hash>"). Returns model evaluation.',
|
||||
strict: false,
|
||||
parameters: {
|
||||
@@ -379,12 +379,12 @@ export function createAnalyzeImageTool({ googleAuthId, model }) {
|
||||
const question = typeof prompt === 'string' && prompt.trim() ? prompt.trim() : null;
|
||||
const text = items.length > 1
|
||||
? `${question || 'Compare these images, judge visual quality, flag watermarks, text overlays or defects, and say which one is best and why.'}\n\n` +
|
||||
`The grid is ${shape.name}. Each image has its file name printed beneath it:\n` +
|
||||
items.map((it, idx) => {
|
||||
const row = Math.floor(idx / GRID_CONFIGS[shape.name].cols) + 1;
|
||||
const col = (idx % GRID_CONFIGS[shape.name].cols) + 1;
|
||||
return `- Row ${row}, Col ${col}: "${it.name}"`;
|
||||
}).join('\n')
|
||||
`The grid is ${shape.name}. Each image has its file name printed beneath it:\n` +
|
||||
items.map((it, idx) => {
|
||||
const row = Math.floor(idx / GRID_CONFIGS[shape.name].cols) + 1;
|
||||
const col = (idx % GRID_CONFIGS[shape.name].cols) + 1;
|
||||
return `- Row ${row}, Col ${col}: "${it.name}"`;
|
||||
}).join('\n')
|
||||
: question || 'Describe this image, judge its visual quality, flag any watermark, text overlay or defect, and say whether it is usable as a product or category image.';
|
||||
|
||||
const apiKey = await resolveOpenRouterKey(googleAuthId);
|
||||
|
||||
Reference in New Issue
Block a user