pub struct CallModelRequest { /* private fields */ }Expand description
The host-facing half of an offloaded model call, surfaced inside Step::CallModel.
The host reads the routed request (get_routed) and the decision
behind it (get_decision), performs (or delegates) the model
call, and fulfills it with respond — unblocking the algorithm’s
Driver::call_model on the other side. switchyard-llm-client’s run is the ready-made
consumer that does this for you.
Implementations§
Source§impl CallModelRequest
impl CallModelRequest
Sourcepub fn get_routed(&self) -> &RoutedRequest
pub fn get_routed(&self) -> &RoutedRequest
The routed request the host should serve; its decision.selected_model_id() names
the model to hit.
Sourcepub fn get_request(&self) -> &Request
pub fn get_request(&self) -> &Request
The model request to perform (the Request inside the routed request).
Sourcepub fn get_decision(&self) -> &Decision
pub fn get_decision(&self) -> &Decision
The decision that led to this call; its selected_model_id() identifies the model to hit.
Auto Trait Implementations§
impl Freeze for CallModelRequest
impl !RefUnwindSafe for CallModelRequest
impl Send for CallModelRequest
impl Sync for CallModelRequest
impl Unpin for CallModelRequest
impl UnsafeUnpin for CallModelRequest
impl !UnwindSafe for CallModelRequest
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