pub struct Route { /* private fields */ }Expand description
A configured algorithm and the per-target clients its calls resolve through.
Implementations§
Source§impl Route
impl Route
Sourcepub fn new(
algorithm: Arc<dyn Algorithm>,
clients: ClientRouter,
caller_auth: Option<CallerAuthKind>,
capabilities: ModelCapabilities,
anthropic_auxiliary_target: Option<AuxiliaryTarget>,
responses_auxiliary_target: Option<AuxiliaryTarget>,
decision_targets: Vec<DecisionTarget>,
models: RuntimeModels,
) -> Self
pub fn new( algorithm: Arc<dyn Algorithm>, clients: ClientRouter, caller_auth: Option<CallerAuthKind>, capabilities: ModelCapabilities, anthropic_auxiliary_target: Option<AuxiliaryTarget>, responses_auxiliary_target: Option<AuxiliaryTarget>, decision_targets: Vec<DecisionTarget>, models: RuntimeModels, ) -> Self
Creates a fully configured execution route.
Sourcepub fn algorithm_name(&self) -> &str
pub fn algorithm_name(&self) -> &str
Returns the configured libsy algorithm name.
Sourcepub fn capabilities(&self) -> ModelCapabilities
pub fn capabilities(&self) -> ModelCapabilities
Returns model-list capability metadata.
Sourcepub fn caller_auth(&self) -> Option<CallerAuthKind>
pub fn caller_auth(&self) -> Option<CallerAuthKind>
Returns the forwarded caller credential family.
Sourcepub fn models(&self) -> &RuntimeModels
pub fn models(&self) -> &RuntimeModels
Returns the models grouped for one algorithm execution.
Sourcepub fn check_caller_format(
&self,
input_format: WireFormat,
) -> Result<(), RunnerError>
pub fn check_caller_format( &self, input_format: WireFormat, ) -> Result<(), RunnerError>
Rejects a caller format incompatible with forwarded credentials.
Sourcepub async fn execute(
&self,
request: Request,
observer: Option<RunObserver>,
) -> Result<RunOutput, RunnerError>
pub async fn execute( &self, request: Request, observer: Option<RunObserver>, ) -> Result<RunOutput, RunnerError>
Executes the configured route without consuming or proxying streamed responses.
Sourcepub async fn decide(
&self,
request: Request,
) -> Result<RoutingOutcome, RunnerError>
pub async fn decide( &self, request: Request, ) -> Result<RoutingOutcome, RunnerError>
Completes routing-time calls without serving a post-routing completion.
Sourcepub async fn call_auxiliary(
&self,
request: Request,
operation: AuxiliaryOperation,
) -> Result<Value, RunnerError>
pub async fn call_auxiliary( &self, request: Request, operation: AuxiliaryOperation, ) -> Result<Value, RunnerError>
Executes a model-bearing provider operation through a compatible target.
Auto Trait Implementations§
impl !RefUnwindSafe for Route
impl !UnwindSafe for Route
impl Forget for Route
impl Freeze for Route
impl Move for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more