pub struct ModelRequest {
pub invocation_id: InvocationId,
pub attempt: AttemptNumber,
pub frame: ContextFrame,
pub model: ModelRef,
pub tool_surface: ToolSurface,
pub generation: GenerationOptions,
pub cache: CacheDirective,
}Expand description
Everything one gateway attempt needs: invocation identity, the context to
render, and the invocation knobs. Invariant across retries of the same
logical invocation except for ModelRequest::attempt.
Fields§
§invocation_id: InvocationIdIdentifies the turn + round this attempt belongs to; the same id recurs on every retry.
attempt: AttemptNumberThis attempt’s AttemptNumber within the invocation’s retry loop.
frame: ContextFrameThe ContextFrame the gateway renders into provider messages.
model: ModelRefWhich model to invoke.
tool_surface: ToolSurfaceThe ToolSurface offered alongside the frame.
generation: GenerationOptionsThe GenerationOptions governing sampling.
cache: CacheDirectiveThe prompt-cache instruction the translation face renders. Invariant across retries like the rest of the request.
Trait Implementations§
Source§impl Clone for ModelRequest
impl Clone for ModelRequest
Source§fn clone(&self) -> ModelRequest
fn clone(&self) -> ModelRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModelRequest
impl RefUnwindSafe for ModelRequest
impl Send for ModelRequest
impl Sync for ModelRequest
impl Unpin for ModelRequest
impl UnsafeUnpin for ModelRequest
impl UnwindSafe for ModelRequest
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