pub struct InferenceRequest {
pub messages: Vec<Message>,
pub system_prompt: Option<String>,
pub model: Option<String>,
}Expand description
One completion request.
system-prompt and model are genuinely optional — none means “the
host decides”, not “empty string”.
Fields§
§messages: Vec<Message>Conversation to complete. Same {role, content} shape the
compaction-event hands a hook, so a compaction hook can forward
(a summarized slice of) what it was given without translation.
system_prompt: Option<String>System prompt for this call. none sends no system prompt at all.
model: Option<String>Model to run with. none resolves to the manifest’s primary
inference.model.
A some(m) the driver or provider rejects returns err — the host
never silently falls back to the primary model. A caller that
wants fallback-on-failure must call run-inference a second time
with model: none, so each attempt produces its own truthful trace
record and OTel span rather than one span quietly relabelled.
Trait Implementations§
Source§impl Clone for InferenceRequest
impl Clone for InferenceRequest
impl ComponentType for InferenceRequest
Source§impl Debug for InferenceRequest
impl Debug for InferenceRequest
impl Lift for InferenceRequest
impl Lower for InferenceRequest
Auto Trait Implementations§
impl Freeze for InferenceRequest
impl RefUnwindSafe for InferenceRequest
impl Send for InferenceRequest
impl Sync for InferenceRequest
impl Unpin for InferenceRequest
impl UnsafeUnpin for InferenceRequest
impl UnwindSafe for InferenceRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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