org.llm4s.media
Members list
Type members
Classlikes
A MediaType statically known to be audio, so audio APIs can require one.
The broad kind of a media type - the part of a MIME type before the slash.
The broad kind of a media type - the part of a MIME type before the slash.
This is the discriminator multimodal code branches on: extraction decides whether to decode a file as pixels, samples or text; a provider decides whether it can accept the payload at all. Modelling it as a type rather than as mimeType.startsWith("image/") keeps that decision exhaustive and testable.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MediaCategory.type
A media type: its MIME string, its canonical file extension, and its MediaCategory.
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
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes