pub struct LlmResponse {
pub content: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
pub reasoning: Option<String>,
pub usage: Option<TokenUsage>,
}Expand description
A response from an LLM provider.
Fields§
§content: Option<String>§tool_calls: Option<Vec<ToolCall>>§reasoning: Option<String>Reasoning-model “thinking” text, when the provider exposes it separately
from the answer (e.g. OpenRouter’s reasoning, Zhipu/GLM’s
reasoning_content). None for providers that don’t surface it.
usage: Option<TokenUsage>What the provider says the request cost. None when it reported nothing.
Trait Implementations§
Source§impl Clone for LlmResponse
impl Clone for LlmResponse
Source§fn clone(&self) -> LlmResponse
fn clone(&self) -> LlmResponse
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 LlmResponse
impl RefUnwindSafe for LlmResponse
impl Send for LlmResponse
impl Sync for LlmResponse
impl Unpin for LlmResponse
impl UnsafeUnpin for LlmResponse
impl UnwindSafe for LlmResponse
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