pub struct ChatResponse {
pub model: String,
pub message: Message,
pub stop_reason: StopReason,
pub usage: Usage,
}Fields§
§model: String§message: Message§stop_reason: StopReason§usage: UsageImplementations§
Source§impl ChatResponse
impl ChatResponse
Sourcepub fn tool_calls(&self) -> Vec<ToolCall>
pub fn tool_calls(&self) -> Vec<ToolCall>
Tool calls the model asked for.
Sourcepub fn json<T: DeserializeOwned>(&self) -> Result<T>
pub fn json<T: DeserializeOwned>(&self) -> Result<T>
Parses the text as JSON into T (use with ChatRequest::json_schema).
Trait Implementations§
Source§impl Clone for ChatResponse
impl Clone for ChatResponse
Source§impl Debug for ChatResponse
impl Debug for ChatResponse
Source§impl PartialEq for ChatResponse
impl PartialEq for ChatResponse
impl StructuralPartialEq 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