pub struct ChatResponse {
pub content: String,
pub reasoning_content: Option<String>,
pub thinking_signature: Option<String>,
pub tool_calls: Vec<ToolCall>,
pub usage: UsageInfo,
pub finish_reason: FinishReason,
pub raw: Option<Value>,
}Expand description
Unified non-streaming response format.
Fields§
§content: StringText content
reasoning_content: Option<String>Reasoning/thinking content (from StreamChunk::Thought)
thinking_signature: Option<String>Anthropic thinking signature for multi-turn conversations
tool_calls: Vec<ToolCall>Tool call list
usage: UsageInfoUsage information
finish_reason: FinishReasonFinish reason
raw: Option<Value>Raw response (for debugging)
Trait Implementations§
Source§impl Clone for ChatResponse
impl Clone for ChatResponse
Source§fn clone(&self) -> ChatResponse
fn clone(&self) -> ChatResponse
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 ChatResponse
impl RefUnwindSafe for ChatResponse
impl Send for ChatResponse
impl Sync for ChatResponse
impl Unpin for ChatResponse
impl UnsafeUnpin for ChatResponse
impl UnwindSafe for ChatResponse
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