pub struct ChatResponse {
pub message: ChatMessage,
pub model: Option<String>,
pub usage: Option<Usage>,
}Expand description
One chat-completion response (single choice; multi-choice responses are not modeled).
Fields§
§message: ChatMessageThe assistant message (text and/or tool calls).
model: Option<String>The model that produced the response, when reported.
usage: Option<Usage>Token usage, when reported.
Trait Implementations§
Source§impl Clone for ChatResponse
impl Clone for ChatResponse
Auto 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