Skip to main content

mmproj_caps

Function mmproj_caps 

Source
pub fn mmproj_caps(path: impl AsRef<Path>) -> Result<MtmdCaps>
Expand description

Read an mmproj file’s input capabilities without loading it.

MtmdContext::init_from_file builds the full projector — weights, compute buffers, the lot. This only reads enough metadata to answer “does this accept images, audio, or both”, which is what a server needs at startup to decide whether a request is even servable.

Wraps mtmd_get_cap_from_file. Returns both flags false for a file that is not a readable mmproj.

§Errors

Returns MtmdError::InvalidPath if the path contains an interior NUL, or MtmdError::PathNotUtf8 if it is not UTF-8.