pub struct ModelResponse {
pub text: String,
pub tool_calls: Vec<ToolCall>,
pub usage: Usage,
pub reasoning: Option<String>,
pub note: Option<String>,
pub cut_off: bool,
}Expand description
A complete (non-streamed) model reply.
Fields§
§text: String§tool_calls: Vec<ToolCall>§usage: Usage§reasoning: Option<String>The model’s visible reasoning, when the provider returns it apart from the answer.
note: Option<String>Why the reply may be incomplete (cut off at the token limit, held back by a safety filter), in the provider’s words.
cut_off: boolThe reply stopped at the output-token limit, not where the model ended it: its text is cut short.
Trait Implementations§
Source§impl Clone for ModelResponse
impl Clone for ModelResponse
Source§fn clone(&self) -> ModelResponse
fn clone(&self) -> ModelResponse
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 moreSource§impl Debug for ModelResponse
impl Debug for ModelResponse
Source§impl Default for ModelResponse
impl Default for ModelResponse
Source§fn default() -> ModelResponse
fn default() -> ModelResponse
Returns the “default value” for a type. Read more
Source§impl PartialEq for ModelResponse
impl PartialEq for ModelResponse
impl StructuralPartialEq for ModelResponse
Auto Trait Implementations§
impl Forget for ModelResponse
impl Freeze for ModelResponse
impl Move for ModelResponse
impl RefUnwindSafe for ModelResponse
impl Send for ModelResponse
impl Sync for ModelResponse
impl Unpin for ModelResponse
impl UnsafeUnpin for ModelResponsewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ToolCall>: UnsafeUnpin,
impl UnwindSafe for ModelResponse
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