Applications
Manipulate images via chat, uses Jev like model to classify prompt
await runSystemOne({ instruction: 'warm up' }, { operation: OPERATION_QUESTION.operation })The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from src/llm/layaConstants.js:26
operationchoiceWhich single image operation does `instruction` request?
remove_background — remove or cut out the background, transparent background, isolate subjectconvert_format — convert, save as, export as, or change to png jpeg webp or avifcompress_image — compress, optimize, shrink file size, reduce file size without focusing on pixel dimensionsresize_image — resize, scale, crop, change width height, or percentage sizenone — no clear image operation, empty, or unrelated textimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
operation: { type: 'choice', instructions: 'Which single image operation does `instruction` request?',
criteria: { remove_background: 'remove or cut out the background, transparent background, isolate subject', convert_format: 'convert, save as, export as, or change to png jpeg webp or avif', compress_image: 'compress, optimize, shrink file size, reduce file size without focusing on pixel dimensions', resize_image: 'resize, scale, crop, change width height, or percentage size', none: 'no clear image operation, empty, or unrelated text' } },
},
});