pub struct InferenceResponse {
pub text: String,
pub model_used: String,
pub input_tokens: u64,
pub output_tokens: u64,
}Expand description
One completion result.
The driver wire format carries no usage block and never echoes back a
confirmed model name (see docs/murmur-inference-message-format.md), so
model-used is the model string the host actually sent and the two token
counts are computed host-side with the same tiktoken convention the agent
loop uses for its own turns. They are host measurements, not provider
-reported figures.
Fields§
§text: StringConcatenated text content of the driver’s response.
model_used: StringThe model string the host sent for this call.
input_tokens: u64Host-side token count of the outgoing request payload.
output_tokens: u64Host-side token count of the raw driver response.
Trait Implementations§
Source§impl Clone for InferenceResponse
impl Clone for InferenceResponse
Source§fn clone(&self) -> InferenceResponse
fn clone(&self) -> InferenceResponse
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 moreimpl ComponentType for InferenceResponse
Source§impl Debug for InferenceResponse
impl Debug for InferenceResponse
impl Lift for InferenceResponse
impl Lower for InferenceResponse
Auto Trait Implementations§
impl Freeze for InferenceResponse
impl RefUnwindSafe for InferenceResponse
impl Send for InferenceResponse
impl Sync for InferenceResponse
impl Unpin for InferenceResponse
impl UnsafeUnpin for InferenceResponse
impl UnwindSafe for InferenceResponse
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
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> ⓘ
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