org.llm4s.model.RequestTransformer
See theRequestTransformer companion object
@Stable
trait RequestTransformer
Handles model-specific parameter validation and transformation.
Uses ModelCapabilities from ModelRegistryService to apply constraints based on what each model supports, as LiteLLM does. Rules a vendor knows but the registry does not record live in that vendor's provider module, layered on with RequestTransformer.adjusted.
Example usage:
val transformer = RequestTransformer.default(registryService)
val result = transformer.transformOptions("gpt-4o", options, dropUnsupported = true)
result match {
case Right(transformed) => // use transformed options
case Left(error) => // handle validation error
}
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article