pub struct ChatResponse {
pub text: String,
pub reasoning: String,
pub tool_calls: Vec<ToolCall>,
pub usage: Usage,
pub finish_reason: Option<FinishReason>,
pub provider_state: Option<Value>,
pub warnings: Vec<String>,
}Expand description
A fully collected response.
Fields§
§text: String§reasoning: String§tool_calls: Vec<ToolCall>§usage: Usage§finish_reason: Option<FinishReason>§provider_state: Option<Value>§warnings: Vec<String>Adapter warnings (see ChatDelta::Warning).
Implementations§
Source§impl ChatResponse
impl ChatResponse
Sourcepub fn to_message(&self) -> Message
pub fn to_message(&self) -> Message
The assistant message to append to the conversation.
Trait Implementations§
Source§impl Clone for ChatResponse
impl Clone for ChatResponse
Source§impl Debug for ChatResponse
impl Debug for ChatResponse
Source§impl Default for ChatResponse
impl Default for ChatResponse
Source§impl PartialEq for ChatResponse
impl PartialEq for ChatResponse
impl StructuralPartialEq for ChatResponse
Auto Trait Implementations§
impl Forget for ChatResponse
impl Freeze for ChatResponse
impl Move 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