Skip to main content

Module multimodal

Module multimodal 

Structs§

LocalImageCache
Per-path cache for resolved local image data URIs. Keyed by absolute path; stores (len, mtime) for freshness checks ((0, 0) sentinel = immutable upload). LRU evicts by both entry count and total bytes.
PreparedMessages

Enums§

MultimodalError

Functions§

contains_image_markers
count_image_markers
count_latest_user_image_markers
count_user_image_markers
extract_ollama_image_payload
parse_image_markers
prepare_messages_for_provider
prepare_messages_for_provider_cached
Like prepare_messages_for_provider but reuses a LocalImageCache across calls so each unique local image file is read from disk at most once per session (or once per modification for mutable files).
sanitize_audio_markers
Strip loadable audio markers (see strip_unplayable_audio_markers) across every message in messages, logging one degradation warning when any are removed. Returns the input borrowed when no candidate marker is present (the common, allocation-free path) or an owned rebuilt vector otherwise.
strip_media_markers