pub struct ExecuteRequest { /* private fields */ }Expand description
Builder for a stateful conversation turn.
ⓘ
ExecuteRequest::new(payload, exec_ctx).with_auth(token).run().awaitImplementations§
Source§impl ExecuteRequest
impl ExecuteRequest
pub fn new(payload: RequestPayload, exec_ctx: Arc<ExecutionContext>) -> Self
Sourcepub fn with_auth(self, token: Option<String>) -> Self
pub fn with_auth(self, token: Option<String>) -> Self
Override the bearer token for this request only; does not touch the shared ExecutionContext.
Sourcepub async fn run(self) -> ExecutorResult<Either<ResponsePayload, BoxStream>>
pub async fn run(self) -> ExecutorResult<Either<ResponsePayload, BoxStream>>
Execute one stateful conversation turn.
Returns Either::Left(ResponsePayload) for non-streaming requests, or
Either::Right(BoxStream) for streaming, where each yielded String is
a complete SSE frame ready to forward to the client.
§Errors
Returns [ExecutorError] if rehydration or (non-streaming) LLM inference fails.
Auto Trait Implementations§
impl !RefUnwindSafe for ExecuteRequest
impl !UnwindSafe for ExecuteRequest
impl Freeze for ExecuteRequest
impl Send for ExecuteRequest
impl Sync for ExecuteRequest
impl Unpin for ExecuteRequest
impl UnsafeUnpin for ExecuteRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more