pub struct ContextRequest {
pub request: RequestContext,
pub session_id: SessionId,
pub run_id: RunId,
pub step: u32,
pub query: String,
pub cancellation: CancellationToken,
pub deadline: Instant,
}Expand description
Per-step request handed to every ContextContributor.
Fields§
§request: RequestContextThe originating request.
session_id: SessionIdSession this record belongs to.
run_id: RunIdRun this record belongs to.
step: u321-based step number inside the Turn.
query: StringText the contributor should retrieve context for (the latest user input).
cancellation: CancellationTokenCancelled when the step is abandoned.
deadline: InstantLatest time by which the work must finish.
Trait Implementations§
Source§impl Clone for ContextRequest
impl Clone for ContextRequest
Source§fn clone(&self) -> ContextRequest
fn clone(&self) -> ContextRequest
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 ContextRequest
impl RefUnwindSafe for ContextRequest
impl Send for ContextRequest
impl Sync for ContextRequest
impl Unpin for ContextRequest
impl UnsafeUnpin for ContextRequest
impl UnwindSafe for ContextRequest
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