应用产品

ly

@prateekmedia2JavaScriptAGPL-3.0更新于 2026-09-19可当场跑

通过聊天操作图像,使用类似 Jev 的模型对 prompt 进行分类

英文原文

Manipulate images via chat, uses Jev like model to classify prompt

prateekmedia/ly

它在哪儿调用了 Jev

await runSystemOne({ instruction: 'warm up' }, { operation: OPERATION_QUESTION.operation })

src/llm/layaOnnxWorker.js:137

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 src/llm/layaConstants.js:26

  1. operation选项

    Which single image operation does `instruction` request?

    • remove_backgroundremove or cut out the background, transparent background, isolate subject
    • convert_formatconvert, save as, export as, or change to png jpeg webp or avif
    • compress_imagecompress, optimize, shrink file size, reduce file size without focusing on pixel dimensions
    • resize_imageresize, scale, crop, change width height, or percentage size
    • noneno clear image operation, empty, or unrelated text

用你自己的内容跑一遍

代码
import { 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' } },
  },
});

同类的其他项目