pub trait LanguageModelRouter {
// Required method
fn route_model(
&self,
target: RoutingTarget,
) -> impl Future<Output = Result<Box<DynLanguageModel<'static>>>> + Send;
}Expand description
A router that routes to the appropriate language model implementation based on the routing target.
Required Methods§
Sourcefn route_model(
&self,
target: RoutingTarget,
) -> impl Future<Output = Result<Box<DynLanguageModel<'static>>>> + Send
fn route_model( &self, target: RoutingTarget, ) -> impl Future<Output = Result<Box<DynLanguageModel<'static>>>> + Send
Routes to the appropriate language model implementation based on the routing target.
Returns a dynosaur-generated DynLanguageModel that can hold any
concrete model type while keeping the dynamic-dispatch boilerplate in one place.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.