应用产品
通过聊天操作图像,使用类似 Jev 的模型对 prompt 进行分类
Manipulate images via chat, uses Jev like model to classify prompt
await runSystemOne({ instruction: 'warm up' }, { operation: OPERATION_QUESTION.operation })链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
取自 src/llm/layaConstants.js:26
operation选项Which 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' } },
},
});