Applications

ly

@prateekmedia2JavaScriptAGPL-3.0updated 2026-09-19runnable

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

prateekmedia/ly

Where it calls Jev

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

src/llm/layaOnnxWorker.js:137

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from src/llm/layaConstants.js:26

  1. operationchoice

    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

Run it on your own text

The code
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' } },
  },
});

Other projects in this category