Skip to main content

Signatures

Building an ImageInput

Input constructors hang off the facade as RunAnywhere.image, so renderer code builds the same values main-process code does:

From a file the user picked

Passing the path rather than the bytes avoids reading a large image into JavaScript memory only to hand it straight back to native code.

From a screenshot

Desktop is the one platform where screen capture is a normal thing to do:
This pairs with the computer-use scaffold: a model reads a screenshot and decides what to do next.

Streaming

Options

vlm takes the same LlmOptions as llm, so maxOutputTokens, temperature, and systemPrompt all apply.

Models

VLM runs on the llama.cpp backend, so the model must be a GGUF vision model with its projector. Install @runanywhere/electron-llamacpp. On win32-arm64 llama.cpp does not load at all, so vision is unavailable there. Check capabilities() before putting it in the interface.