Encode a single image chunk. Returns 0 on success; the embedding pointer is valid until the next encode call.
Evaluate all chunks against the language-model context. Advances newNPast to the position after the last evaluated token. Returns 0 on success.
Load an image or audio file into an owned bitmap. Returns falsy bitmap on failure.
Load a bitmap from an in-memory byte buffer.
Pointer to the most recently encoded embeddings.
Tokenise a prompt string that contains mtmd_default_marker() placeholders. bitmaps must have exactly as many entries as markers in text.text. Returns 0 on success, 1 on count mismatch, 2 on preprocessing error.
Load a projector from a GGUF file. Returns a falsy context on failure or null model.
Overload using default params.
A multimodal projector context loaded from a GGUF file. Encodes images and audio into embeddings for the paired language model. Check if (ctx) after construction.