org.llm4s.model.RequestTransformer
See theRequestTransformer companion object
trait RequestTransformer
Handles model-specific parameter validation and transformation.
Uses ModelCapabilities from ModelRegistry to apply constraints based on what each model supports. This mirrors LiteLLM's approach to handling model-specific quirks (e.g., O-series temperature restrictions).
Example usage:
val transformer = RequestTransformer.default
val result = transformer.transformOptions("o1", 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
- Known subtypes
Members list
In this article