org.llm4s.media.MediaType
See theMediaType companion object
sealed trait MediaType extends Product, Serializable
A media type: its MIME string, its canonical file extension, and its MediaCategory.
This is the shared vocabulary the multimodal modules speak. Before it existed, llm4s-core carried three overlapping enumerations of the same handful of image formats - imagegeneration.ImageFormat, imageprocessing.ImageFormat and imageprocessing.MediaType - which could not be passed to one another despite being structurally identical, and RAG's media extraction matched on raw MIME prefixes instead.
llm4s-media holds the vocabulary only: no I/O, no sniffing, no third-party dependencies. Deciding what a file actually is from its bytes needs Tika, which lives in llm4s-rag; that code produces a MIME string and resolves it here via MediaType.fromMimeType.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
- Known subtypes
Members list
In this article